资源描述:
《matlab实用程序图像处理实例分析》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库。
1、Matlab实用程序图像处理实例分析实例67:图像的块操作h0=figure('toolbar','none',...'position',[19856350468],...'name','实例67');h1=axes('parent',h0,...'position',[0.20.450.60.5],...'visible','off');I=imread('tire.tif');imshow(I)b1=uicontrol('parent',h0,...'units','points',...'tag'
2、,'b1',...'backgroundcolor',[0.750.750.75],...'style','pushbutton',...'string','边沿操作',...'position',[301005020],...'callback',[...'cla,',...'I=imread(''tire.tif'');,',...'f=inline(''max(x(:))'');,',...'I2=nlfilter(I,[22],f);,',...'imshow(I2)']);b2=uicontro
3、l('parent',h0,...'units','points',...'tag','b2',...'backgroundcolor',[0.750.750.75],...'style','pushbutton',...'string','显示块操作',...'position',[1001005020],...'callback',[...'cla,',...'I=imread(''tire.tif'');,',...'f=inline(''uint8(round(mean2(x)*ones(size
4、(x))))'');,',...'I2=blkproc(I,[66],f);,',...'imshow(I2)']);b3=uicontrol('parent',h0,...'units','points',...'tag','b3',...'backgroundcolor',[0.750.750.75],...'style','pushbutton',...'string','交叠块操作',...'position',[1701005020],...'callback',[...'cla,',...'I
5、=imread(''tire.tif'');,',...'f=inline(''uint8(round(mean2(x)*ones(size(x))))'');,',...'I2=blkproc(I,[66],[33],f);,',...'imshow(I2)']);b4=uicontrol('parent',h0,...'units','points',...'tag','b4',...'backgroundcolor',[0.750.750.75],...'style','pushbutton',..
6、.'string','关闭',...'fontsize',14,...'position',[90507030],...'callback','close');实例68:图形的过滤操作h0=figure('toolbar','none',...'position',[19856350468],...'name','过滤操作');h1=axes('parent',h0,...'position',[0.30.450.50.5],...'visible','off');I=imread('blood1.tif
7、');imshow(I)b1=uicontrol('parent',h0,...'units','points',...'tag','b1',...'style','pushbutton',...'backgroundcolor',[0.750.750.75],...'string','均平过滤',...'position',[501205020],...'callback',[...'cla,',...'I=imread(''blood1.tif'');,',...'h=fspecial(''avera
8、ge'',6);,',...'I2=uint8(round(filter2(h,I)));,',...'imshow(I2)']);b2=uicontrol('parent',h0,...'units','points',...'tag','b2',...'style','pushbutton',...'backgroundcolor',[0.750.750.75],...'string','Sobel过滤',...'posi