Effacer les filtres
Effacer les filtres

morphological based edge detection code for vehicle images

1 vue (au cours des 30 derniers jours)
kavya p
kavya p le 24 Jan 2015
Commenté : Image Analyst le 24 Jan 2015
<Real%20Time%20Traffic%20Light%20Control%20System%20Using%20Morphological%20Edge%20Detection%20and%20Fuzzy%20Logic%20Madhavi%20Arora,%20V.%20K.%20Banga%20 Real Time Traffic Light Control System Using Morphological Edge Detection and Fuzzy Logic Madhavi Arora, V. K. Banga > I attached the paper which I referred for morphological based edge detection .By referring this paper I did edge detection using morphological dilation erosion ,now I facing problem with matching reference image&image with vehicles after edge detection. The code & results are attached below please suggest me clc clear i=imread('file:///C:/Users/hp/Desktop/c.bmp'); s=imresize(i,[256,256]); figure;imshow(s); g=rgb2gray(s); figure;imshow(g); b=im2bw(g); figure;imshow(b); st=tic; se=ones(5,5); d=imdilate(b,se); figure;imshow(d); e=imerode(d,se); figure;imshow(e); out=imsubtract(d,e); figure;imshow(out); et=toc(st); et [m n]=size(out); count=0; for i=1:m for j=1:n if(out(i,j)==1) count=count+1;
end
end
end
count
i1=imread('file:///C:/Users/hp/Desktop/3(1).bmp'); s1=imresize(i1,[256,256]); figure;imshow(s1); g1=rgb2gray(s1); figure;imshow(g1); b1=im2bw(g1); figure;imshow(b1); st=tic; se=ones(5,5); d1=imdilate(b1,se); figure;imshow(d1); e1=imerode(d1,se); figure;imshow(e1); out1=imsubtract(d1,e1); figure;imshow(out1); et=toc(st); et
[m,n]=size(out1); count1=0; for i=1:m for j=1:n if(out1(i,j)==1) count1=count1+1; end if(out(i,j)==1&&out1(i,j)==1) count1=count1+1;
end
end
end
count1

Réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by