Detecting the volleyball net
What would be your approach to detecting the volleyball net on this images.
I am a struggling with coming up with a decent solution.
Unfortunately, bilateralFilter
or gaussianBlur
all result in a lot of noise (especially the trees and sand) for the canny
line detector.
Can you suggest a better course of action ? Any ideas will be appreciated. Specifically, how to filter out sand and trees.
P.S. Also tried inRange
based on hue, but the net and the human skin fall within the range of the sand.
Pic1:
Pic2:
Will the camera always be on these positions?
Nope. On different images camera may be located in different places. The most reasonable assumption to make about position is that the majority of the lower half of the picture is mostly sand and the net is somewhere towards the middle.
Well,then your best bet seems like training your own object detector.
Don't use canny but rather use Sobel and start by looking only at horizontal edges, by not combining x and y directions, but rather ignoring all pixels with also a noticable gradient in x direction (vertical gradients). That would filter out the image already. Then do some sort of line detection with Hough for example, again filtering only horizontal lines. Then filter on line lengths. However keep in mind that in computer vision, garbage in means garbage out, so pictures taken against the sun will never get a decent result...
@can I guess object detectors is such an overkill for such a rigid object :D
Try looking at this tutorial. Get just the horizontal and vertical lines, then search for rectangles.