ImageVerifierCode 换一换
格式:DOCX , 页数:13 ,大小:17.29KB ,
资源ID:9075927      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/9075927.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(简单数字图像处理系统.docx)为本站会员(b****7)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

简单数字图像处理系统.docx

1、简单数字图像处理系统数字图像课程设计 简单数字图像处理系统function varargout = untitled(varargin)% Begin initialization code - DO NOT EDITgui_Singleton = 1;gui_State = struct(gui_Name, mfilename, . gui_Singleton, gui_Singleton, . gui_OpeningFcn, untitled_OpeningFcn, . gui_OutputFcn, untitled_OutputFcn, . gui_LayoutFcn, , . gui_

2、Callback, );if nargin & ischar(varargin1) gui_State.gui_Callback = str2func(varargin1);end if nargout varargout1:nargout = gui_mainfcn(gui_State, varargin:);else gui_mainfcn(gui_State, varargin:);end% End initialization code - DO NOT EDIT % - Executes just before untitled is made visible.function un

3、titled_OpeningFcn(hObject, eventdata, handles, varargin) %界面初始化函数setappdata(handles.figure1,I,0); % This function has no output args, see OutputFcn.% hObject handle to figure% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)

4、% varargin command line arguments to untitled (see VARARGIN) % Choose default command line output for untitledhandles.output = hObject; % Update handles structureguidata(hObject, handles); % UIWAIT makes untitled wait for user response (see UIRESUME)% uiwait(handles.figure1); % - Outputs from this f

5、unction are returned to the command line.function varargout = untitled_OutputFcn(hObject, eventdata, handles) %界面输出函数% varargout cell array for returning output args (see VARARGOUT);% hObject handle to figure% eventdata reserved - to be defined in a future version of MATLAB% handles structure with h

6、andles and user data (see GUIDATA) % Get default command line output from handles structurevarargout1 = handles.output; % -function m_file_Callback(hObject, eventdata, handles)% hObject handle to m_file (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure w

7、ith handles and user data (see GUIDATA) % -function my_file_open_Callback(hObject, eventdata, handles)global I;FileName,PathName = uigetfile(*.bmp;*.jpg;*.tiff;*.gif);%弹出对话框得到打开的路径I=imread(strcat(PathName,FileName);%打开得到的路径下的文件imshow(I)setappdata(handles.figure1,I,I);% handles structure with handles

8、 and user data (see GUIDATA) % -function my_file_save_Callback(hObject, eventdata, handles)global I;%这个是要保存的东西,一般是global的FileName,PathName = uiputfile(*.bmp;*.jpg;*.tiff;*.gif);%弹出对话框的到保存的路径imwrite(I,strcat(PathName,FileName);%存储到该路径下%uigetfile Open standard dialog box for retrieving files%saveas(fi

9、gure_handle,filename,fileformat)%saveas(gcf,picname,jpg) %if isequal(filename,0)|isequal(pathname,0) % return; %如果点了取消%else % fpath=fullfile(pathname,filename); %获取全路径的另一种方法%end %I=getappdata(handles.figure1,I);%imwrite(I,fpath); %保存图片 % -function my_file_exit_Callback(hObject, eventdata, handles)cl

10、ose(handles.figure1); %退出% hObject handle to my_file_exit (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) % -function my_file_print_Callback(hObject, eventdata, handles)% hObject handle to my_file_print (see GCB

11、O)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)C:UsersswjDocumentsMATLABuntitled.fig % -function m_image_Callback(hObject, eventdata, handles)% hObject handle to m_image (see GCBO)% eventdata reserved - to be defined in

12、 a future version of MATLAB% handles structure with handles and user data (see GUIDATA) % -function m_image_2bw_Callback(hObject, eventdata, handles)% hObject handle to m_image_2bw (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user d

13、ata (see GUIDATA) % -function m_image_tongji_Callback(hObject, eventdata, handles)%图像直方图的统计与绘制 直方图反应灰度值与像素个数的关系%FileName,PathName = uigetfile(*.bmp;*.jpg;*.tiff;*.gif);%弹出对话框得到打开的路径%I=imread(strcat(PathName,FileName);%打开得到的路径下的文件global I;A = rgb2gray(I); %将真彩色图像转换为灰度图像%figure(Name, 显示灰度图像)subplot(2,

14、2,1);imshow(I);title(原图);%imshow(A);J,I = histeq(A);%imshow(J);subplot(2,2,2);imhist(A,64); %提取图像中的直方图信息title(直方图的统计);%BW= bwperim(A,8);%figure(name,周长)%imshow(BW); % -function m_image_mianji_Callback(hObject, eventdata, handles)global I;BW = bwperim(im2bw(I); %显示二值化后的图像 Area = bwarea(BW) labeled,nu

15、mobjects=bwlabel(BW,8); BW=regionprops(labeled, basic) BW = BW.Area; set(handles.mj,String,strcat(区域面积 = ,num2str(BW); % -function m_image_zhouchang_Callback(hObject, eventdata, handles)% hObject handle to m_image_zhouchang (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB

16、% handles structure with handles and user data (see GUIDATA) % -function juli_Callback(hObject, eventdata, handles)% hObject handle to juli (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) % -function m_change_Ca

17、llback(hObject, eventdata, handles)% hObject handle to m_change (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) % -function m_change_ft_Callback(hObject, eventdata, handles) %普通傅里叶变换与逆变换global I; %傅里叶变换是将时域信号分解为

18、不同频率的正弦和/余弦和的形式subplot(2,2,1); %其通过在时域和频域来回切换图像imshow(I); title(原图);f=rgb2gray(I);A=fftshift(fft2(f);%figure;subplot(2,2,2);imshow(log(abs(A),8,10);title(傅里叶变换图像); % -function m_change_fft_Callback(hObject, eventdata, handles) %快速普通傅里叶变换与逆变换global I;subplot(2,2,1),imshow(I);title(原图);f=rgb2gray(I);

19、%subplot(2,2,2),imshow(f); F=fft2(f); %二维傅里叶变换FS=fftshift(F); S=log(1+abs(FS); %频谱subplot(2,2,3);imshow(S,);title(快速傅里叶变换图像);fr=real(ifft2(ifftshift(FS); %二维傅里叶逆变换ret=im2uint8(mat2gray(fr);subplot(2,2,4),imshow(ret);title(快速傅里叶逆变换图像); % -function m_change_DCT_Callback(hObject, eventdata, handles) %离

20、散余弦变换global I;subplot(2,2,1),imshow(I);title(原图); A= rgb2gray(I); %将其转为灰度 B = dct2(A); %=二维dct变换,即离散余弦变换 subplot(2,2,2),imshow(B);title(离散余弦变换图像) % -function m_change_xiaobo_Callback(hObject, eventdata, handles) %小波变换global I; %定义图片数据存储的全局变量subplot(2,2,1);imshow(I);title(原始图像);A=rgb2gray(I);subplot(

21、2,2,2);imshow(A);title(黑白图像);m,n=wavedec2(A,3,bior3.7);%多尺度二维小波分解B=appcoef2(m,n,bior3.7,2);%将低频取出进行二层的小波变换 subplot(2,2,3);imshow(B);title(二维离散小波变换2层);C=appcoef2(m,n,bior3.7,3);%将低频取出进行二层的小波变换 subplot(2,2,4);imshow(C);title(二维离散小波变换3层); function m_division_Callback(hObject, eventdata, handles)% hObje

22、ct handle to m_division (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) % -function m_division_line_Callback(hObject, eventdata, handles)%图像分割点 线global I; A= rgb2gray(I); %将彩色图转化成灰度图B=immultiply(A,1.5);subplot(2

23、,2,1);imshow(I);title(原图);subplot(2,2,2);imshow(B);title(点分割图片); % -function m_division_edge_Callback(hObject, eventdata, handles) %图像边缘检测 提取图像高频分量global I; %定义图片数据存储的全局变量 A=rgb2gray(I); % 图片用的是灰度图像%x,y=size(A);%BW=edge(A);BW1=edge(A,Canny,0.4,0.5) %edge调用Canny为检测算子判别阈值为0.5BW2=edge(A,log,0.4,0.5); %

24、 做阈值为0.07的高斯拉普拉斯(Log)算法 把subplot(2,2,1),imshow(A);title(原图);subplot(2,2,3),imshow(BW1);title(Canny算子边缘检测图像 阀值0.5);subplot(2,2,4),imshow(BW2);title(拉普拉斯算子边缘检测图像 阀值0.5); % -function m_zengqiang_Callback(hObject, eventdata, handles)% hObject handle to m_zengqiang (see GCBO)% eventdata reserved - to be

25、defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) % -function m_zengqiang_zhongzhi_Callback(hOguidebject, eventdata, handles) %中值滤波 使图像在某一部分 的频率信息通过,其他过低或过高都抑制global I; %滤除噪声 滤除噪声保持图像边缘J=rgb2gray(I); %将真彩色图像转换为灰度图像A= medfilt2(J); %对躁声进行中值滤波subplot(2,2,

26、1);imshow(I);title(原图);subplot(2,2,2);imshow(A);title(中值滤波后图像); % -function m_zengqiang_ditong_Callback(hObject, eventdata, handles) %低通滤波 让图像使高频分量抑制,低频分量通过global I; %定义图片数据存储的全局变量A=rgb2gray(I); %将真彩色图像转换为灰度图像subplot(2,2,1);imshow(I);title(原图);s=fftshift(fft2(A);a,b=size(s);a0=round(a/2);b0=round(b/2);d=10;for i=1:a for j=1:b distance=sqrt(i-a

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1