Quantcast
Channel: OpenCV Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 2088

Detect an object on known color on a green surface?

$
0
0
On a white surface, the object can be detected by providing a color threshold to filter the image. Then the image is converted gray scale and passed through a medianBlur + Canny filter. The green surface is actually artificial turf so its shiny and has texture. ![image description](/upfiles/14578012158671069.jpg) I've tried looking at only the green plane instead of graying out the picture. In addition, it helped to remove the Canny filter. The image can be scanned for the width of the object (if the red color is above a certain threshold). The, the max amount of the red color pixels in a row can be saved into a variable (giving position and size). However, I'm still not sure the correct thresholds to check for and am getting inconsistent results. On the white surface I am getting slightly bigger widths than on the green surface. > new_image = cv2.add(cv2.add(image[:,:,2],-image[:,:,1]/2),-image[:,:,0]/2) ![image description](/upfiles/1457834955259104.jpg)

Viewing all articles
Browse latest Browse all 2088

Trending Articles