我不知道这是否可能,但不管怎样,还是要开始了。
我想要从图像中提取边缘(我正在考虑使用imfilter(i,fspecial('sobel'))
来实现这一点,一旦边缘被提取出来,我想要操作代表边缘的图像,然后一旦操作完成,就将修改后的边缘图像与原始图像重新组合。
这是可能的吗?或者沿着这些路线的一些事情是可能的?如果是这样的话,有人能提出一种如何进行这种重组的方法吗?
发布于 2010-03-02 06:59:52
在回应你对Steve Eddin的评论时,他的回答是:是的,你可以。
%# make an image
img = zeros(100);
img(10:40,45:75)=1;
figure,imshow(img)
%# find the edge
edge = bwperim(img);
%# do something to the edge
edge = imdilate(edge,ones(3))*0.5;
figure,imshow(edge)
%# replace all the pixels in the raw image that correspond to a non-zero pixel in the edge
%# image with the values they have in the edge image
img(edge>0) = edge(edge>0);
figure,imshow(img)
https://stackoverflow.com/questions/2358086
复制相似问题