提交 d0a79755 编写于 作者: F feilong

add requirements

上级 adcaaae1
# skill_tree_opencv
# skill_tree_git_md_linux
`OpenCV技能树`[技能森林](https://gitcode.net/csdn/skill_tree)的一部分。
......
# 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)
<br/>
以下 `Hello World` 程序中,能够正确执行下述操作的是?
......
......@@ -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)
<br/>
通过剪切粘贴可以获得足球连续运行的轨迹
![](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)
<br/>
实现代码如下,需要补全TODO部分:
......
# 图片黑客帝国化
![](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)
<br/>
黑客帝国的图片风格偏绿色,任意图片的每个像素(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)
<br/>
框架代码如下:
......
# 矩形涂鸦画板
![](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)
<br/>
编写一个矩形涂鸦画板,实现功能:
......
......@@ -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)
<br/>
代码框架如下:
......
......@@ -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)
<br/>
**显示甲壳虫乐队并写入到 `'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)
<br/>
以下实现正确的是?
......
......@@ -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)
<br/>
基本的实现代码如下,合影每10帧采样一次:
......
......@@ -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)
<br/>
下面对腐蚀和膨胀实现代码正确的是?
......
......@@ -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)
<br/>
框架代码如下:
......
......@@ -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)
<br/>
框架代码如下:
......
......@@ -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)
<br/>
通过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)
框架代码如下:
......
......@@ -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)
<br/>
下面对康熙御笔寻找轮廓实现代码正确的是?
......
......@@ -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)
<br/>
以下实现正确的是?
......
......@@ -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)
<br/>
框架代码如下:
......
......@@ -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)
<br/>
下面对 Sobel 梯度算子实现代码正确的是?
......
......@@ -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)
<br/>
下面对仿射变换实现代码正确的是?
......
......@@ -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)
<br/>
我们可以通过 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)
<br/>
可以看到还原后的侧脸
![](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)
<br/>
以下正确的实现是
......
......@@ -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)
<br/>
上图背景图里的植被的角点也会被 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)
<br/>
框架代码如下
......
......@@ -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)
<br/>
框架代码如下:
......
# 被挤压的地铁人脸检测
![](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)
<br/>
即使是地铁挤压的人脸,也是有尊严的,值得被检测,经过 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)
<br/>
* 左图是正常被识别的人脸
......
......@@ -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)
<br/>
基本框架如下:
......
......@@ -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)
<br/>
代码框架:
......
# 目标跟踪(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)
<br/>
在视频分析(或视频结构化)应用开发中,多目标跟踪是非常重要的一个环节。它能有效弥补上一个目标检测环节中算法的不足,如检测算法输出坐标不稳定、漏检等。与此同时,跟踪算法输出的目标轨迹(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)
<br/>
目标检测算法输出单帧检测结果,目标跟踪算法负责将前后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)
<br/>
匹配过程中,目标可以分为以下三大类:
......
......@@ -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)
<br/>
具体到图像分类任务而言,其具体流程如下:
......@@ -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)
<br/>
`opencv.dnn`模块可以直接加载深度学习模型,并进行推理输出运行结果。下面是opencv.dnn模块加载googlenet caffe模型进行图片分类的代码,请你完善其中TO-DO部分的代码。
......
......@@ -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)
<br/>
模型具体加载和使用流程如下:
......
pre_commit~=2.16.0
skill-tree-parser~=0.0.8
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册