Shape detection using MATLAB

∥☆過路亽.° 提交于 2020-01-16 03:51:08

问题


I am working on car parking system project. For that, I would like to detect the presence of a car.

Can anybody tell me how I can accomplish this using MATLAB?

Also, what is the algorithm for detecting a car?


回答1:


There's a whole world of methods for object detection in images. You need to learn a little bit about image processing to solve this problem. I suggest you read about template matching or more generally about Object recognition. Specifically for car detection, if you know they will be seen at a certain angle (head on, for example) i'd try Viola-Jones detection which is implemented in OpenCV as haar-based feature cascade detection. Although OpenCV is not a matlab library, you can probably find something in matlab's image processing toolboxes that does a similar job (or interface into OpenCV)




回答2:


Background subtraction would be a simple place to start.

In a nutshell:

  • Can capture an image of your empty parking lot. This is your reference image.
  • Compare the current image of your parking lot with the reference image. The parts that are different will be of interest.

Problems:

  • You need to keep updating your reference image to stay current with the conditions (e.g. day, night, cloudy, raining). Sometimes this may not be possible, because your reference image needs to have no cars in it for the approach to work.
  • Moving things in the background (like trees shaking in the wind) will come up as false positives



回答3:


Have you considered using 3D/stereoscopic imaging in addition to using 'normal' images? If yes you could open up a whole new world of methods and intelligent tricks to remove objects based upon their distance to the camera. Then, any object that is a certain, fixed distance from the camera (e.g. your background) is easily removable and you can just process the new parts of the image (e.g. cars).

If this interests you I can supply you with an algorithm I have developed to detect animals in a livestock pen, which is a similar concept.



来源:https://stackoverflow.com/questions/4843089/shape-detection-using-matlab

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!