is it possible to detect the foreground in an single image using matlab? expecially i want to detect the car in an image. if yes please tell me the approriate method to detect the car in an image.
Mostrar comentarios más antiguos
I want to detect the car in an single image. i have tried out background subtraction method but it's need an original environmental image and present environmental image. so please guide me to do the foreground detection in a single approriate image.
1 comentario
Daniel Armyr
el 3 de Feb. de 2016
This is not something that can be done automatically until camera vision systems become a lot more intelligent than they are today which will take quite a few years.
You should take a course in computer vision / hire someone who knows this area because that is what it will take.
Respuestas (3)
Walter Roberson
el 3 de Feb. de 2016
1 voto
No, this is not possible even in theory. See http://uk.mathworks.com/matlabcentral/answers/243406-how-scan-an-image-fully-and-seperate-the-area-of-interest-using-matlab#answer_192657
Image Analyst
el 3 de Feb. de 2016
0 votos
I think it is possible, though it might be a lot of work and only work for images that meet certain criteria. There have been amazing advances in CBIR and Deep Learning. For example here is a link where MATLAB's Computer Vision System Toolbox uses optical flow and deep learning to detect if an image has a cat or a dog in it. Of course it's not 100% accurate, but did work very well for the examples shown.
2 comentarios
Walter Roberson
el 3 de Feb. de 2016
No, you cannot tell cars from other things by image. See https://www.mathworks.com/matlabcentral/answers/264009-i-need-a-coding-to-detect-the-cars-in-an-images#answer_206408
Image Analyst
el 3 de Feb. de 2016
Granted, there are cases where it will fail, but there will be cases where it will work, like Dima says.
Dima Lisin
el 3 de Feb. de 2016
0 votos
Yes it is possible, although difficult. For example, you can train a cascade object detector to detect cars. This will not work 100% of the time, but it may be sufficient for your purposes.
The thing to keep in mind is that a cascade object detector cannot handle rotation, either in-plane, or out-of-plane. So you cannot have a detector that will detect cars viewed from any arbitrary angle. However, you can train a detector for a side view of a car, and a separate detector for a front view of a car.
Even if you limit your problem to a specific orientation, your detector will still make mistakes, simply because cars can vary greatly in their appearance.
7 comentarios
Walter Roberson
el 3 de Feb. de 2016
This option is not available to the user. They do not have multiple images available to train against. The only permitted input is the one single image and whatever car is there must be picked out on it.
Dima Lisin
el 3 de Feb. de 2016
The question does not say that you are not allowed to use a pre-trained detector.
Walter Roberson
el 3 de Feb. de 2016
"in a single appropriate image". No other images are admitted to.
I suppose if you were somehow manage to train a cascade detector from measurements of cars instead of images of cars. Might not be easy to get the database of all of the measurements. Lots and lots of owners manuals and a decade or three of hands on research to find all the cars whose measurements were not publicly documented. It sure would be easier if additional images were permitted...
Image Analyst
el 3 de Feb. de 2016
I think that means he's looking at still images, not a video. There would be no reason to write a program to detect cars if there were not more images to run it on.
Dima Lisin
el 3 de Feb. de 2016
Walter, I think you may be interpreting the question a bit too narrowly. I think "in a single appropriate image" means "as opposed to a video sequence", where you can estimate a background model.
Why would it not be allowed to download images of cars off the web, and train a car detector ahead of time? For example, vision.CascadeObjectDetector comes with pre-trained models for faces.
Walter Roberson
el 3 de Feb. de 2016
According to the poster's other Questions, they are attempting to do counting of cars from unmanned aerial vehicles. If they have not changed the focus of their project, then they will have multiple images to deal with, but not necessarily a background image for each parking spot.
If they are sufficiently close to the ground that they could use perspective and if they have sufficiently accurate information about their position, then they could be doing stereo rectification, which would help provide constraints on the height of the objects and would help with (for example) aspect ratio calculations.
Dima Lisin
el 3 de Feb. de 2016
Oh, I see. So, if they can collect a representative set of images and hand-label the cars, they should be able to train a detector. How accurate that will be is another question entirely.
Categorías
Más información sobre Point Cloud Processing en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!