First you will need to get contours of shapes from image. For example use Canny() to find edges in images. Than use findContours() on image of edges to get contours.
Than you can use matchShapes() to find contour that is most similar to your model contour (among all contours extracted by findContours()).
【opencv matchShapes()】 Note that this approach is very fast comparing to other methods of object detection, but if you can't get single contour around your book you will not able to find it. matchShapes() compares single contour to single contour.
推荐阅读
- 人脸识别|【人脸识别系列】| 实现自动化妆
- OpenCV|OpenCV-Python实战(18)——深度学习简介与入门示例
- opencv|图像处理之椒盐噪声的添加与去除
- 人脸识别|【人脸识别系列】| 实现人脸截图保存并编写128维特征向量
- opencv|网络爬虫入门练习
- OpenCV|【OpenCV 完整例程】89. 带阻滤波器的传递函数
- OpenCV|【OpenCV 完整例程】90. 频率域陷波滤波器
- OpenCV|【OpenCV 完整例程】22. 图像添加非中文文字
- OpenCV|【OpenCV 完整例程】91. 高斯噪声、瑞利噪声、爱尔兰噪声
- opencv|python+opencv车道线,实线虚线的检测