Azzera filtri
Azzera filtri

How to perform an region growing on Edge detected image after edge detection?

2 visualizzazioni (ultimi 30 giorni)
This is the code of edge detected image I have perform region growing on this image
function[vg]=coloredge(f)
sh=fspecial('sobel');
sv=sh;
Hx=imfilter(double(f(:,:,1)),sh);
Hy=imfilter(double(f(:,:,1)),sv);
Sx=imfilter(double(f(:,:,2)),sh);
Sy=imfilter(double(f(:,:,2)),sv);
Vx=imfilter(double(f(:,:,3)),sh);
Vy=imfilter(double(f(:,:,3)),sv);
gxx=Hx.^2+Sx.^2+Vx.^2;
gyy=Hy.^2+Sy.^2+Vy.^2;
gxy=Hx.*Hy+Sx.*Sy+Vx.*Vy;
A=0.5*(atan(2*gxy./(gxx-gyy+eps)));
G1=0.5*((gxx+gyy)+(gxx-gyy).*cos(2*A)+2*gxy.*sin(2*A));
A=A+pi/2;
G2=0.5*((gxx+gyy)+(gxx-gyy).*cos(2*A)+2*gxy.*sin(2*A));
G1=G1.^0.5;
G2=G2.^0.5;
vg=mat2gray(max(G1,G2));

Risposte (1)

Image Analyst
Image Analyst il 25 Feb 2013
Would imdilate() do whatever it is you want to do?

Community Treasure Hunt

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

Start Hunting!

Translated by