Shape Detection (circle, square, rectangle, triangle, ellipse) for a camera captured image + i OS 5 + Open CV

后端 未结 1 1590
清酒与你
清酒与你 2021-01-01 09:35

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.

相关标签:
1条回答
  • 2021-01-01 09:49

    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)

    For circles I would have a look at the HoughCircles.

    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.

    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.

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

    0 讨论(0)
提交回复
热议问题