Operator with its derivatives
We stress that it is preferable to apply the derivatives to the gaussin operator ,then ,we can convolute the image with it!

The left pic is the Gaussian function and the right one is the gaussian function with its dericatives.
How we set the size of the Gaussian


smaller sigma to get finer features
larger sigma to get the obvious edges and to smooth the minor edges
So let's conclude the process with the nether pic:

Canny edge detector!(非极大值抑制来thin the edge)

do the derivatives

we threshold the gradient

do the nms(非极大值抑制)

matlab code are listed below
% For Your Eyes Only
pkg load image;
frizzy = imread('frizzy.png');
froomer = imread('froomer.png');
imshow(frizzy);
imshow(froomer);
% TODO: Find edges in frizzy and froomer images
frizzyg=rgb2gray(frizzy);
froomerg=rgb2gray(froomer);
a1=edge(frizzyg,'canny');
a2=edge(froomerg,'canny');
% TODO: Display common edge pixels
imshow(a1&a2);
The 2D filter

Applying this to your imgae ,we take the 0 crossing and we will get the deges.
网友评论