赞
踩
本博文接上一篇博文,继续进行部分 opencv Python 示例代码运行 效果测试
环境搭建、所使用代码版本 —— 参考上一篇博文——Opencv基础使用1——分割 - 视频人像跟踪
opencv-master 4.5.1 Python 示例代码运行测试——拐角检测 | 轮廓检测
- 本博文的测试是直接拉取 opencv-master4.5.1,然后在opencv/samples/python/tutorial_code/ 目录下对不同模块 py 文件进行测试
运行代码一:
cd opencv/samples/python/tutorial_code/TrackingMotion/corner_subpixels
python cornerSubPix_Demo.py --input ../../../../data/pic3.png
或者
cd opencv/samples/python/tutorial_code/TrackingMotion/generic_corner_detector
python cornerDetector_Demo.py --input ../../../../data/building.jpg
效果如下:
运行代码二:
cd opencv/samples/python/tutorial_code/TrackingMotion/good_features_to_track
python goodFeaturesToTrack_Demo.py --input ../../../../data/pic3.png
效果如下:
运行代码三:
cd opencv/samples/python/tutorial_code/TrackingMotion/harris_detector
python cornerHarris_Demo.py --input ../../../../data/building.jpg
效果如下:
Draw polygonal contour + bonding rects + circles | 绘制多边形轮廓+边界矩形+圆
运行代码一:
cd opencv/samples/python/tutorial_code/ShapeDescriptors/bounding_rects_circles
python generalContours_demo1.py --input ../../../../data/stuff.jpg
运行效果:
运行代码二【Code for Creating Bounding rotated boxes and ellipses for contours 轮廓 tutorial】:
cd opencv/samples/python/tutorial_code/ShapeDescriptors/bounding_rotated_ellipses
python generalContours_demo2.py --input ../../../../data/stuff.jpg
运行效果
运行代码三
cd opencv/samples/python/tutorial_code/ShapeDescriptors/find_contours
python findContours_demo.py --input ../../../../data/HappyFish.jpg
运行效果:
运行代码四:
cd opencv/samples/python/tutorial_code/ShapeDescriptors/hull
python hull_demo.py --input ../../../../data/stuff.jpg
或者
cd ../moments/
python moments_demo.py --input ../../../../data/stuff.jpg
或者
cd ../point_polygon_test/
python pointPolygonTest_demo.py
运行效果:
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。