⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 shili72.m

📁 1-32是:图形应用篇 33-66是:界面设计篇 67-84是:图形处理篇 85-100是:数值分析篇
💻 M
字号:
h0=figure('toolbar','none',...
    'position',[198 56 350 468],...
    'name','实例72');
h1=axes('parent',h0,...
    'position',[0.25 0.45 0.5 0.5],...
    'visible','off');
I=imread('rice.tif');
imshow(I)
k=0;
b1=uicontrol('parent',h0,...
    'units','points',...
    'tag','b1',...
    'style','pushbutton',...
    'string','图像轮廓图',...
    'backgroundcolor',[0.75 0.75 0.75],...
    'position',[20 100 60 20],...
    'callback',[...
        'cla,',...
        'k=1;,',...
        'I=imread(''rice.tif'');,',...
        'imcontour(I)']);
b2=uicontrol('parent',h0,...
    'units','points',...
    'tag','b2',...
    'style','pushbutton',...
    'string','SOBEL边界图',...
    'backgroundcolor',[0.75 0.75 0.75],...
    'position',[100 100 60 20],...
    'callback',[...
        'cla,',...
        'k=2;,',...
        'I=imread(''rice.tif'');,',...
        'BW=edge(I,''sobel'');,',...
        'imshow(BW)']);
b3=uicontrol('parent',h0,...
    'units','points',...
    'tag','b3',...
    'style','pushbutton',...
    'string','CANNY边界图',...
    'backgroundcolor',[0.75 0.75 0.75],...
    'position',[180 100 60 20],...
    'callback',[...
       'cla,',...
        'k=3;,',...
        'I=imread(''rice.tif'');,',...
        'BW=edge(I,''canny'');,',...
        'imshow(BW)']);
b4=uicontrol('parent',h0,...
    'units','points',...
    'tag','b4',...
    'style','pushbutton',...
    'string','灰度调整',...
    'backgroundcolor',[0.75 0.75 0.75],...
    'position',[20 50 60 20],...
    'callback',[...
        'cla,',...
        'k=4;,',...
        'I=imread(''rice.tif'');,',...
        'J=imadjust(I,[0.15 0.9],[0 1]);,',...
        'imshow(J,64)']);
b5=uicontrol('parent',h0,...
    'units','points',...
    'tag','b5',...
    'style','pushbutton',...
    'string','图像柱状图',...
    'backgroundcolor',[0.75 0.75 0.75],...
    'position',[180 50 60 20],...
    'callback',[...
        'if k==0,',...
        'figure,',...
        'imhist(I,64),',...
        'end,',...
        'if k==1,',...
        'imhist(I,64),',...
        'end,',...
        'if k==2,',...
        'imhist(BW,64),',...
        'end,',...
        'if k==3,',...
        'imhist(BW,64),',...
        'end,',...
        'if k==4,',...
        'imhist(J),',...
        'end']);
b6=uicontrol('parent',h0,...
    'units','points',...
    'tag','b6',...
    'style','pushbutton',...
    'string','关闭',...
    'backgroundcolor',[0.75 0.75 0.75],...
    'position',[100 50 60 20],...
    'callback','close');

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -