主题:[讨论]我有一个matlab的程序,调不出来,请高人帮忙...
clear
close all
I = imread('ss.jpg');
figure,imshow( I);
background = imopen( I ,strel('disk',15)) ; %取半径为15 的圆盘结构元素对图像用开运算估计背景
figure ,imshow(background); %显示背景图
figure , surf (double (background (1:8:end ,1:8:end) ) ) ,zlim( [ 0 255 ]); %显示背景的彩色表面图,对8 ×8 格点取样
set(gca ,'ydir','reverse');
I2 = imsubtract ( I ,background) ;
figure , imshow( I2); %从原图像中减去背景图像,并显示结果图
I3 = imadjust ( I2 , stretchlim( I2) ,[0 1 ]) ;
figure , imshow( I3) ; %调节图像对比度,并显示结果图
level = graythresh( I3) ;
bw = im2bw( I3 ,level);
figure , imshow(bw);
close all
I = imread('ss.jpg');
figure,imshow( I);
background = imopen( I ,strel('disk',15)) ; %取半径为15 的圆盘结构元素对图像用开运算估计背景
figure ,imshow(background); %显示背景图
figure , surf (double (background (1:8:end ,1:8:end) ) ) ,zlim( [ 0 255 ]); %显示背景的彩色表面图,对8 ×8 格点取样
set(gca ,'ydir','reverse');
I2 = imsubtract ( I ,background) ;
figure , imshow( I2); %从原图像中减去背景图像,并显示结果图
I3 = imadjust ( I2 , stretchlim( I2) ,[0 1 ]) ;
figure , imshow( I3) ; %调节图像对比度,并显示结果图
level = graythresh( I3) ;
bw = im2bw( I3 ,level);
figure , imshow(bw);