Ask Your Question

Revision history [back]

Hi,

I'm not sure the blue matrix is really in the target image or you have used it as a position reference.Things are bit tricky if the blue matrix is also part of the image.But you can try following approach,

1.Use an edge detector in the gray scale image(Laplacian is preferred) 2.Apply OpenCV contour analysis contour 3. Use boundingRect to find rectangle with the maximum size.

Hi,

I'm not sure the blue matrix is really in the target image or you have used it as a position reference.Things are bit tricky if the blue matrix is also part of the image.But you can try following approach,

1.Use

  1. Use an edge detector in the gray scale image(Laplacian is preferred) 2.Apply preferred)
  2. Apply OpenCV contour analysis contour
  3. 3.
  4. Use boundingRect to find rectangle with the maximum size.