-2

I want to apply a detector algorithm to detect empty areas of parking and I have read about SIFT and SURF, but I can't quite understand it. I have seen examples of comparison between two images, but that's not what I want. Could you explain about how to use SURF or SIFT on the issue of detecting empty spots on parking?

I have also read about color histogram, can I have some documentation about it?

I am working with OpenCV python 2.4.9 and 2.7

GPPK
  • 6,546
  • 4
  • 32
  • 57
Gui
  • 45
  • 1
  • 3
  • 9

1 Answers1

1

It depends on what you exactly want to achieve - if just want to find an empty spot and your camera higher than parking, it's quite possible that finding spots in color of road (most likely asphalt) will be enough for you(see http://docs.opencv.org/modules/core/doc/operations_on_arrays.html#cv2.inRange). Of course you have to manually find lower and upper boundary (don't forget about lighting differences - asphalt will have different color at night, probably it will be easier to find good boundaries using HSV color space) and filter parts of parking which are not empty areas (roads etc.).

BTW - look at this Using OpenCV to detect parking spots

Community
  • 1
  • 1
cyriel
  • 3,522
  • 17
  • 34
  • hi, thanks for your reply, Yes, I've thought about asphalt color, do you could me explain about brightness and the color on asphalt at night? My program detects the parking lines and draws every spots, so now I have my areas of interest identified – Gui Feb 03 '15 at 15:09
  • Yo need to find the boundaries on your own or provide some examples(images) so someone can help you with this. Here you can read more about it - http://stackoverflow.com/questions/18771497/how-do-we-detect-points-from-a-picture-with-a-particular-color-on-those-points/18812395#18812395 About brightness at night - generally Hue ans Saturation of color (in HSV color space) should be similar, the biggest difference will be in Value of color. All you need to do is find good boundaries for day and for night and join them, – cyriel Feb 03 '15 at 17:04
  • I have a matrix with all ROI (individual parking spots) `images_roi[]` now i have `lower_color_asphalt = np.array([x,y,z]) upper_color_asphalt = np.array([x2,y2,z2])`.how to get these values? – Gui Feb 03 '15 at 17:20
  • You need to find them namually - convert few examples to HSV colorspace and read their values. Alternative approach (preffered in my opinion) is to create a simple app which will use inRange function and adjust lower and upper bound using sliders/some keys observing how does it change the result. – cyriel Feb 04 '15 at 01:00