matlab 提示我未定义函数或变量 'maskim'。这是为什么,代码如下
f=imread('1.jpg');subplot(2,2,1);imshow(f);seedx=[30,76,86];seedy=[110,81,110];holdon...
f=imread('1.jpg');
subplot(2,2,1);
imshow(f);
seedx=[30,76,86];
seedy=[110,81,110];
hold on;
plot(seedx,seedy,'s','linewidth',1);
title('原图像及种子点位置');
f=double(f);
markerim=f==f(seedy(1),seedx(1));
for i=2:length(seedx)
markerim=markerim|(f==f(seedy(i),seedx(i)));
end;
thresh=[12,6,12];
markim=zeros(size(f));
for i=1:length(seedx)
g=abs(f-f(seedy(i),seedx(i)))<=thresh(i);
maskim=maskim|g;
end
[g,nr]=bwlabel(imreconstruct(maskerim,maskim),8);
g=mat2gray(g);
subplot(2,2,2);
imshow(g);
title('三个种子点区域生长结果'); 展开
subplot(2,2,1);
imshow(f);
seedx=[30,76,86];
seedy=[110,81,110];
hold on;
plot(seedx,seedy,'s','linewidth',1);
title('原图像及种子点位置');
f=double(f);
markerim=f==f(seedy(1),seedx(1));
for i=2:length(seedx)
markerim=markerim|(f==f(seedy(i),seedx(i)));
end;
thresh=[12,6,12];
markim=zeros(size(f));
for i=1:length(seedx)
g=abs(f-f(seedy(i),seedx(i)))<=thresh(i);
maskim=maskim|g;
end
[g,nr]=bwlabel(imreconstruct(maskerim,maskim),8);
g=mat2gray(g);
subplot(2,2,2);
imshow(g);
title('三个种子点区域生长结果'); 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询