readme style update
This commit is contained in:
parent
88e9faa92f
commit
b38aacd742
|
@ -2,4 +2,3 @@
|
|||
*.jpeg
|
||||
*.png
|
||||
*.mp4
|
||||
# README_v2.md
|
31
README.md
31
README.md
|
@ -1,16 +1,28 @@
|
|||
# :fire: OpenCV Webcam 脚本
|
||||
<p align="center">
|
||||
<a href="https://simpleicons.org/">
|
||||
<img src="./imgs/火箭.svg" alt="Simple Icons" width=64 height=64>
|
||||
</a>
|
||||
<h3 align="center">OpenCV Webcam Script</h3>
|
||||
<p align="center">
|
||||
基于OpenCV的Webcam程序,可用于视频帧采集、重塑尺寸等。具有安装便捷、操作简单等特点</p>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://pypi.org/project/opencv-webcam-script/"><img src="https://img.shields.io/badge/PyPi-pip%20install-brightgreen?logo=pypi" alt="pip install" /></a>
|
||||
<a href="#"><img src="https://img.shields.io/badge/latest%20version-v0.1-green" alt="Version" /></a>
|
||||
<a href="#"><img src="https://img.shields.io/badge/docker-v0.1-blue" alt="Docker" /></a>
|
||||
<a href="https://gitee.com/CV_Lab/opencv_webcam/blob/master/LICENSE"><img src="https://img.shields.io/badge/license-GPL--3.0-blue" alt="License" /></a>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
### :sparkles: 更新
|
||||
|
||||
<h3 align="center">更新走势</h3>
|
||||
<hr>
|
||||
- `2021-12-29` **[opencv-webcam-script v0.1](https://pypi.org/project/opencv-webcam-script/0.1/)正式上线**
|
||||
|
||||
<h3 align="center">安装教程</h3>
|
||||
<hr>
|
||||
|
||||
|
||||
### :zap: 安装教程
|
||||
|
||||
#### :white_check_mark: 方法一:Linux Shell版(开发版)
|
||||
#### :white_check_mark: 方法一:Linux Shell安装(开发版)
|
||||
|
||||
```shell
|
||||
# 克隆项目
|
||||
|
@ -41,8 +53,9 @@ webcam_opencv(device_index=0, quit_key='q', is_autoSaveFrame=False, frame_saveDi
|
|||
```
|
||||
|
||||
|
||||
<h3 align="center">使用教程</h3>
|
||||
<hr>
|
||||
|
||||
### :zap: 使用教程
|
||||
#### :bulb: 常规调用
|
||||
|
||||
```shell
|
||||
|
|
145
README_v2.md
145
README_v2.md
|
@ -1,145 +0,0 @@
|
|||
<p align="center">
|
||||
<a href="https://simpleicons.org/">
|
||||
<img src="./imgs/火箭.svg" alt="Simple Icons" width=64 height=64>
|
||||
</a>
|
||||
<h3 align="center">OpenCV Webcam Script</h3>
|
||||
<p align="center">
|
||||
基于OpenCV的Webcam程序,可用于视频帧采集、重塑尺寸等。具有安装便捷、操作简单等特点</p>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://pypi.org/project/opencv-webcam-script/"><img src="https://img.shields.io/badge/PyPi-pip%20install-brightgreen?logo=pypi" alt="pip install" /></a>
|
||||
<a href="#"><img src="https://img.shields.io/badge/latest%20version-v0.1-green" alt="Version" /></a>
|
||||
<a href="#"><img src="https://img.shields.io/badge/latest%20version-v0.1-green" alt="OpenCV Python" /></a>
|
||||
<a href="https://gitee.com/CV_Lab/opencv_webcam/blob/master/LICENSE"><img src="https://img.shields.io/badge/license-GPL--3.0-blue" alt="License" /></a>
|
||||
</p>
|
||||
|
||||
|
||||
### :sparkles: 更新
|
||||
|
||||
- `2021-12-29` **[opencv-webcam-script v0.1](https://pypi.org/project/opencv-webcam-script/0.1/)正式上线**
|
||||
|
||||
|
||||
### <div align="center">安装教程</div>
|
||||
### :zap: 安装教程
|
||||
|
||||
#### :white_check_mark: 方法一:Linux Shell安装(开发版)
|
||||
|
||||
```shell
|
||||
# 克隆项目
|
||||
git clone https://gitee.com/CV_Lab/opencv_webcam.git
|
||||
# 创建conda虚拟环境,以python 3.8为例
|
||||
conda create -n ow python==3.8 # 虚拟环境名称为ow
|
||||
conda activate ow # 激活虚拟环境
|
||||
pip install -r ./requirements.txt -U # 安装OpenCV Webcam脚本
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### :white_check_mark: 方法二:pip 快速安装(API版)
|
||||
|
||||
- 第一步:创建ow虚拟环境,参见方法一
|
||||
- 第二步:执行pip指令
|
||||
|
||||
```shell
|
||||
pip install opencv-webcam-script
|
||||
```
|
||||
|
||||
- 第三步:编写python程序
|
||||
|
||||
```python
|
||||
from opencv_webcam.opencv_webcam import webcam_opencv
|
||||
# 直接使用webcam_opencv
|
||||
webcam_opencv(device_index=0, quit_key='q', is_autoSaveFrame=False, frame_saveDir='./webcam', frame_nSave=1, is_headSaveFrame=False, frame_capKey='a', is_resizeFrame=False, resize_frame=[640, 480], resizeRatio_frame=1.0)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### :zap: 使用教程
|
||||
#### :bulb: 常规调用
|
||||
|
||||
```shell
|
||||
# 默认按q键退出
|
||||
python opencv_webcam.py
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### :bulb: 设置退出键
|
||||
|
||||
```shell
|
||||
# 默认按q键退出
|
||||
# 设置z键退出
|
||||
python opencv_webcam.py -q z
|
||||
# 设置k键退出
|
||||
python opencv_webcam.py -q k
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### :bulb: 自动保存帧
|
||||
|
||||
```shell
|
||||
python opencv_webcam.py -isasf
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### :bulb: 每隔n帧保存一次帧
|
||||
|
||||
```shell
|
||||
# 每隔10帧保存一次帧
|
||||
python opencv_webcam.py -isasf -fns 10
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### :bulb: 手动保存帧
|
||||
|
||||
```shell
|
||||
# 默认按a键捕获一帧
|
||||
python opencv_webcam.py -ishsf
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### :bulb: 自定义捕获键
|
||||
|
||||
```shell
|
||||
# 设置z键为捕获键
|
||||
python opencv_webcam.py -ishsf -fck z
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### :bulb: 重塑帧尺寸(自定义宽高)
|
||||
|
||||
```shell
|
||||
# 重塑宽度300 高度200
|
||||
# 自动版
|
||||
python opencv_webcam.py -isasf -isrf -rf 300 200
|
||||
# 手动版
|
||||
python opencv_webcam.py -ishsf -isrf -rf 300 200
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### :bulb: 重塑帧尺寸(自定义宽高缩放比)
|
||||
|
||||
```shell
|
||||
# 宽高缩放比为0.5
|
||||
# 自动版
|
||||
python opencv_webcam.py -isasf -isrf -rrf 0.5
|
||||
# 手动版
|
||||
python opencv_webcam.py -ishsf -isrf -rrf 0.5
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### :bulb: 设置保存路径
|
||||
|
||||
```shell
|
||||
# 设置保存路径,默认保存路径为./WebcamFrame
|
||||
python opencv_webcam.py -fsd custom_dir -isasf # 以自动版为例
|
||||
```
|
||||
|
Loading…
Reference in New Issue