LBP cascade classification: Swimming pool detection

asked 2014-09-08 18:38:22 -0600

aliavci gravatar image

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?

edit retag flag offensive close merge delete



Wrong approach as I see it. LBP cascade is for object detection, not edge detection. Possible solutions:

  1. Use a edge filter like Canny edge filer
  2. Use a Hough Line detector
  3. Use a gradient detector approach like the Sobel operator

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.

StevenPuttemans gravatar imageStevenPuttemans ( 2014-09-09 08:08:36 -0600 )edit

The issue I find with that is how would you plan to isolate the swimming pool area? Considering various swimming pool tile colours.

aliavci gravatar imagealiavci ( 2014-09-09 15:09:24 -0600 )edit

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?

StevenPuttemans gravatar imageStevenPuttemans ( 2014-09-10 01:16:59 -0600 )edit

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 for information.

rwong gravatar imagerwong ( 2014-09-10 01:34:19 -0600 )edit

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.

rwong gravatar imagerwong ( 2014-09-10 01:37:04 -0600 )edit

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?

aliavci gravatar imagealiavci ( 2014-12-09 02:48:54 -0600 )edit

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.

StevenPuttemans gravatar imageStevenPuttemans ( 2014-12-09 02:59:59 -0600 )edit