image processing - What is second derivative of Guassian? -
i want find edge magnitude @ each pixel of image , need apply second derivative of guassian filter. using sobel that. correct or should use other filter ?
sobel(src,magy,cv_32f,0,1,size);
this image
it written in algorithm steerable-filter used second derivative of gaussian. , plotting edge magnitude output came
i trying use sobel, not getting output. tried laplacian output not similar above.
to find edge magnitude (like basic edge detection methods) can apply gaussian using "imfilter" in
filter = fspecial('gaussian',h,sigma); %create gaussian filter filtered = imfilter(img, filter); %gaussian convolved image figure;imshow(filtered,[]); %you can see blurred version of image [fx,fy] = gradient(filtered); %take blurred image's derivative
then find magnitude of derivative in
edgemap = fx.*fx + fy.*fy;
you can normalize edgemap or apply thresholding if wish.
Comments
Post a Comment