How to perform an region growing on Edge detected image after edge detection?
Show older comments
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));
Answers (1)
Image Analyst
on 25 Feb 2013
0 votes
Would imdilate() do whatever it is you want to do?
Categories
Find more on Object Analysis in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!