1. 图像的块操作

h0=figure('toolbar','none',...

'position',[198 56 350 468],...

'name','实例67');

h1=axes('parent',h0,...

'position',[0.2 0.45 0.6 0.5],...

'visible','off');

I=imread('tire.tif');

imshow(I)

b1=uicontrol('parent',h0,...

'units','points',...

'tag','b1',...

'backgroundcolor',[0.75 0.75 0.75],...

'style','pushbutton',...

'string','边沿操作',...

'position',[30 100 50 20],...

'callback',[...

'cla,',...

'I=imread(''tire.tif'');,',...

'f=inline(''max(x(:))'');,',...

'I2=nlfilter(I,[2 2],f);,',...

'imshow(I2)']);

b2=uicontrol('parent',h0,...

'units','points',...

'tag','b2',...

'backgroundcolor',[0.75 0.75 0.75],...

'style','pushbutton',...

'string','显示块操作',...

'position',[100 100 50 20],...

'callback',[...

'cla,',...

'I=imread(''tire.tif'');,',...

'f=inline(''uint8(round(mean2(x)*ones(size(x))))'');,',...

'I2=blkproc(I,[6 6],f);,',...

'imshow(I2)']);

b3=uicontrol('parent',h0,...

'units','points',...

'tag','b3',...

'backgroundcolor',[0.75 0.75 0.75],...

'style','pushbutton',...

'string','交叠块操作',...

'position',[170 100 50 20],...

'callback',[...

'cla,',...

'I=imread(''tire.tif'');,',...

'f=inline(''uint8(round(mean2(x)*ones(size(x))))'');,',...

'I2=blkproc(I,[6 6],[3 3],f);,',...

'imshow(I2)']);

b4=uicontrol('parent',h0,...

'units','points',...

'tag','b4',...

'backgroundcolor',[0.75 0.75 0.75],...

'style','pushbutton',...

'string','关闭',...

'fontsize',14,...

'position',[90 50 70 30],...

'callback','close');

2. 图形的过滤操作:

h0=figure('toolbar','none',...

'position',[198 56 350 468],...

'name','过滤操作');

h1=axes('parent',h0,...

'position',[0.3 0.45 0.5 0.5],...

'visible','off');

I=imread('pout.tif');

imshow(I)

b1=uicontrol('parent',h0,...

'units','points',...

'tag','b1',...

'style','pushbutton',...

'backgroundcolor',[0.75 0.75 0.75],...

'string','均平过滤',...

'position',[50 120 50 20],...

'callback',[...

'cla,',...

'I=imread(''pout.tif'');,',...

'h=fspecial(''average'',6);,',...

'I2=uint8(round(filter2(h,I)));,',...

'imshow(I2)']);

b2=uicontrol('parent',h0,...

'units','points',...

'tag','b2',...

'style','pushbutton',...

'backgroundcolor',[0.75 0.75 0.75],...

'string','Sobel过滤',...

'position',[150 120 50 20],...

'callback',[...

'cla,',...

'I=imread(''pout.tif'');,',...

'h=fspecial(''sobel'');,',...

'I2=filter2(h,I);,',...

'imshow(I2,[])']);

b1=uicontrol('parent',h0,...

'units','points',...

'tag','b1',...

'style','pushbutton',...

'backgroundcolor',[0.75 0.75 0.75],...

'string','关闭',...

'position',[85 60 80 30],...

'callback','close');

3. 图像的频率操作:

h0=figure('toolbar','none',...

'position',[198 56 350 468],...

'name','频率操作');

h1=axes('parent',h0,...

'position',[0.3 0.45 0.5 0.5],...

'visible','off');

b=remez(10,[0 0.4 0.6 1],[1 1 0 0]);

h=ftrans2(b);

[H,W]=freqz(b,1,64,'whole');

colormap(jet(64))

plot(W/pi-1,fftshift(abs(H)))

b1=uicontrol('parent',h0,...

'units','points',...

'tag','b1',...

'backgroundcolor',[0.75 0.75 0.75],...

'style','pushbutton',...

'string','频率变换',...

'position',[30 100 50 20],...

'callback',[...

'cla,',...

'b=remez(10,[0 0.4 0.6 1],[1 1 0 0]);,',...

'h=ftrans2(b);,',...

'[H,W]=freqz(b,1,64,''whole'');,',...

'colormap(jet(64)),',...

'freqz2(h,[32 32])']);

b2=uicontrol('parent',h0,...

'units','points',...

'tag','b2',...

'backgroundcolor',[0.75 0.75 0.75],...

'style','pushbutton',...

'string','频率采样一',...

'position',[100 100 50 20],...

'callback',[...

'cla,',...

'Hd=zeros(11,11);,',...

'Hd(4:8,4:8)=1;,',...

'[f1,f2]=freqspace(11,''meshgrid'');,',...

'mesh(f1,f2,Hd),',...

'axis([-1 1 -1 1 0 1.2]),',...

'colormap(jet(64))']);

b3=uicontrol('parent',h0,...

'units','points',...

'tag','b3',...

'backgroundcolor',[0.75 0.75 0.75],...

'style','pushbutton',...

'string','频率采样二',...

'position',[170 100 50 20],...

'callback',[...

'cla,',...

'Hd=zeros(11,11);,',...

'Hd(4:8,4:8)=1;,',...

'H=fsamp2(Hd);,',...

'freqz2(h,[32 32]),',...

'axis([-1 1 -1 1 0 1.2]),',...

'colormap(jet(64))']);

b4=uicontrol('parent',h0,...

'units','points',...

'tag','b4',...

'backgroundcolor',[0.75 0.75 0.75],...

'style','pushbutton',...

'string','关闭',...

'fontsize',15,...

'position',[80 50 80 30],...

'callback','close');

4. 函数变换:

h0=figure('toolbar','none',...

'position',[198 56 350 468],...

'name','函数变换');

h1=axes('parent',h0,...

'position',[0.25 0.45 0.5 0.5],...

'visible','off');

I=imread('cameraman.tif');

imshow(I)

b1=uicontrol('parent',h0,...

'units','points',...

'tag','b1',...

'backgroundcolor',[0.75 0.75 0.75],...

'style','pushbutton',...

'string','图像压缩',...

'position',[30 100 50 20],...

'callback',[...

'cla,',...

'I=imread(''cameraman.tif'');,',...

'I2=im2double(I);,',...

'imshow(I2)']);

b2=uicontrol('parent',h0,...

'units','points',...

'tag','b2',...

'backgroundcolor',[0.75 0.75 0.75],...

'style','pushbutton',...

'string','图像解压',...

'position',[100 100 50 20],...

'callback',[...

'cla,',...

'I=imread(''cameraman.tif'');,',...

'I=im2double(I);,',...

'T=dctmtx(8);,',...

'B=blkproc(I,[8 8],''P1*x*P2'',T,T'');,',...

'mask=[1 1 1 1 0 0 0 0;,',...

'1 1 1 0 0 0 0 0;,',...

'1 1 0 0 0 0 0 0;,',...

'1 0 0 0 0 0 0 0;,',...

'0 0 0 0 0 0 0 0;,',...

'0 0 0 0 0 0 0 0;,',...

'0 0 0 0 0 0 0 0;,',...

'0 0 0 0 0 0 0 0];,',...

'B2=blkproc(B,[8 8],''P1.*x'',mask);,',...

'I2=blkproc(B2,[8 8],''P1*x*P2'',T'',T);,',...

'imshow(I2)']);

b3=uicontrol('parent',h0,...

'units','points',...

'tag','b3',...

'backgroundcolor',[0.75 0.75 0.75],...

'style','pushbutton',...

'string','线条解析',...

'position',[170 100 50 20],...

'callback',[...

'cla,',...

'I=imread(''cameraman.tif'');,',...

'BW=edge(I);,',...

'imshow(BW)']);

b4=uicontrol('parent',h0,...

'units','points',...

'tag','b4',...

'backgroundcolor',[0.75 0.75 0.75],...

'style','pushbutton',...

'string','关闭',...

'fontsize',15,...

'position',[80 50 80 30],...

'callback','close');

5. RADON函数变换

h0=figure('toolbar','none',...

'position',[198 56 350 468],...

'name','实例71');

h1=axes('parent',h0,...

'position',[0.3 0.45 0.5 0.5],...

'visible','off');

P=phantom(256);

imshow(P)

b1=uicontrol('parent',h0,...

'units','points',...

'tag','b1',...

'style','pushbutton',...

'string','变换一',...

'backgroundcolor',[0.75 0.75 0.75],...

'position',[30 100 50 20],...

'callback',[...

'cla,',...

'k=1;,',...

'theta1=0:10:170;,',...

'R1=radon(P,theta1);,',...

'imagesc(R1),',...

'colormap(hot),',...

'colorbar']);

b2=uicontrol('parent',h0,...

'units','points',...

'tag','b2',...

'style','pushbutton',...

'string','变换二',...

'backgroundcolor',[0.75 0.75 0.75],...

'position',[100 100 50 20],...

'callback',[...

'cla,',...

'k=2;,',...

'theta2=0:5:175;,',...

'R2=radon(P,theta2);,',...

'imagesc(R2),',...

'colormap(hot),',...

'colorbar']);

b3=uicontrol('parent',h0,...

'units','points',...

'tag','b3',...

'style','pushbutton',...

'string','变换三',...

'backgroundcolor',[0.75 0.75 0.75],...

'position',[170 100 50 20],...

'callback',[...

'cla,',...

'k=3;,',...

'theta3=0:2:178;,',...

'R3=radon(P,theta3);,',...

'imagesc(R3),',...

'colormap(hot),',...

'colorbar']);

b4=uicontrol('parent',h0,...

'units','points',...

'tag','b4',...

'style','pushbutton',...

'string','原始图像',...

'backgroundcolor',[0.75 0.75 0.75],...

'position',[50 50 70 30],...

'callback',[...

'cla,',...

'if k==1,',...

'I1=iradon(R1,10);,',...

'imshow(I1),',...

'end,',...

'if k==2,',...

'I2=iradon(R2,5);,',...

'imshow(I2),',...

'end,',...

'if k==3,',...

'I3=iradon(R3,2);,',...

'imshow(I3),',...

'end']);

b5=uicontrol('parent',h0,...

'units','points',...

'tag','b5',...

'style','pushbutton',...

'string','关闭',...

'backgroundcolor',[0.75 0.75 0.75],...

'position',[150 50 70 30],...

'callback','close');

matlab中radon函数6,matlab实用程序(六)相关推荐

  1. matlab中axis函数程序,matlab中axis函数

    % 计算函数值,zz 也是21x21的矩阵 为了方便测试立体绘图,MATLAB 提供了一个 peaks...meshz 可将曲面加上围裙: [x,y,z]=peaks; meshz(x,y,z); a ...

  2. matlab中randint函数用法,matlab中rand randn randint函数的区别

    matlab中rand函数是产生0到1的随机分布 matlab中randn函数是产生标准正态分布 randint是产生整数随机数,默认为0和1 %%%%%%%%%%%rand%%%%%%%%%%%%% ...

  3. matlab中udt函数,《MATLAB信号处理超级学习手册》——2.5 离散时间信号中的运算...

    本节书摘来自异步社区<MATLAB信号处理超级学习手册>一书中的第2章,第2.5节,作者:MATLAB技术联盟 , 史洁玉著,更多章节内容可以访问云栖社区"异步社区"公 ...

  4. matlab中fval函数,请问matlab中[x,fval,exitflag,output] = simulannealbnd(fun,...)函数怎么调用...

    请问matlab中[x,fval,exitflag,output] = simulannealbnd(fun,...)函数怎么调用,有相应的实例吗?或者帮我看一下下面的程序,怎么改. function ...

  5. matlab中 trapz函数,trapz(matlab中trapz函数用法)

    采用梯形法求积分 下面两种用法等效 h=pi/200; t=0:h:pi/2; y=sin(t)+cos(2*t); z1=trapz(t,y) z2=trapz(y)*h z1 = 1.0000 z ...

  6. matlab中normcdf函数用法,MATLAB NORMCDF

    MATLAB 中关于常见的概率分布密度函数的语句及格 式 MATLAB 中关于常见的概率分布密度函数的语句及格式 normpdf(x,mu,sigma) 正态分布密度函数. uifpdf(x,a,b) ...

  7. matlab中liccode函数,基于matlab车牌识别系统设计与实现(最终版)

    <基于matlab车牌识别系统设计与实现.doc>由会员分享,可在线阅读全文,更多相关<基于matlab车牌识别系统设计与实现(最终版)>请在www.woc88.com上搜索. ...

  8. matlab中imadjust函数,浅析matlab中imadjust函数

    imadjust imadjust是一个计算机函数,该函数用于调节灰度图像的亮度或彩色图像的颜色矩阵.在matlab的命令窗口中键入: doc imadjust或者help imadjust即可获得该 ...

  9. matlab中elevation函数功能,Matlab的Demcmap的Python等价物(elevation+/appropriate colormap)...

    不幸的是,matplotlib没有提供Matlab的demcmap的功能. 实际上,python basemap包中可能有一些内置特性,我不知道这些特性.在 所以,坚持matplotlib板上的选项, ...

  10. matlab中eacf函数,基于MATLAB的切比雪夫I型模拟低通滤波器设计

    基于MATLAB的切比雪夫I型模拟低通滤波器设计课程设计名称:数字信号处理课程设计专业班级 : 电信0604 学生姓 名 : 学号 : 20064300430 指导教师 : 课程设计时间:2009.6 ...

最新文章

  1. 华为北大等打造的Transformer竟在CV上超过CNN
  2. Linux系统的CPU使用率和Load
  3. Android实战技术:深入理解Android的RPC方式与AIDL
  4. LTS计算机,Pine64单板计算机(SBC)和模块入门
  5. 网络摄像头4 cmos 0v9650,driver
  6. sql 时态表的意义_SQL Server 2016中的时态表的概念和基础
  7. 软件设计师21-计算机体系结构
  8. Heritrix 3.1.0 源码解析(三十四)
  9. 剑指offer(C++)-JZ22:链表中倒数最后k个结点(数据结构-链表)
  10. 大数据与BI的区别在哪
  11. 我的小站:诗词在线 http://www.chinapoesy.com 欢迎大家测试速度。特别是网通的。...
  12. 深度神经网络的正则化
  13. html 背景图片旋转,CSS3只让背景图片旋转180度的实现示例
  14. Qsys中的EPCS使用技巧
  15. 基于STM32(F103ZE)的LD3320语音控制系统
  16. 华为设备配置VRRP,实现设备网关冗余备份
  17. 9.0系统XPOSED框架安装经验
  18. google阅读器快捷键
  19. Java B组蓝桥杯第七届国赛:圆圈舞
  20. 语句摘抄——第26周

热门文章

  1. Layui选项卡Tab和Layui模板laytpl冲突问题
  2. 爱你,我永远的 Elaine
  3. 如何在PDF中修改内容?这个方法免费编辑
  4. jQuery Message
  5. JAVA-银行卡归属地查询
  6. WiFi关联拒绝log分析以及代码流程 ASSOC_REJECT
  7. 运维工程师主要工作是做什么?
  8. Android采用消息推送实现类似微信视频接听功能
  9. 笔记本电脑触摸板手势操作
  10. oracle查询时间段差,关于oracle数据库中进行查询的时候出现效率特别差的一种情况...