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

查看:9
本文介绍了相机捕获图像的形状检测(圆形、正方形、矩形、三角形、椭圆) + i OS 5 + Open 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.

谢谢..

小米

推荐答案

首先您可能需要查看边缘检测器,例如 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.

For circles I would have a look at the HoughCircles.

对于正方形和矩形,您应该查看 findContours方法和下载opencv时samples目录下的示例代码squares.cpp.

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.

通过快速的谷歌搜索,我找到了一篇关于 检测 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 + Open CV的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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