How To Properly Fill The Shape Of Detected Object Using Morphological Image Processing???

hello everyone, i am taking video frames of traffic on road
and using my algorithm i am detecting the cars. i have added my results in the zip file...
i am successfully able to detect the the moving cars...but not the whole car shape properly .
i used 'imfill' function but it is not fulfilling all my requirements
1.i want to detect only the moving cars and nothing else . But i am also getting many other extraneous objects, particularly the lane-markings.
2. Also while detecting i want the cars to be in their full shape particularly the glass part and wheel part
i have added my new results(video frames,binary image and segmented part) also the test video for your reference..Thanks u .....

Antworten (3)

filledImage = imfill(binaryImage, 'holes');

5 Kommentare

Sir ,i used 'imfill' function but it is not fulfilling all my requirements
1.Sir,i want to detect only the moving cars and nothing else .But i am also getting many other extraneous objects, particularly the lane-markings.
2. Also while detecting i want the cars to be in their full shape particularly the glass part and wheel part
i have added my new results(video frames,binary image and segmented part) also the test video for your reference..Thanks u .....
Hello Ramdas,
Could I get your matlab code please? I am working on a image segmentation and we can probably help each other ;)
Thank you very much
It looks like it's there in the attached zip file.
Sorry ramdas, it doesn't look like I could finish your project for you in 5 minutes or less and I just don't have the time to spare to make your project super robust. I'm sure people can work months or years on that kind of thing. But you have to ask yourself what you really NEED . Why do you need the windows and wheels? Maybe you can count cars, or whatever you need to do, without having a perfect outline of all the car parts.
I totally Agree with you Mr Image Analyst, but actually my project is to calculate speed of vehicle so detecting just vehicle is not sufficient, we have to find centroid for each vehicle for which we should have detected each vehicle fully and distinctly.
There are only two points (lines actually) on each wheel that travel at exactly the same speed as the car. Huh? How can that be? No one understands that except those who remember their physics/mechanics class in college. The rest of the wheel travels at different speeds. In fact there are always several points on a car that are still and not moving at all, unless the car is skidding, and there is one point (line) on each wheel that is traveling twice as fast as the car. What? That's crazy talk you say? If you don't know why after thinking about it for a bit, let me know.
For that reason you can just get the centroid of the blob that is the main body (or the majority of it) to determine the speed. You don't need to find every single pixel on the car to determine its speed.

Melden Sie sich an, um zu kommentieren.

kavya p
kavya p am 23 Jan. 2015
I need this code but the zip file u attached is not opening will mail m please m email address is kavyapwalad cc Mail.com
For vehicle detection, is the centroid required?

Gefragt:

am 19 Mai 2014

Kommentiert:

am 2 Nov. 2018

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by