Using OpenCV to Detect Clothing Buttons on a Sheet of Paper

I don’t have a background in computer vision, but I was curious to know how I can use the OpenCV library to achieve the following goals:

I have a bunch of spare buttons sorted by color, style and diameter. For the most part they are circular. I scatter them evenly onto a piece of white paper and, under good lighting, photograph a high-resolution image with an average digital camera. How could I slice this image so that each individual element is drawn separately?

Thanks in advance.

+5
source share
3 answers

, , : Canny Hough .

+2

, . :

( , ), ,

cvFindContours

:

  • cvFitEllipse, (a, b) .
  • , PIab , cvContourArea, , a = b. ( )
  • , . printContour, cvPrintContour, cvMinAreaRect2 ..

, .

+1

All Articles