我有一个任务,创建自己的边缘检测功能,使用Matlab。但不幸的是,我没有在图像处理领域的经验,以至于我几乎不知道图像是如何表示的。这个领域的知识很少。
我读过一些论文和PDF,但它们集中在很多我觉得我可能不需要它们来完成任务的话题上。
我很高兴知道你的建议,或有任何特定的论文,PDF,教程或快速指南,为此目的。
谢谢
发布于 2016-11-28 07:22:07
每种边缘检测算法都使用像3x3矩阵这样的核。如下所示,sobel_x和sobel_y称为Sobel算子。如果你找到图像的卷积和算子,你就会找到图像的边缘。
A=imread('motor.png'); % load image
A=rgb2gray(A); % convert to grayscale from rgb
A=im2double(A); % convert to double
sobel_x = [-1 0 1 ;... % define sobel operator of x axis
-2 0 2 ;...
-1 0 1];...
sobel_y = [1 2 1;... % define sobel operator of y axis
0 0 0;...
-1 -2 -1];
new_img_x=conv2(A,sobel_x); % convolution of image and sobel operator on x axis
new_img_y=conv2(A,sobel_y); % convolution of image and sobel operator on y axis
new_img=new_img_x+new_img_y; % sum two convolution
imshow(new_img); % show newly processed imagehttps://stackoverflow.com/questions/40835624
复制相似问题