形状检测(圆形,正方形,矩形,三角形,椭圆形)相机拍摄的图像+ i OS 5 +打开CV [英] Shape Detection (circle, square, rectangle, triangle, ellipse) for a camera captured image + i OS 5 + Open CV

查看:2374
本文介绍了形状检测(圆形,正方形,矩形,三角形,椭圆形)相机拍摄的图像+ i OS 5 +打开CV的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是OpenCV的新手,需要知道OpenCV的方法,它检测iPhone的相机捕获图像中的不同形状(圆形,正方形,矩形,三角形,椭圆形)。

I am new to OpenCV and need to know the method of OpenCV which detects different shapes (circle, square, rectangle, triangle, ellipse) in a camera captured image for iPhone.

因此,有人可以指导我朝着正确的方向(参考文献/文章/任何东西)使用哪种技术更好地完成它。

so, could someone directs me to the right direction (references/articles/anything) that which techniques are better to get it done.

感谢..

iOmi

推荐答案

首先,您可能需要查看边缘检测器,例如 Canny 将形状提取为二进制图像。 (虽然这对于iphone来说可能很贵)

First you will probably need to look at an edge detector such as Canny to extract the shapes into a binary image. (Although this may be expensive for the iphone)

对于圈子我会看看 HoughCircles

对于正方形和矩形,您应该看看 findContours 方法和示例代码<$

For squares and rectangles you should look at the findContours method and the sample code squares.cpp in the samples directory when you downloaded opencv.

通过快速的google搜索,我可以找到一篇文章关于在C#中检测形状的方法对应于在使用opencv库时将在另一种语言中使用的方法。

With a quick google search I was able to find an article about detecting shapes in C# which roughly corresponds to the methods you would use in another language while using the opencv library.

我没有在ios中使用opencv,但我希望这有助于你开始。

I have not used opencv in ios but I hope this will help get you started.

这篇关于形状检测(圆形,正方形,矩形,三角形,椭圆形)相机拍摄的图像+ i OS 5 +打开CV的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆