Problem regarding image processing in binary image
Afficher commentaires plus anciens
I'm currently working on image processing on an image on streets. Here are the codes I'm currently using
C=im2double(img);
B=im2double(bgd);
maxchan=max(B,[],3);
threshmax = multithresh(maxchan,4);Qmax=imquantize(maxchan,threshmax);
bw=bwareafilt( Qmax==2,1);
bw=imclose(bw,strel('disk',10));
D=rgb2gray(bw.*(C-B));
thresh=multithresh(D,2);
result=bwareafilt( imquantize(D,thresh)>1, [10,inf]);
result2=imfill(result,'holes')
imshow(result2)
Then, I'll have a result as following

Are there any solutions to get a more complete car-shaped white blob and remove the lines on the road ?? This is because I'm attempting to count the number of the cars. There is another problem where if i take another picture with different lighting or different angle, the result of the image could be worse where i could not see any blobs. The images of the current image are attached as .m files. Thank you in advance. The other pictures where I could not extract anything are also attached.
Réponse acceptée
Plus de réponses (1)
KALYAN ACHARJYA
le 11 Juil 2018
%% To remove roads
LB=2000;
seg=bwareaopen(result2,LB);
figure, imshow(seg)

Catégories
En savoir plus sur Computer Vision with Simulink dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!