0

I´ve got a problem. I am taking pictures of a common solar module with a camera flash. I need to detect the frame of the module to cut out the module and undistort it (I only need all of the cell area (dark area inside the frame)).

sample image - direct flash sample image - direct flash --> problems with big reflection ( I think i can reduce it with a good diffusor) sample image - flash from angle sample image - flash from angle

Anybody have some recommendation for a robust method to detect the frame? I need something to work with various image angles and lighting.

processed sample image 2 processed sample image 2

The last picture is processed. I blured the image, grayscaled, inverted. After that I thresholded the image and tried to detect contours (Got some Problems with the shadow on the bottom of the image)

Thanks for your time. Chris

Chris S.
  • 37
  • 8

1 Answers1

0

as mentioned in : Rectangle recognition with perspective projection

Hough transform should work well for rectangle detection IFF you can assume that the sides of the rectangle are the most prominent lines in your image. Then you can simply detect the 4 biggest peaks in hough space and you got your rectangle.

This works for example with a photo of a white sheet of paper in front of a dark background.

Ideally you would preprocess the image with blur, threshold, morphological operators to remove any small-scale structures before hough transform.

If there are multiple smaller rectangles or other sorts of prominent lines in your images, contour detection might be the better choice.

Some general advantages for the hough transform off the top of my head:

Hough transform can still work if part of the rectangle is obstructed or out of the frame. Hough transform should be faster than contour detection, I guess? Hough transform will ignore anything that is not a straight line, so you may have greater success with cluttered images. (if the rectangle sides are the most prominent lines)

M.Sabaa
  • 319
  • 2
  • 8