LBP cascade classification: Swimming pool detection
I am trying to make my program detect a swimming pool and place lines around its boundaries. I think that using LBP cascade to detect the swimming pool area, then Harris corner detection to find the corners is the right approach. I am not sure though. Is a swimming pool possible to be detected?
Wrong approach as I see it. LBP cascade is for object detection, not edge detection. Possible solutions:
This will get you much further. Besides that, Harris corner will not yield the result you are expecting. It looks for interesting corner points in relation to pixel gradiations. It is NOT used for actual 90 degree corner detection.
The issue I find with that is how would you plan to isolate the swimming pool area? Considering various swimming pool tile colours.
Ok read my post again and look deeper into the techniques... The shape is important, it is an edge based shape which is calculated in a grayscale image. So who cares about tile colours?
Firstly, please describe what perspective (point-of-view) from which you plan to be able to detect swimming pools. Is it aerial/satellite imagery, or photographs taken by a person next to the pool? You will need to post some sample pictures to help illustrate your plan. Secondly, if you plan to be able to detect "all kinds of swimming pools" (including non-rectangular ones) from "all kinds of images", be reminded that this is as hard as the general object recognition problem. You will need to learn techniques such as "deep convolutional neural network". Such technique is far outside the scope of OpenCV. See http://www.technologyreview.com/view/530561/the-revolutionary-technique-that-quietly-changed-machine-vision-forever/ for information.
A simpler preprocessing technique is just to look for lots of blues in the lower half of the image. This might be helpful for preprocessing real-estate (home sales) pictures, which are usually taken with some style in order to create an appealing picture.
Steven, could you please elaborate? Canny detection at every single threshold possible doesn't specifically extract the pool edges. A tonne of noise is involved. Sobel seems not to help since it only cuts the found lines up into pieces. Is your numbering meant to imply a sequence of steps or various methods usable?
Canny gives you edge positions, Hough Lines on the binary image can combine line segments to full lines and thus give you the edges. The noise will never result in full lines.