0

Alright so this one might be a little tricky and I'm more looking for direction than a specific answer I suppose. Essentially I need to do some object detection in a VB.net application. I want to know if there is a car in a picture or not. It's a still picture and the algorithm doesn't need to be crazy fast or anything but I'm basically trying to detect car or no car in a picture. The idea is for a much larger application where one of the features would deal with a parking lot and trying to tell if there are cars in each parking space. I would essentially have a separate program cut up a much larger image into just the areas for the individual spaces and then this program would cycle through and for each space detect car or no car.

I've also looked a little bit into edge detection but I'm just not sure if that will really work that well for this, the cars seem to come up with a lot of edges where as i would essentially want an outline of the car itself to detect that this is all one object.

Jav_Rock
  • 22,059
  • 20
  • 123
  • 164
Kyle Fuller
  • 117
  • 2
  • 13
  • 6
    Try Image.IsCarThere. – Steven Doggart May 23 '12 at 15:12
  • 1
    You might want to check this question: http://stackoverflow.com/q/10168686/44522 – MicSim May 23 '12 at 15:13
  • 4
    it can be done using sensors like the one you have in loo to detect presence, and it will be a lot cheaper than writing a buggy algo for car detection :) – Zia May 23 '12 at 15:19
  • @Zia - ripping up the tarmac and dropping in over a thousand sensors? – cjk May 23 '12 at 15:32
  • Maybe you could use a neural network - see "pattern recognition" here: http://dynamicnotions.blogspot.com.au/2008/10/how-many-hidden-neurons-and-layers.html. I've found Encog to be a great open-source neural network package (although I know nothing about imaging using neural networks)... http://www.heatonresearch.com/encog – Simon MᶜKenzie May 24 '12 at 06:58

2 Answers2

2

You could use background subtraction. This would involve having the empty car park image as your background and then doing a comparison of the changes between that and any subsequent images. If you are looking at car parking spaces then you would want to split the image up into sectors(car park spaces) and do the background subtraction per sector. However due to constant changes in lighting of the carpark as the sun moves you are going to run into issues where the background image will change due to shadows, brightness,etc. An approach to handle this is to do frame by frame comparisons and if it changes by a certain threshold then it is most likely a car has parked rather than the sun has moved as the car will cause a much higher amount of change in a short space of time than the effects of lighting will.

Neil_M
  • 462
  • 5
  • 17
  • Yeah i was considering the same thing but as you mentioned i was worried about lighting and snow and such but i guess if i went for a percentage where if more than say 50% changes within 30 seconds then it's likely a car parked... – Kyle Fuller May 23 '12 at 15:51
0

You can fill all the spots when it snows. You might want to check this link out http://examples.simplecv.org/en/latest/examples/parking.html (it's in python, but could help) or buy an actual parking lot detection system that will be much more reliable than comparing images.

David Sherret
  • 101,669
  • 28
  • 188
  • 178