Detect and fix incomplete rectangle

asked 2016-01-30 05:11:24 -0600

Polyquin gravatar image

Hi all, I am trying to detect the numbers within the white rectangle. My thought process as follows:

  1. binarize the image
  2. detect canny edges
  3. use findContours to detect the contours
  4. for each contour, check for numbers

I am stuck at step 3 for this photo. There is a hand cutting the rectangle which lets findContours detect no rectangle. So my question is how to detect and fix an incomplete rectangle.

image description image description

edit retag flag offensive close merge delete

Comments

I tested Hough Lines on this and it detected nothing, so i think it's more than just using findContours now. Any ideas? I'm trying (1) locate the 'rectangle' then recognise the numbers.

Polyquin gravatar imagePolyquin ( 2016-01-30 08:20:59 -0600 )edit