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

enter image description here

it written in algorithm steerable-filter used second derivative of gaussian. , plotting edge magnitude output came

enter image description here

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

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

inno setup - TLabel or TNewStaticText - change .Font.Style on Focus like Cursor changes with .Cursor -