readme updte
This commit is contained in:
parent
5090bf9132
commit
42f12a33ea
|
@ -116,6 +116,7 @@ pip install opencv-webcam-script==0.4.0
|
|||
|
||||
```python
|
||||
from opencv_webcam.opencv_webcam import webcam_opencv
|
||||
|
||||
# 例举几个功能
|
||||
webcam_opencv() # 常规调用
|
||||
webcam_opencv(is_autoSaveFrame=True) # 自动保存帧
|
||||
|
@ -304,6 +305,7 @@ python opencv_webcam.py -isasf -fnp webcam
|
|||
```shell
|
||||
# 设置JPG质量为100,默认为95
|
||||
python opencv_webcam.py -isasf -fss jpg -jq 100
|
||||
|
||||
# 设置PNG质量为5,默认为3
|
||||
python opencv_webcam.py -isasf -fss png -jq 5
|
||||
```
|
||||
|
@ -333,8 +335,10 @@ python opencv_webcam.py -isasf -afn 100
|
|||
```shell
|
||||
# 日志文件默认保存在项目根目录,ows.log
|
||||
python opencv_webcam.py
|
||||
|
||||
# 设置日志文件名称及类型,类型包括.log、.txt、.data
|
||||
python opencv_webcam.py -ln ows02.txt
|
||||
|
||||
# 设置日志保存方式,,默认为追加模式
|
||||
python opencv_webcam.py -lm w # 设置为覆盖模式
|
||||
```
|
||||
|
@ -346,10 +350,13 @@ python opencv_webcam.py -lm w # 设置为覆盖模式
|
|||
```shell
|
||||
# 常规压缩,默认ows.zip(以自动版为例)
|
||||
python opencv_webcam.py -isasf -isc
|
||||
|
||||
# 自定义压缩文件名称
|
||||
python opencv_webcam.py -isasf -isc -cn ows02
|
||||
|
||||
# 自动命名压缩文件
|
||||
python opencv_webcam.py -isasf -isc -isacn
|
||||
|
||||
# 自定义压缩模式,默认为写覆盖
|
||||
python opencv_webcam.py -isasf -isc -cm a # 追加模式(a模式仅限zip) 注:该指令仅限v0.4
|
||||
python opencv_webcam.py -isasf -isc -cs tar -cm w:gz # tar压缩
|
||||
|
|
10
utils/log.py
10
utils/log.py
|
@ -24,5 +24,11 @@ def log_management(logContent, logName, logSaveMode):
|
|||
|
||||
|
||||
# 日志读取时间和帧数
|
||||
def log2date_frames():
|
||||
pass
|
||||
def log2date_frames(log_path="../ows.log"):
|
||||
f = open(log_path, 'r')
|
||||
f_list = f.read()
|
||||
print(f_list)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
log2date_frames()
|
||||
|
|
Loading…
Reference in New Issue