필터 지우기
필터 지우기

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

조회 수: 2 (최근 30일)
Poonam
Poonam 2013년 2월 25일
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));

답변 (1개)

Image Analyst
Image Analyst 2013년 2월 25일
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