From d0a797559ff76eedd6591e4d9e5aa25a167b5eb4 Mon Sep 17 00:00:00 2001 From: feilong Date: Fri, 25 Mar 2022 22:37:35 +0800 Subject: [PATCH] add requirements --- README.md | 2 +- .../1.OpenCV\347\256\200\344\273\213/helloworld.md" | 3 ++- .../ball.md" | 6 ++++-- .../hack.md" | 6 ++++-- .../4.IO\344\270\216GUI/doodle.md" | 3 ++- .../4.IO\344\270\216GUI/img_buffer_convert.md" | 3 ++- .../4.IO\344\270\216GUI/img_read_write.md" | 6 ++++-- .../4.IO\344\270\216GUI/video_read_write.md" | 3 ++- .../erosion_dilation.md" | 3 ++- .../close.md" | 3 ++- .../open.md" | 3 ++- .../connect.md" | 5 +++-- .../5.\350\275\256\345\273\223/Contours.md" | 3 ++- .../flower.md" | 3 ++- .../fish.md" | 3 ++- .../4.\346\242\257\345\272\246/Gradient.md" | 3 ++- .../Affine1.md" | 3 ++- .../rust_face.md" | 9 ++++++--- .../harris.md" | 6 ++++-- .../match.md" | 3 ++- .../face_detect.md" | 6 ++++-- .../detect_bird.md" | 3 ++- .../1.\345\205\211\346\265\201/flow.md" | 3 ++- .../obj_tracker.md" | 9 ++++++--- .../classification.md" | 6 ++++-- .../opencv-yolo-inference-vehicle.md" | 3 ++- requirement.txt | 2 -- requirements.txt | 2 ++ 28 files changed, 74 insertions(+), 39 deletions(-) delete mode 100644 requirement.txt create mode 100644 requirements.txt diff --git a/README.md b/README.md index 22a532a..cd5a94f 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# skill_tree_opencv +# skill_tree_git_md_linux `OpenCV技能树`是[技能森林](https://gitcode.net/csdn/skill_tree)的一部分。 diff --git "a/data/1.OpenCV\345\210\235\351\230\266/1.OpenCV\345\237\272\347\241\200/1.OpenCV\347\256\200\344\273\213/helloworld.md" "b/data/1.OpenCV\345\210\235\351\230\266/1.OpenCV\345\237\272\347\241\200/1.OpenCV\347\256\200\344\273\213/helloworld.md" index b3b6fc6..923846c 100644 --- "a/data/1.OpenCV\345\210\235\351\230\266/1.OpenCV\345\237\272\347\241\200/1.OpenCV\347\256\200\344\273\213/helloworld.md" +++ "b/data/1.OpenCV\345\210\235\351\230\266/1.OpenCV\345\237\272\347\241\200/1.OpenCV\347\256\200\344\273\213/helloworld.md" @@ -1,6 +1,7 @@ # Hello World -![](https://gitcode.net/csdn/skill_tree_opencv/-/raw/master/data/1.OpenCV%E5%88%9D%E9%98%B6/1.OpenCV%E5%9F%BA%E7%A1%80/1.OpenCV%E7%AE%80%E4%BB%8B/lena.png) +![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.OpenCV%E5%88%9D%E9%98%B6/1.OpenCV%E5%9F%BA%E7%A1%80/1.OpenCV%E7%AE%80%E4%BB%8B/lena.png) +
以下 `Hello World` 程序中,能够正确执行下述操作的是? diff --git "a/data/1.OpenCV\345\210\235\351\230\266/1.OpenCV\345\237\272\347\241\200/3.\345\233\276\345\203\217\347\232\204\345\237\272\346\234\254\346\223\215\344\275\234/ball.md" "b/data/1.OpenCV\345\210\235\351\230\266/1.OpenCV\345\237\272\347\241\200/3.\345\233\276\345\203\217\347\232\204\345\237\272\346\234\254\346\223\215\344\275\234/ball.md" index 92d2a49..e1126fe 100644 --- "a/data/1.OpenCV\345\210\235\351\230\266/1.OpenCV\345\237\272\347\241\200/3.\345\233\276\345\203\217\347\232\204\345\237\272\346\234\254\346\223\215\344\275\234/ball.md" +++ "b/data/1.OpenCV\345\210\235\351\230\266/1.OpenCV\345\237\272\347\241\200/3.\345\233\276\345\203\217\347\232\204\345\237\272\346\234\254\346\223\215\344\275\234/ball.md" @@ -2,11 +2,13 @@ 使用 OpenCV 可以方便的剪切粘贴图像上的区域。例如下图是梅西在踢足球 -![](https://gitcode.net/csdn/skill_tree_opencv/-/raw/master/data/1.OpenCV初阶/1.OpenCV基础/3.图像的基本操作/ball.jpg) +![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.OpenCV初阶/1.OpenCV基础/3.图像的基本操作/ball.jpg) +
通过剪切粘贴可以获得足球连续运行的轨迹 -![](https://gitcode.net/csdn/skill_tree_opencv/-/raw/master/data/1.OpenCV初阶/1.OpenCV基础/3.图像的基本操作/ball_continue.jpg) +![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.OpenCV初阶/1.OpenCV基础/3.图像的基本操作/ball_continue.jpg) +
实现代码如下,需要补全TODO部分: diff --git "a/data/1.OpenCV\345\210\235\351\230\266/1.OpenCV\345\237\272\347\241\200/3.\345\233\276\345\203\217\347\232\204\345\237\272\346\234\254\346\223\215\344\275\234/hack.md" "b/data/1.OpenCV\345\210\235\351\230\266/1.OpenCV\345\237\272\347\241\200/3.\345\233\276\345\203\217\347\232\204\345\237\272\346\234\254\346\223\215\344\275\234/hack.md" index 94d2934..c6b382e 100644 --- "a/data/1.OpenCV\345\210\235\351\230\266/1.OpenCV\345\237\272\347\241\200/3.\345\233\276\345\203\217\347\232\204\345\237\272\346\234\254\346\223\215\344\275\234/hack.md" +++ "b/data/1.OpenCV\345\210\235\351\230\266/1.OpenCV\345\237\272\347\241\200/3.\345\233\276\345\203\217\347\232\204\345\237\272\346\234\254\346\223\215\344\275\234/hack.md" @@ -1,6 +1,7 @@ # 图片黑客帝国化 -![](https://gitcode.net/csdn/skill_tree_opencv/-/raw/master/data/1.OpenCV初阶/1.OpenCV基础/3.图像的基本操作/hack.jpg) +![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.OpenCV初阶/1.OpenCV基础/3.图像的基本操作/hack.jpg) +
黑客帝国的图片风格偏绿色,任意图片的每个像素(r,g,b)经过公式转换后即可获得一张“黑客帝国风格图片”: @@ -10,7 +11,8 @@ 我们对`lena`图片也做黑客帝国风格化处理: -![](https://gitcode.net/csdn/skill_tree_opencv/-/raw/master/data/1.OpenCV初阶/1.OpenCV基础/3.图像的基本操作/lena_hack.jpg) +![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.OpenCV初阶/1.OpenCV基础/3.图像的基本操作/lena_hack.jpg) +
框架代码如下: diff --git "a/data/1.OpenCV\345\210\235\351\230\266/1.OpenCV\345\237\272\347\241\200/4.IO\344\270\216GUI/doodle.md" "b/data/1.OpenCV\345\210\235\351\230\266/1.OpenCV\345\237\272\347\241\200/4.IO\344\270\216GUI/doodle.md" index ffbc72d..0effce2 100644 --- "a/data/1.OpenCV\345\210\235\351\230\266/1.OpenCV\345\237\272\347\241\200/4.IO\344\270\216GUI/doodle.md" +++ "b/data/1.OpenCV\345\210\235\351\230\266/1.OpenCV\345\237\272\347\241\200/4.IO\344\270\216GUI/doodle.md" @@ -1,6 +1,7 @@ # 矩形涂鸦画板 -![](https://gitcode.net/csdn/skill_tree_opencv/-/raw/master/data/1.OpenCV初阶/1.OpenCV基础/4.IO与GUI/doodle.png) +![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.OpenCV初阶/1.OpenCV基础/4.IO与GUI/doodle.png) +
编写一个矩形涂鸦画板,实现功能: diff --git "a/data/1.OpenCV\345\210\235\351\230\266/1.OpenCV\345\237\272\347\241\200/4.IO\344\270\216GUI/img_buffer_convert.md" "b/data/1.OpenCV\345\210\235\351\230\266/1.OpenCV\345\237\272\347\241\200/4.IO\344\270\216GUI/img_buffer_convert.md" index 05b70ac..9429e31 100644 --- "a/data/1.OpenCV\345\210\235\351\230\266/1.OpenCV\345\237\272\347\241\200/4.IO\344\270\216GUI/img_buffer_convert.md" +++ "b/data/1.OpenCV\345\210\235\351\230\266/1.OpenCV\345\237\272\347\241\200/4.IO\344\270\216GUI/img_buffer_convert.md" @@ -2,7 +2,8 @@ 如下的一只甲壳虫,我们希望把它编码成 Base64,再从Base64解码出来。 -![](https://gitcode.net/csdn/skill_tree_opencv/-/raw/master/data/1.OpenCV初阶/1.OpenCV基础/4.IO与GUI/bug.jpg) +![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.OpenCV初阶/1.OpenCV基础/4.IO与GUI/bug.jpg) +
代码框架如下: diff --git "a/data/1.OpenCV\345\210\235\351\230\266/1.OpenCV\345\237\272\347\241\200/4.IO\344\270\216GUI/img_read_write.md" "b/data/1.OpenCV\345\210\235\351\230\266/1.OpenCV\345\237\272\347\241\200/4.IO\344\270\216GUI/img_read_write.md" index 9dfa024..801876a 100644 --- "a/data/1.OpenCV\345\210\235\351\230\266/1.OpenCV\345\237\272\347\241\200/4.IO\344\270\216GUI/img_read_write.md" +++ "b/data/1.OpenCV\345\210\235\351\230\266/1.OpenCV\345\237\272\347\241\200/4.IO\344\270\216GUI/img_read_write.md" @@ -2,11 +2,13 @@ 一只甲壳虫想组个乐队,但是临时找不到队友。请使用 OpenCV 读取下面的彩色甲壳虫图片 `'bug.jpg'`,帮助他变身灰色甲壳虫,然后完成组队。 -![](https://gitcode.net/csdn/skill_tree_opencv/-/raw/master/data/1.OpenCV初阶/1.OpenCV基础/4.IO与GUI/bug.jpg) +![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.OpenCV初阶/1.OpenCV基础/4.IO与GUI/bug.jpg) +
**显示甲壳虫乐队并写入到 `'bug_band.jpg'`**: -![](https://gitcode.net/csdn/skill_tree_opencv/-/raw/master/data/1.OpenCV初阶/1.OpenCV基础/4.IO与GUI/bug_band.jpg) +![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.OpenCV初阶/1.OpenCV基础/4.IO与GUI/bug_band.jpg) +
以下实现正确的是? diff --git "a/data/1.OpenCV\345\210\235\351\230\266/1.OpenCV\345\237\272\347\241\200/4.IO\344\270\216GUI/video_read_write.md" "b/data/1.OpenCV\345\210\235\351\230\266/1.OpenCV\345\237\272\347\241\200/4.IO\344\270\216GUI/video_read_write.md" index 40196ff..ff36d26 100644 --- "a/data/1.OpenCV\345\210\235\351\230\266/1.OpenCV\345\237\272\347\241\200/4.IO\344\270\216GUI/video_read_write.md" +++ "b/data/1.OpenCV\345\210\235\351\230\266/1.OpenCV\345\237\272\347\241\200/4.IO\344\270\216GUI/video_read_write.md" @@ -4,7 +4,8 @@ 这是跟镜像合影的效果: -![](https://gitcode.net/csdn/skill_tree_opencv/-/raw/master/data/1.OpenCV初阶/1.OpenCV基础/4.IO与GUI/birds_concat.gif) +![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.OpenCV初阶/1.OpenCV基础/4.IO与GUI/birds_concat.gif) +
基本的实现代码如下,合影每10帧采样一次: diff --git "a/data/1.OpenCV\345\210\235\351\230\266/2.\344\272\214\345\200\274\345\233\276\345\203\217\345\244\204\347\220\206/2.\350\205\220\350\232\200\344\270\216\350\206\250\350\203\200/erosion_dilation.md" "b/data/1.OpenCV\345\210\235\351\230\266/2.\344\272\214\345\200\274\345\233\276\345\203\217\345\244\204\347\220\206/2.\350\205\220\350\232\200\344\270\216\350\206\250\350\203\200/erosion_dilation.md" index 692c871..e04c379 100644 --- "a/data/1.OpenCV\345\210\235\351\230\266/2.\344\272\214\345\200\274\345\233\276\345\203\217\345\244\204\347\220\206/2.\350\205\220\350\232\200\344\270\216\350\206\250\350\203\200/erosion_dilation.md" +++ "b/data/1.OpenCV\345\210\235\351\230\266/2.\344\272\214\345\200\274\345\233\276\345\203\217\345\244\204\347\220\206/2.\350\205\220\350\232\200\344\270\216\350\206\250\350\203\200/erosion_dilation.md" @@ -6,7 +6,8 @@ OpenCV的膨胀与腐蚀,让“普通鸬鹚”不普通,下图从左到右 * 原图经过腐蚀得到的图 * 原图经过膨胀得到的图 -![](https://gitcode.net/csdn/skill_tree_opencv/-/raw/master/data/1.OpenCV初阶/2.二值图像处理/2.腐蚀与膨胀/bird_erosion_dilation.jpeg) +![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.OpenCV初阶/2.二值图像处理/2.腐蚀与膨胀/bird_erosion_dilation.jpeg) +
下面对腐蚀和膨胀实现代码正确的是? diff --git "a/data/1.OpenCV\345\210\235\351\230\266/2.\344\272\214\345\200\274\345\233\276\345\203\217\345\244\204\347\220\206/3.\345\274\200\350\277\220\347\256\227\344\270\216\351\227\255\350\277\220\347\256\227/close.md" "b/data/1.OpenCV\345\210\235\351\230\266/2.\344\272\214\345\200\274\345\233\276\345\203\217\345\244\204\347\220\206/3.\345\274\200\350\277\220\347\256\227\344\270\216\351\227\255\350\277\220\347\256\227/close.md" index d0e2faa..06850f3 100644 --- "a/data/1.OpenCV\345\210\235\351\230\266/2.\344\272\214\345\200\274\345\233\276\345\203\217\345\244\204\347\220\206/3.\345\274\200\350\277\220\347\256\227\344\270\216\351\227\255\350\277\220\347\256\227/close.md" +++ "b/data/1.OpenCV\345\210\235\351\230\266/2.\344\272\214\345\200\274\345\233\276\345\203\217\345\244\204\347\220\206/3.\345\274\200\350\277\220\347\256\227\344\270\216\351\227\255\350\277\220\347\256\227/close.md" @@ -2,7 +2,8 @@ OpenCV 里先膨胀再腐蚀操作叫做“闭运算”。小鸊鷉(pi ti)的名片被小朋友画了几笔,尝试通过先膨胀再腐蚀修复,完成任务 -![](https://gitcode.net/csdn/skill_tree_opencv/-/raw/master/data/1.OpenCV初阶/2.二值图像处理/3.开运算与闭运算/img_closed.jpeg) +![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.OpenCV初阶/2.二值图像处理/3.开运算与闭运算/img_closed.jpeg) +
框架代码如下: diff --git "a/data/1.OpenCV\345\210\235\351\230\266/2.\344\272\214\345\200\274\345\233\276\345\203\217\345\244\204\347\220\206/3.\345\274\200\350\277\220\347\256\227\344\270\216\351\227\255\350\277\220\347\256\227/open.md" "b/data/1.OpenCV\345\210\235\351\230\266/2.\344\272\214\345\200\274\345\233\276\345\203\217\345\244\204\347\220\206/3.\345\274\200\350\277\220\347\256\227\344\270\216\351\227\255\350\277\220\347\256\227/open.md" index 108113a..05c74af 100644 --- "a/data/1.OpenCV\345\210\235\351\230\266/2.\344\272\214\345\200\274\345\233\276\345\203\217\345\244\204\347\220\206/3.\345\274\200\350\277\220\347\256\227\344\270\216\351\227\255\350\277\220\347\256\227/open.md" +++ "b/data/1.OpenCV\345\210\235\351\230\266/2.\344\272\214\345\200\274\345\233\276\345\203\217\345\244\204\347\220\206/3.\345\274\200\350\277\220\347\256\227\344\270\216\351\227\255\350\277\220\347\256\227/open.md" @@ -2,7 +2,8 @@ OpenCV 里先腐蚀再膨胀操作叫做“开运算”。小鸊鷉(pi ti)的名片被小朋友画了几笔,尝试通过先腐蚀再膨胀修复,效果不明显 -![](https://gitcode.net/csdn/skill_tree_opencv/-/raw/master/data/1.OpenCV初阶/2.二值图像处理/3.开运算与闭运算/img_opened.jpeg) +![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.OpenCV初阶/2.二值图像处理/3.开运算与闭运算/img_opened.jpeg) +
框架代码如下: diff --git "a/data/1.OpenCV\345\210\235\351\230\266/2.\344\272\214\345\200\274\345\233\276\345\203\217\345\244\204\347\220\206/4.\350\277\236\351\200\232\345\214\272\345\237\237\345\210\206\346\236\220/connect.md" "b/data/1.OpenCV\345\210\235\351\230\266/2.\344\272\214\345\200\274\345\233\276\345\203\217\345\244\204\347\220\206/4.\350\277\236\351\200\232\345\214\272\345\237\237\345\210\206\346\236\220/connect.md" index 966e67f..e66110d 100644 --- "a/data/1.OpenCV\345\210\235\351\230\266/2.\344\272\214\345\200\274\345\233\276\345\203\217\345\244\204\347\220\206/4.\350\277\236\351\200\232\345\214\272\345\237\237\345\210\206\346\236\220/connect.md" +++ "b/data/1.OpenCV\345\210\235\351\230\266/2.\344\272\214\345\200\274\345\233\276\345\203\217\345\244\204\347\220\206/4.\350\277\236\351\200\232\345\214\272\345\237\237\345\210\206\346\236\220/connect.md" @@ -2,11 +2,12 @@ OpenCV 里的连通区域分析可以将具有相同像素值且位置相邻的前景像素点组成的图像区域识别出来。有两种像素相邻的定义: -![](https://gitcode.net/csdn/skill_tree_opencv/-/raw/master/data/1.OpenCV初阶/2.二值图像处理/4.连通区域分析/pixel_region.jpg) +![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.OpenCV初阶/2.二值图像处理/4.连通区域分析/pixel_region.jpg) +
通过OpenCV的连通区域分析算法,我们可以将下图的水鸭子的外框框出来: -![](https://gitcode.net/csdn/skill_tree_opencv/-/raw/master/data/1.OpenCV初阶/2.二值图像处理/4.连通区域分析/duck_box.png) +![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.OpenCV初阶/2.二值图像处理/4.连通区域分析/duck_box.png) 框架代码如下: diff --git "a/data/1.OpenCV\345\210\235\351\230\266/2.\344\272\214\345\200\274\345\233\276\345\203\217\345\244\204\347\220\206/5.\350\275\256\345\273\223/Contours.md" "b/data/1.OpenCV\345\210\235\351\230\266/2.\344\272\214\345\200\274\345\233\276\345\203\217\345\244\204\347\220\206/5.\350\275\256\345\273\223/Contours.md" index 0bc998c..5014ae3 100644 --- "a/data/1.OpenCV\345\210\235\351\230\266/2.\344\272\214\345\200\274\345\233\276\345\203\217\345\244\204\347\220\206/5.\350\275\256\345\273\223/Contours.md" +++ "b/data/1.OpenCV\345\210\235\351\230\266/2.\344\272\214\345\200\274\345\233\276\345\203\217\345\244\204\347\220\206/5.\350\275\256\345\273\223/Contours.md" @@ -17,7 +17,8 @@ cv.findContours(image, mode, method[, contours[, hierarchy[, offset]]] ) → con * 康熙御笔碑帖图 * 康熙御笔轮廓图 -![](https://gitcode.net/csdn/skill_tree_opencv/-/raw/master/data/1.OpenCV初阶/2.二值图像处理/5.轮廓/ContuorsOutput.jpg) +![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.OpenCV初阶/2.二值图像处理/5.轮廓/ContuorsOutput.jpg) +
下面对康熙御笔寻找轮廓实现代码正确的是? diff --git "a/data/1.OpenCV\345\210\235\351\230\266/3.\345\233\276\345\203\217\345\242\236\345\274\272\345\222\214\346\273\244\346\263\242/1.\345\275\251\350\211\262\347\251\272\351\227\264/flower.md" "b/data/1.OpenCV\345\210\235\351\230\266/3.\345\233\276\345\203\217\345\242\236\345\274\272\345\222\214\346\273\244\346\263\242/1.\345\275\251\350\211\262\347\251\272\351\227\264/flower.md" index 909ca21..84411b8 100644 --- "a/data/1.OpenCV\345\210\235\351\230\266/3.\345\233\276\345\203\217\345\242\236\345\274\272\345\222\214\346\273\244\346\263\242/1.\345\275\251\350\211\262\347\251\272\351\227\264/flower.md" +++ "b/data/1.OpenCV\345\210\235\351\230\266/3.\345\233\276\345\203\217\345\242\236\345\274\272\345\222\214\346\273\244\346\263\242/1.\345\275\251\350\211\262\347\251\272\351\227\264/flower.md" @@ -2,7 +2,8 @@ OpenCV 的颜色空间主要有 BGR、HSV、Lab等,`cvtColor` 函数可以让图像在不同颜色空间转换。例如通过将花的图像转换到 HSV 颜色空间,在HSV空间内过滤出只含有花瓣颜色的像素,从而提取出花瓣。 -![](https://gitcode.net/csdn/skill_tree_opencv/-/raw/master/data/1.OpenCV初阶/3.图像增强和滤波/1.彩色空间/flower_only.jpeg) +![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.OpenCV初阶/3.图像增强和滤波/1.彩色空间/flower_only.jpeg) +
以下实现正确的是? diff --git "a/data/1.OpenCV\345\210\235\351\230\266/3.\345\233\276\345\203\217\345\242\236\345\274\272\345\222\214\346\273\244\346\263\242/2.\347\233\264\346\226\271\345\233\276\345\235\207\350\241\241\345\214\226/fish.md" "b/data/1.OpenCV\345\210\235\351\230\266/3.\345\233\276\345\203\217\345\242\236\345\274\272\345\222\214\346\273\244\346\263\242/2.\347\233\264\346\226\271\345\233\276\345\235\207\350\241\241\345\214\226/fish.md" index 54c37a0..7689180 100644 --- "a/data/1.OpenCV\345\210\235\351\230\266/3.\345\233\276\345\203\217\345\242\236\345\274\272\345\222\214\346\273\244\346\263\242/2.\347\233\264\346\226\271\345\233\276\345\235\207\350\241\241\345\214\226/fish.md" +++ "b/data/1.OpenCV\345\210\235\351\230\266/3.\345\233\276\345\203\217\345\242\236\345\274\272\345\222\214\346\273\244\346\263\242/2.\347\233\264\346\226\271\345\233\276\345\235\207\350\241\241\345\214\226/fish.md" @@ -2,7 +2,8 @@ 通过调整图像的直方图调整图像的整体细节,下图左图是浑水鱼,右边清澈鱼。 -![](https://gitcode.net/csdn/skill_tree_opencv/-/raw/master/data/1.OpenCV初阶/3.图像增强和滤波/2.直方图均衡化/fish_enhance.jpeg) +![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.OpenCV初阶/3.图像增强和滤波/2.直方图均衡化/fish_enhance.jpeg) +
框架代码如下: diff --git "a/data/1.OpenCV\345\210\235\351\230\266/3.\345\233\276\345\203\217\345\242\236\345\274\272\345\222\214\346\273\244\346\263\242/4.\346\242\257\345\272\246/Gradient.md" "b/data/1.OpenCV\345\210\235\351\230\266/3.\345\233\276\345\203\217\345\242\236\345\274\272\345\222\214\346\273\244\346\263\242/4.\346\242\257\345\272\246/Gradient.md" index 3ac583a..9209db4 100644 --- "a/data/1.OpenCV\345\210\235\351\230\266/3.\345\233\276\345\203\217\345\242\236\345\274\272\345\222\214\346\273\244\346\263\242/4.\346\242\257\345\272\246/Gradient.md" +++ "b/data/1.OpenCV\345\210\235\351\230\266/3.\345\233\276\345\203\217\345\242\236\345\274\272\345\222\214\346\273\244\346\263\242/4.\346\242\257\345\272\246/Gradient.md" @@ -14,7 +14,8 @@ cv.Sobel(src, ddepth, dx, dy[, dst[, ksize[, scale[, delta[, borderType]]]]]) 我们用 Sobel 算子从 Lena 图像提取边缘,看看会产生什么样的效果吧。 -![](https://gitcode.net/csdn/skill_tree_opencv/-/raw/master/data/1.OpenCV初阶/3.图像增强和滤波/4.梯度/gradientOutput.png) +![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.OpenCV初阶/3.图像增强和滤波/4.梯度/gradientOutput.png) +
下面对 Sobel 梯度算子实现代码正确的是? diff --git "a/data/1.OpenCV\345\210\235\351\230\266/4.\345\207\240\344\275\225\345\217\230\346\215\242\345\222\214\345\233\276\345\203\217\347\211\271\345\276\201/1.\344\273\277\345\260\204\345\217\230\346\215\242/Affine1.md" "b/data/1.OpenCV\345\210\235\351\230\266/4.\345\207\240\344\275\225\345\217\230\346\215\242\345\222\214\345\233\276\345\203\217\347\211\271\345\276\201/1.\344\273\277\345\260\204\345\217\230\346\215\242/Affine1.md" index d030b96..d62efea 100644 --- "a/data/1.OpenCV\345\210\235\351\230\266/4.\345\207\240\344\275\225\345\217\230\346\215\242\345\222\214\345\233\276\345\203\217\347\211\271\345\276\201/1.\344\273\277\345\260\204\345\217\230\346\215\242/Affine1.md" +++ "b/data/1.OpenCV\345\210\235\351\230\266/4.\345\207\240\344\275\225\345\217\230\346\215\242\345\222\214\345\233\276\345\203\217\347\211\271\345\276\201/1.\344\273\277\345\260\204\345\217\230\346\215\242/Affine1.md" @@ -12,7 +12,8 @@ cv2.warpAffine(src, M, dsize[, dst[, flags[, borderMode[, borderValue]]]]) → d 旋转也是一种简单仿射变换,我们用变换矩阵将下面的色块图旋转一下,看看会产生什么样的效果吧。 -![](https://gitcode.net/csdn/skill_tree_opencv/-/raw/master/data/1.OpenCV初阶/4.几何变换和图像特征/1.仿射变换/affine2.png) +![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.OpenCV初阶/4.几何变换和图像特征/1.仿射变换/affine2.png) +
下面对仿射变换实现代码正确的是? diff --git "a/data/1.OpenCV\345\210\235\351\230\266/4.\345\207\240\344\275\225\345\217\230\346\215\242\345\222\214\345\233\276\345\203\217\347\211\271\345\276\201/2.\345\215\225\345\272\224\346\200\247\345\217\230\346\215\242/rust_face.md" "b/data/1.OpenCV\345\210\235\351\230\266/4.\345\207\240\344\275\225\345\217\230\346\215\242\345\222\214\345\233\276\345\203\217\347\211\271\345\276\201/2.\345\215\225\345\272\224\346\200\247\345\217\230\346\215\242/rust_face.md" index 60ac216..c4e91fd 100644 --- "a/data/1.OpenCV\345\210\235\351\230\266/4.\345\207\240\344\275\225\345\217\230\346\215\242\345\222\214\345\233\276\345\203\217\347\211\271\345\276\201/2.\345\215\225\345\272\224\346\200\247\345\217\230\346\215\242/rust_face.md" +++ "b/data/1.OpenCV\345\210\235\351\230\266/4.\345\207\240\344\275\225\345\217\230\346\215\242\345\222\214\345\233\276\345\203\217\347\211\271\345\276\201/2.\345\215\225\345\272\224\346\200\247\345\217\230\346\215\242/rust_face.md" @@ -2,17 +2,20 @@ 下图左边的参赛作品(图片来自网络)掉到地上,重新做太麻烦了,据说改了个《挤地铁》的名字获奖了。 -![](https://gitcode.net/csdn/skill_tree_opencv/-/raw/master/data/1.OpenCV初阶/4.几何变换和图像特征/2.单应性变换/rust_face_origin.jpeg) +![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.OpenCV初阶/4.几何变换和图像特征/2.单应性变换/rust_face_origin.jpeg) +
我们可以通过 OpenCV 单应性变换的方式帮助挤地铁的人脸还原。 把没挤扁和挤扁的图的坐标标注出来 -![](https://gitcode.net/csdn/skill_tree_opencv/-/raw/master/data/1.OpenCV初阶/4.几何变换和图像特征/2.单应性变换/rust_face_rule.jpg) +![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.OpenCV初阶/4.几何变换和图像特征/2.单应性变换/rust_face_rule.jpg) +
可以看到还原后的侧脸 -![](https://gitcode.net/csdn/skill_tree_opencv/-/raw/master/data/1.OpenCV初阶/4.几何变换和图像特征/2.单应性变换/rust_face_homography.jpeg) +![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.OpenCV初阶/4.几何变换和图像特征/2.单应性变换/rust_face_homography.jpeg) +
以下正确的实现是 diff --git "a/data/1.OpenCV\345\210\235\351\230\266/4.\345\207\240\344\275\225\345\217\230\346\215\242\345\222\214\345\233\276\345\203\217\347\211\271\345\276\201/3.\345\233\276\345\203\217\347\211\271\345\276\201\344\270\216\347\211\271\345\276\201\346\217\220\345\217\226/harris.md" "b/data/1.OpenCV\345\210\235\351\230\266/4.\345\207\240\344\275\225\345\217\230\346\215\242\345\222\214\345\233\276\345\203\217\347\211\271\345\276\201/3.\345\233\276\345\203\217\347\211\271\345\276\201\344\270\216\347\211\271\345\276\201\346\217\220\345\217\226/harris.md" index 3d10283..a4e5637 100644 --- "a/data/1.OpenCV\345\210\235\351\230\266/4.\345\207\240\344\275\225\345\217\230\346\215\242\345\222\214\345\233\276\345\203\217\347\211\271\345\276\201/3.\345\233\276\345\203\217\347\211\271\345\276\201\344\270\216\347\211\271\345\276\201\346\217\220\345\217\226/harris.md" +++ "b/data/1.OpenCV\345\210\235\351\230\266/4.\345\207\240\344\275\225\345\217\230\346\215\242\345\222\214\345\233\276\345\203\217\347\211\271\345\276\201/3.\345\233\276\345\203\217\347\211\271\345\276\201\344\270\216\347\211\271\345\276\201\346\217\220\345\217\226/harris.md" @@ -2,11 +2,13 @@ 下图是一个湖边的亭子,通过 OpenCV 的 Harris 特征提取可以提取到亭子的瓦片特征 -![](https://gitcode.net/csdn/skill_tree_opencv/-/raw/master/data/1.OpenCV初阶/4.几何变换和图像特征/3.图像特征与特征提取/tower.jpeg) +![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.OpenCV初阶/4.几何变换和图像特征/3.图像特征与特征提取/tower.jpeg) +
上图背景图里的植被的角点也会被 Harris 特征提取到,因此我们先用之前学习过的知识过滤出前景图后再做 Harris 特征提取,过程图片如下: -![](https://gitcode.net/csdn/skill_tree_opencv/-/raw/master/data/1.OpenCV初阶/4.几何变换和图像特征/3.图像特征与特征提取/tower_harris.jpeg) +![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.OpenCV初阶/4.几何变换和图像特征/3.图像特征与特征提取/tower_harris.jpeg) +
框架代码如下 diff --git "a/data/1.OpenCV\345\210\235\351\230\266/4.\345\207\240\344\275\225\345\217\230\346\215\242\345\222\214\345\233\276\345\203\217\347\211\271\345\276\201/4.\347\211\271\345\276\201\345\214\271\351\205\215/match.md" "b/data/1.OpenCV\345\210\235\351\230\266/4.\345\207\240\344\275\225\345\217\230\346\215\242\345\222\214\345\233\276\345\203\217\347\211\271\345\276\201/4.\347\211\271\345\276\201\345\214\271\351\205\215/match.md" index 0539743..49eb262 100644 --- "a/data/1.OpenCV\345\210\235\351\230\266/4.\345\207\240\344\275\225\345\217\230\346\215\242\345\222\214\345\233\276\345\203\217\347\211\271\345\276\201/4.\347\211\271\345\276\201\345\214\271\351\205\215/match.md" +++ "b/data/1.OpenCV\345\210\235\351\230\266/4.\345\207\240\344\275\225\345\217\230\346\215\242\345\222\214\345\233\276\345\203\217\347\211\271\345\276\201/4.\347\211\271\345\276\201\345\214\271\351\205\215/match.md" @@ -2,7 +2,8 @@ 通过特征匹配,可以把亭子和水中的倒影做特征匹配 -![](https://gitcode.net/csdn/skill_tree_opencv/-/raw/master/data/1.OpenCV初阶/4.几何变换和图像特征/4.特征匹配/tower_match.jpeg) +![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.OpenCV初阶/4.几何变换和图像特征/4.特征匹配/tower_match.jpeg) +
框架代码如下: diff --git "a/data/1.OpenCV\345\210\235\351\230\266/5.\345\233\276\345\203\217\350\257\206\345\210\253/1.\344\272\272\350\204\270\350\257\206\345\210\253/face_detect.md" "b/data/1.OpenCV\345\210\235\351\230\266/5.\345\233\276\345\203\217\350\257\206\345\210\253/1.\344\272\272\350\204\270\350\257\206\345\210\253/face_detect.md" index 5c9ec16..5337474 100644 --- "a/data/1.OpenCV\345\210\235\351\230\266/5.\345\233\276\345\203\217\350\257\206\345\210\253/1.\344\272\272\350\204\270\350\257\206\345\210\253/face_detect.md" +++ "b/data/1.OpenCV\345\210\235\351\230\266/5.\345\233\276\345\203\217\350\257\206\345\210\253/1.\344\272\272\350\204\270\350\257\206\345\210\253/face_detect.md" @@ -1,10 +1,12 @@ # 被挤压的地铁人脸检测 -![](https://gitcode.net/csdn/skill_tree_opencv/-/raw/master/data/1.OpenCV初阶/5.图像识别/1.人脸识别/fake_face.jpeg) +![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.OpenCV初阶/5.图像识别/1.人脸识别/fake_face.jpeg) +
即使是地铁挤压的人脸,也是有尊严的,值得被检测,经过 OpenCV 的努力,成功检测: -![](https://gitcode.net/csdn/skill_tree_opencv/-/raw/master/data/1.OpenCV初阶/5.图像识别/1.人脸识别/rust_face_detect.jpeg) +![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.OpenCV初阶/5.图像识别/1.人脸识别/rust_face_detect.jpeg) +
* 左图是正常被识别的人脸 diff --git "a/data/1.OpenCV\345\210\235\351\230\266/5.\345\233\276\345\203\217\350\257\206\345\210\253/2.\351\270\237\345\233\276\350\257\206\345\210\253/detect_bird.md" "b/data/1.OpenCV\345\210\235\351\230\266/5.\345\233\276\345\203\217\350\257\206\345\210\253/2.\351\270\237\345\233\276\350\257\206\345\210\253/detect_bird.md" index 5d5d753..9f3708e 100644 --- "a/data/1.OpenCV\345\210\235\351\230\266/5.\345\233\276\345\203\217\350\257\206\345\210\253/2.\351\270\237\345\233\276\350\257\206\345\210\253/detect_bird.md" +++ "b/data/1.OpenCV\345\210\235\351\230\266/5.\345\233\276\345\203\217\350\257\206\345\210\253/2.\351\270\237\345\233\276\350\257\206\345\210\253/detect_bird.md" @@ -2,7 +2,8 @@ 使用基本的OpenCV轮廓检测识别出野外拍摄照片里的鸟 -![](https://gitcode.net/csdn/skill_tree_opencv/-/raw/master/data/1.OpenCV初阶/5.图像识别/2.鸟图识别/birds_detect.jpeg) +![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.OpenCV初阶/5.图像识别/2.鸟图识别/birds_detect.jpeg) +
基本框架如下: diff --git "a/data/1.OpenCV\345\210\235\351\230\266/6.\350\247\206\351\242\221\345\210\206\346\236\220/1.\345\205\211\346\265\201/flow.md" "b/data/1.OpenCV\345\210\235\351\230\266/6.\350\247\206\351\242\221\345\210\206\346\236\220/1.\345\205\211\346\265\201/flow.md" index dea51b7..97aa6ef 100644 --- "a/data/1.OpenCV\345\210\235\351\230\266/6.\350\247\206\351\242\221\345\210\206\346\236\220/1.\345\205\211\346\265\201/flow.md" +++ "b/data/1.OpenCV\345\210\235\351\230\266/6.\350\247\206\351\242\221\345\210\206\346\236\220/1.\345\205\211\346\265\201/flow.md" @@ -2,7 +2,8 @@ 使用OpenCV光流分析,跟踪蚂蚁的轨迹 -![](https://gitcode.net/csdn/skill_tree_opencv/-/raw/master/data/1.OpenCV初阶/6.视频分析/1.光流/ant_flow.jpg) +![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.OpenCV初阶/6.视频分析/1.光流/ant_flow.jpg) +
代码框架: diff --git "a/data/1.OpenCV\345\210\235\351\230\266/6.\350\247\206\351\242\221\345\210\206\346\236\220/2.\347\233\256\346\240\207\350\267\237\350\270\252/obj_tracker.md" "b/data/1.OpenCV\345\210\235\351\230\266/6.\350\247\206\351\242\221\345\210\206\346\236\220/2.\347\233\256\346\240\207\350\267\237\350\270\252/obj_tracker.md" index c33864f..3e7cb05 100755 --- "a/data/1.OpenCV\345\210\235\351\230\266/6.\350\247\206\351\242\221\345\210\206\346\236\220/2.\347\233\256\346\240\207\350\267\237\350\270\252/obj_tracker.md" +++ "b/data/1.OpenCV\345\210\235\351\230\266/6.\350\247\206\351\242\221\345\210\206\346\236\220/2.\347\233\256\346\240\207\350\267\237\350\270\252/obj_tracker.md" @@ -1,14 +1,17 @@ # 目标跟踪(track by detection) -![](https://gitcode.net/csdn/skill_tree_opencv/-/raw/master/data/1.OpenCV初阶/6.视频分析/2.目标跟踪/pic/tracker.gif) +![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.OpenCV初阶/6.视频分析/2.目标跟踪/pic/tracker.gif) +
在视频分析(或视频结构化)应用开发中,多目标跟踪是非常重要的一个环节。它能有效弥补上一个目标检测环节中算法的不足,如检测算法输出坐标不稳定、漏检等。与此同时,跟踪算法输出的目标轨迹(track-id)对于应用下阶段的行为分析环节也有着至关重要的作用。下面是常见视频分析类应用系统结构: -![](https://gitcode.net/csdn/skill_tree_opencv/-/raw/master/data/1.OpenCV初阶/6.视频分析/2.目标跟踪/pic/video_process.png) +![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.OpenCV初阶/6.视频分析/2.目标跟踪/pic/video_process.png) +
目标检测算法输出单帧检测结果,目标跟踪算法负责将前后2帧中的目标关联起来、给予唯一标识track-id。假设t帧中检测到了M个目标,t+1帧中检测到了N个目标,跟踪算法本质上是M->N的匹配关联过程。 -![](https://gitcode.net/csdn/skill_tree_opencv/-/raw/master/data/1.OpenCV初阶/6.视频分析/2.目标跟踪/pic/t_and_t+1_match.png) +![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.OpenCV初阶/6.视频分析/2.目标跟踪/pic/t_and_t+1_match.png) +
匹配过程中,目标可以分为以下三大类: diff --git "a/data/1.OpenCV\345\210\235\351\230\266/7.OpenCV\344\270\255\347\232\204\346\267\261\345\272\246\345\255\246\344\271\240/1.\345\233\276\345\203\217\345\210\206\347\261\273/classification.md" "b/data/1.OpenCV\345\210\235\351\230\266/7.OpenCV\344\270\255\347\232\204\346\267\261\345\272\246\345\255\246\344\271\240/1.\345\233\276\345\203\217\345\210\206\347\261\273/classification.md" index 8cd513d..9b5b001 100755 --- "a/data/1.OpenCV\345\210\235\351\230\266/7.OpenCV\344\270\255\347\232\204\346\267\261\345\272\246\345\255\246\344\271\240/1.\345\233\276\345\203\217\345\210\206\347\261\273/classification.md" +++ "b/data/1.OpenCV\345\210\235\351\230\266/7.OpenCV\344\270\255\347\232\204\346\267\261\345\272\246\345\255\246\344\271\240/1.\345\233\276\345\203\217\345\210\206\347\261\273/classification.md" @@ -2,7 +2,8 @@ 图像分类是基于深度学习的计算机视觉任务中最简单、也是最基础的一类,它其中用到的CNN特征提取技术也是目标检测、目标分割等视觉任务的基础。 -![](https://gitcode.net/csdn/skill_tree_opencv/-/raw/master/data/1.OpenCV初阶/7.OpenCV中的深度学习/1.图像分类/result.png) +![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.OpenCV初阶/7.OpenCV中的深度学习/1.图像分类/result.png) +
具体到图像分类任务而言,其具体流程如下: @@ -11,7 +12,8 @@ 3. 利用全连接网络、或其他结构对高维特征进行分类,输出各目标分类的概率值(概率和为1) 4. 选择概率值最高的作为图像分类结果 -![](https://gitcode.net/csdn/skill_tree_opencv/-/raw/master/data/1.OpenCV初阶/7.OpenCV中的深度学习/1.图像分类/classification.png) +![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.OpenCV初阶/7.OpenCV中的深度学习/1.图像分类/classification.png) +
`opencv.dnn`模块可以直接加载深度学习模型,并进行推理输出运行结果。下面是opencv.dnn模块加载googlenet caffe模型进行图片分类的代码,请你完善其中TO-DO部分的代码。 diff --git "a/data/1.OpenCV\345\210\235\351\230\266/7.OpenCV\344\270\255\347\232\204\346\267\261\345\272\246\345\255\246\344\271\240/5.\350\275\246\350\276\206\346\243\200\346\265\213/opencv-yolo-inference-vehicle.md" "b/data/1.OpenCV\345\210\235\351\230\266/7.OpenCV\344\270\255\347\232\204\346\267\261\345\272\246\345\255\246\344\271\240/5.\350\275\246\350\276\206\346\243\200\346\265\213/opencv-yolo-inference-vehicle.md" index 879cb1c..adf70c9 100755 --- "a/data/1.OpenCV\345\210\235\351\230\266/7.OpenCV\344\270\255\347\232\204\346\267\261\345\272\246\345\255\246\344\271\240/5.\350\275\246\350\276\206\346\243\200\346\265\213/opencv-yolo-inference-vehicle.md" +++ "b/data/1.OpenCV\345\210\235\351\230\266/7.OpenCV\344\270\255\347\232\204\346\267\261\345\272\246\345\255\246\344\271\240/5.\350\275\246\350\276\206\346\243\200\346\265\213/opencv-yolo-inference-vehicle.md" @@ -2,7 +2,8 @@ `opencv.dnn`模块已经支持大部分格式的深度学习模型推理,该模块可以直接加载`tensorflow`、`darknet`、`pytorch`等常见深度学习框架训练出来的模型,并运行推理得到模型输出结果。`opecnv.dnn`模块已经作为一种模型部署方式,应用在工业落地实际场景中。 -![](https://gitcode.net/csdn/skill_tree_opencv/-/raw/master/data/1.OpenCV初阶/7.OpenCV中的深度学习/5.车辆检测/vehicle-detection.gif) +![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.OpenCV初阶/7.OpenCV中的深度学习/5.车辆检测/vehicle-detection.gif) +
模型具体加载和使用流程如下: diff --git a/requirement.txt b/requirement.txt deleted file mode 100644 index 64ed38e..0000000 --- a/requirement.txt +++ /dev/null @@ -1,2 +0,0 @@ -pre_commit~=2.16.0 -skill-tree-parser~=0.0.8 \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..650b949 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +pre_commit +skill-tree-parser \ No newline at end of file -- GitLab