1

The role of this program is to draw Houghlines on an external window, when lines are detected in a game. However, when I implemented the ROI to avoid having useless lines detected, the border of the ROI is still detected as a line (obviously it is)

As shown in the image below, you may notice how the arrow show the detected line from the ROI.

enter image description here

How can I make it that it ignores the lines around the border? I tried to overlap the ROI with other lines but openCV still detects the borders as lines.

I am using Python.

Thanks!

hurkaperpa
  • 131
  • 11

1 Answers1

0

Solved it, was an amateur mistake! If anyone meets this problem, you will have to fix it by putting the region of interest code after converting the image to gray and then to edge detection; hence, Convert image to gray -> Convert image to Canny/Sobel (edge detection) -> Set image to ROI

hurkaperpa
  • 131
  • 11