一起养成写作习惯!这是我参与「掘金日新计划 · 4 月更文挑战」的第13天,点击查看活动详情。
🎉 声明: 作为全网 AI 领域 干货最多的博主之一,❤️ 不负光阴不负卿 ❤️
-
🍊 👋 Follow me 👋,一起 Get 更多有趣 AI 🚀 🚀
hough line transform【霍夫线变换】
运行该代码:
cd ../hough_line_transform/
cp ../../../../data/sudoku.png .
# 运行代码:
python hough_line_transform.py
python probabilistic_hough_line_transform.py
输入:
程序输出如下:
match_template.py【模板匹配】
运行该代码:
cd opencv/samples/python/tutorial_code/imgProc/match_template
# 没有找到 匹配的 三张 图片 作为 输入,因此测试失败
python match_template.py lena.jpg lena_tmpl.jpg mask.png
morphology transformations【使用形态学转换提取水平和垂直线示例代码】
运行代码【 Extract edges and smooth image according to the logic 】:
cd ../morph_lines_detection/
python morph_lines_detection.py ../../../../data/ml.png
运行效果如下:
Morphology Transformations Demo 【设置动态调节】
运行代码:
cd ../opening_closing_hats/
python morphology_2.py --input ../../../../data/LinuxLogo.jpg
运行效果如下:
Zoom In-Out demo 【放大缩小】
运行代码:
cd ../Pyramids/
cp ../../../../data/LinuxLogo.jpg .
python pyramids.py LinuxLogo.jpg
运行效果如下:
平滑模糊处理 【模糊渐变】
运行代码:
cd ../Smoothing/
cp ../../../../data/lena.jpg .
python smoothing.py lena.jpg
运行效果如下:
Convert the image to Gray【基础的阈值操作 -- 控制效果】
运行代码:
cd ../threshold
python threshold.py --input ../../../../data/stuff.jpg
运行效果如下:
致谢:当前阶段学习总结
用了大概三天时间,把 opencv-master4.5.1 Python 模块下 tutorial_code 测试程序简单过了一遍; 这个事情未必见的就有多大的收益,我觉得它的作用在于让我对 opencv 针对图像能够完成的子操作有了初阶段的认识; 感谢查阅至此...
博主简介:软件工程硕士、已毕业、马上 10w 读者 粉丝
- 🍊 计算机视觉:超分重建、图像修复、目标检测、风格迁移 等领域 稍有所学
- 🍊 AI 工程化:Ncnn、MNN、TensorRT 正在 学习
- 🍊 C++、Python、Java 略懂一二
- 🍊 👋 Follow me 👋,一起 Get 更多有趣 AI、实战博文教程、冲冲冲 🚀 🚀
喜欢请关注 墨理学AI 及其 同名 公众号 墨理学AI
取经路上,让墨理学AI 陪你畅享更多有趣AI