jupyter update

This commit is contained in:
13339479676 2022-01-26 10:46:31 +08:00
parent 0852744d4c
commit abb6b7233d
2 changed files with 133 additions and 15 deletions

View File

@ -102,9 +102,36 @@
"outputs": [], "outputs": [],
"source": [ "source": [
"# 多摄像头切换示例默认为0\n", "# 多摄像头切换示例默认为0\n",
"!python opencv_webcam.py -dev 0\n", "!python opencv_webcam.py -dev 0"
"!python opencv_webcam.py -dev 1\n", ]
"!python opencv_webcam.py -dev 2\n", },
{
"cell_type": "code",
"execution_count": null,
"id": "654a4892-6d92-45ce-8baa-4ebdc50b6aed",
"metadata": {},
"outputs": [],
"source": [
"!python opencv_webcam.py -dev 1"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "8bf0171b-977d-4db2-8864-4832886a6d97",
"metadata": {},
"outputs": [],
"source": [
"!python opencv_webcam.py -dev 2"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "8f846baa-f487-4625-bfb4-75035c042e80",
"metadata": {},
"outputs": [],
"source": [
"# RTSP\n", "# RTSP\n",
"!python opencv_webcam.py -dev rtsp://username:password@xxx.xxx.xxx" "!python opencv_webcam.py -dev rtsp://username:password@xxx.xxx.xxx"
] ]
@ -125,7 +152,16 @@
"outputs": [], "outputs": [],
"source": [ "source": [
"# 默认按q键退出\n", "# 默认按q键退出\n",
"!python opencv_webcam.py -q z # 设置z键退出\n", "!python opencv_webcam.py -q z # 设置z键退出"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "d5c3436e-d84c-4871-942f-f65c82b6320e",
"metadata": {},
"outputs": [],
"source": [
"!python opencv_webcam.py -q k # 设置k键退出" "!python opencv_webcam.py -q k # 设置k键退出"
] ]
}, },
@ -227,7 +263,16 @@
"outputs": [], "outputs": [],
"source": [ "source": [
"# 重塑宽度300 高度200\n", "# 重塑宽度300 高度200\n",
"!python opencv_webcam.py -isasf -isrf -rf 300 200 # 自动版\n", "!python opencv_webcam.py -isasf -isrf -rf 300 200 # 自动版"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "e61711ff-57a4-4723-bbcf-a8dbf9bf9f5c",
"metadata": {},
"outputs": [],
"source": [
"!python opencv_webcam.py -ishsf -isrf -rf 300 200 # 手动版" "!python opencv_webcam.py -ishsf -isrf -rf 300 200 # 手动版"
] ]
}, },
@ -247,7 +292,16 @@
"outputs": [], "outputs": [],
"source": [ "source": [
"# 宽高缩放比为0.5\n", "# 宽高缩放比为0.5\n",
"!python opencv_webcam.py -isasf -isrf -rrf 0.5 # 自动版\n", "!python opencv_webcam.py -isasf -isrf -rrf 0.5 # 自动版"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "72f49465-8306-4e86-9e1a-4203588f3abf",
"metadata": {},
"outputs": [],
"source": [
"!python opencv_webcam.py -ishsf -isrf -rrf 0.5 # 手动版" "!python opencv_webcam.py -ishsf -isrf -rrf 0.5 # 手动版"
] ]
}, },
@ -328,7 +382,16 @@
"outputs": [], "outputs": [],
"source": [ "source": [
"# 设置JPG质量为100默认为95\n", "# 设置JPG质量为100默认为95\n",
"!python opencv_webcam.py -isasf -fss jpg -jq 100\n", "!python opencv_webcam.py -isasf -fss jpg -jq 100"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "67bc819d-73ee-41bb-b8ed-6148f6476c24",
"metadata": {},
"outputs": [],
"source": [
"# 设置PNG质量为5默认为3\n", "# 设置PNG质量为5默认为3\n",
"!python opencv_webcam.py -isasf -fss png -jq 5" "!python opencv_webcam.py -isasf -fss png -jq 5"
] ]
@ -390,10 +453,28 @@
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
"# 日志文件默认保存在项目根目录test.log\n", "# 日志文件默认保存在项目根目录ows.log\n",
"!python opencv_webcam.py\n", "!python opencv_webcam.py"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "9bb60da5-3ac2-4fc7-acbd-912bfe7f1b3a",
"metadata": {},
"outputs": [],
"source": [
"# 设置日志文件名称及类型,类型包括.log、.txt、.data\n", "# 设置日志文件名称及类型,类型包括.log、.txt、.data\n",
"!python opencv_webcam.py -ln test02.txt\n", "!python opencv_webcam.py -ln ows.txt"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "43215afb-c557-47b1-905e-bfa69a77e6b2",
"metadata": {},
"outputs": [],
"source": [
"# 设置日志保存方式,,默认为追加模式\n", "# 设置日志保存方式,,默认为追加模式\n",
"!python opencv_webcam.py -lm w # 设置为覆盖模式" "!python opencv_webcam.py -lm w # 设置为覆盖模式"
] ]
@ -413,14 +494,50 @@
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
"# 常规压缩默认test.zip以自动版为例\n", "# 常规压缩默认ows.zip以自动版为例\n",
"!python opencv_webcam.py -isasf -isc\n", "!python opencv_webcam.py -isasf -isc"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "aa58d33a-2e14-4d16-9c39-e81d9aef24a8",
"metadata": {},
"outputs": [],
"source": [
"# 自定义压缩文件名称\n", "# 自定义压缩文件名称\n",
"!python opencv_webcam.py -isasf -isc -cn test02\n", "!python opencv_webcam.py -isasf -isc -cn ows02"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "3fa65a77-f240-4a80-bf8b-3eadea172798",
"metadata": {},
"outputs": [],
"source": [
"# 自动命名压缩文件\n", "# 自动命名压缩文件\n",
"!python opencv_webcam.py -isasf -isc -isacn\n", "!python opencv_webcam.py -isasf -isc -isacn"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "0db6b23c-9bd8-4c3f-9917-d0a91a354d7b",
"metadata": {},
"outputs": [],
"source": [
"# 自定义压缩模式,默认为写覆盖\n", "# 自定义压缩模式,默认为写覆盖\n",
"!python opencv_webcam.py -isasf -isc -cm a # 追加模式(a模式仅限zip)\n", "!python opencv_webcam.py -isasf -isc -cm a # 追加模式(a模式仅限zip) 注该指令仅限v0.4"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "cc582e63-ec28-4ecb-892c-d91a835cdb18",
"metadata": {},
"outputs": [],
"source": [
"!python opencv_webcam.py -isasf -isc -cs tar -cm w:gz # tar压缩" "!python opencv_webcam.py -isasf -isc -cs tar -cm w:gz # tar压缩"
] ]
}, },

1
v05.md
View File

@ -14,3 +14,4 @@
- 修复README Emoji显示问题 - 修复README Emoji显示问题
- 更改日志默认保存名称 - 更改日志默认保存名称
- 更改压缩文件默认保存名称 - 更改压缩文件默认保存名称
- 对Jupyter版指令进行单元化管理