0

i have binary edged image, after applying houghline i have detected all lines in the image, after HoughLines i got following mask image:

HoughLines

after this , i applied convexhull to detect perfect shapes , the binary image i get after applying hull,

convexhull

after this am trying to apply contouring , and detect shapes using approxPolyDP, to find shapes with 4 sides, which will be square or rectangle, but as can be seen there is square approximately rectangular in shape, but as it's having 4 sides it's also detected as square, but i want to exclude these shapes , so any suggestions would be appreciated.

Jeru Luke
  • 20,118
  • 13
  • 80
  • 87
U.Swap
  • 1,921
  • 4
  • 23
  • 41
  • Possible duplicate of [Advanced square detection (with connected region)](https://stackoverflow.com/questions/14997733/advanced-square-detection-with-connected-region) – rawwar May 21 '18 at 10:37
  • 1
    before applying convexHull you should reduce the lines to their intersections – Micka May 21 '18 at 10:42

0 Answers0