Ask Your Question
0

Hough Transform after removal of color [closed]

asked 2016-11-18 14:28:13 -0600

skr_robo gravatar image

I have a hough transform object detection code which detects the target objects. But a few lines are detected from the green background (trees). I wish to eliminate all the green background. I tried a code based on this and it worked fine. But the problem is that the resulting image is black and white. I want the green part to go black, but I want the rest to remain as the original image.

I also tried the second solution from this, with the image given there. The problem was whenever I accessed the result image and displayed it with imshow, it would display like the original.

So, are there any better solutions? Is there a way that I can see all pixels that fall in an hsv range, using inRange and then, instead of turning the whole image black and white, just turn those pixels in the range to black?

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by skr_robo
close date 2016-11-21 19:08:36.611040

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-11-21 19:08:18 -0600

skr_robo gravatar image

I used the solution available here and it works fine.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-11-18 14:28:13 -0600

Seen: 423 times

Last updated: Nov 21 '16