Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

you can do the following 1-find all Regions in the image by using findcontour 2-find center for every region, you can use moments , the center point will represent the region 3- Pass the centers to Kmeans Kmean clustring or this link
Kmean will find the clusters group of points 4-For every cluster You can use one of the following function to detect the rectangle (boundingRect,approxPolyDP,RotatedRect)

you can do the following following

  1. 1-find all Regions in the image by by using findcontour 2-find center for every region, you can use use moments , the center point will represent represent the region 3- Pass the centers to Kmeans Kmean Kmean clustring or this link

    Kmean will find the clusters group of points
     4-For every cluster You can use one of the following function to to
    

    detect the rectangle rectangle (boundingRect,approxPolyDP,RotatedRect)

you can do the following

  1. 1-find find all Regions in the image by using findcontour 2-find using findcontour

  2. find center for every region, you you can use moments , the center point will represent the region 3- region
  3. Pass the centers to Kmeans Kmean Kmean
    clustring
    or this link or this link

    Kmean will find the clusters  group of points 

  4. 4-For
  5. For every cluster You can use one of the following function to

    detect todetect the rectangle (boundingRect,approxPolyDP,RotatedRect)rectangle(boundingRect, approxPolyDP,rotatedRect)