【图像处理】图像与音乐播放matlab系统

本文介绍了一种基于MATLAB的数字图像处理应用系统,该系统提供了图像旋转缩放等功能。通过MATLAB工具,用户可以轻松地对图像进行处理,包括加载图像、查看图像信息等操作。

 1 简介

数字图像处理技术(Digital Image Processing)指的是所输入的图像被转换为一种数字信号形式,并且利用计算机对其进行相应处理的技术.目前,数字图像处理技术广泛应用于农业生产过程,医学诊断,科学研究,航空航天领域以及军事制导等领域.该技术能够对图像进行大量快速的处理,再现性好,处理精度高,具有很高的适用范围. 为方便用户更好地使用数字图像处理技术,本文应用MATLAB工具开发的数字图像处理应用系统,可为用户提供数字图像旋转缩放​功能。

2 部分代码

function varargout = Imgproc(varargin)% IMGPROC MATLAB code for Imgproc.fig%      IMGPROC, by itself, creates a new IMGPROC or raises the existing%      singleton*.%%      H = IMGPROC returns the handle to a new IMGPROC or the handle to%      the existing singleton*.%%      IMGPROC('CALLBACK',hObject,eventData,handles,...) calls the local%      function named CALLBACK in IMGPROC.M with the given input arguments.%%      IMGPROC('Property','Value',...) creates a new IMGPROC or raises the%      existing singleton*.  Starting from the left, property value pairs are%      applied to the GUI before Imgproc_OpeningFcn gets called.  An%      unrecognized property name or invalid value makes property application%      stop.  All inputs are passed to Imgproc_OpeningFcn via varargin.%%      *See GUI Options on GUIDE's Tools menu.  Choose "GUI allows only one%      instance to run (singleton)".%% See also: GUIDE, GUIDATA, GUIHANDLES% Edit the above text to modify the response to help Imgproc% Last Modified by GUIDE v2.5 04-Jul-2012 23:55:05% Begin initialization code - DO NOT EDITgui_Singleton = 1;gui_State = struct('gui_Name',       mfilename, ...                   'gui_Singleton',  gui_Singleton, ...                   'gui_OpeningFcn', @Imgproc_OpeningFcn, ...                   'gui_OutputFcn',  @Imgproc_OutputFcn, ...                   'gui_LayoutFcn',  [] , ...                   'gui_Callback',   []);if nargin && ischar(varargin{1})    gui_State.gui_Callback = str2func(varargin{1});endif nargout    [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});else    gui_mainfcn(gui_State, varargin{:});end% End initialization code - DO NOT EDIT% --------------------------------------------------------------------% --------------------------------------------------------------------% --- Executes just before Imgproc is made visible.function Imgproc_OpeningFcn(hObject, eventdata, handles, varargin)% 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)% varargin   command line arguments to Imgproc (see VARARGIN)% Choose default command line output for Imgproc%--------------------------画白板及初始化------------------------ handles.board=imread('whiteboard.jpg');imshow(handles.board);handles.pex=Pexe();handles.output = hObject;% Update handles structureguidata(hObject, handles);% UIWAIT makes Imgproc wait for user response (see UIRESUME)% uiwait(handles.figure1);% --------------------------------------------------------------------% --------------------------------------------------------------------% --- Outputs from this function are returned to the command line.function varargout = Imgproc_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 handles and user data (see GUIDATA)% Get default command line output from handles structurevarargout{1} = handles.output;% --------------------------------------------------------------------% -------------------载入图像回调函数----------------------------------------% --- Executes on button press in pushbutton_load.function pushbutton_load_Callback(hObject, eventdata, handles)% hObject    handle to pushbutton_load (see GCBO)% eventdata  reserved - to be defined in a future version of MATLAB% handles    structure with handles and user data (see GUIDATA) [filename,pathname]=uigetfile({'*.jpg;*.png',...    '可以打开的文件';},'选定图片','MultiSelect','off');     fullpath=fullfile(pathname,filename);     handles.addr=fullpath;     Temp=imread(handles.addr);     handles.pex.getdata(Temp);     [x,y,z]=size(Temp);     handles.board=combo(handles.board,handles.pex.data);     imshow(handles.board);     guidata(hObject,handles);% --------------------------------------------------------------------      % ------------------载入图像创建函数----------------------------------% --- Executes during object creation, after setting all properties.function pushbutton_load_CreateFcn(hObject, eventdata, handles)% hObject    handle to pushbutton_load (see GCBO)% eventdata  reserved - to be defined in a future version of MATLAB% handles    empty - handles not created until after all CreateFcns calledhandles.pushbutton_load=hObject;guidata(hObject,handles);    % --------------------------------------------------------------------  % -------------------图像信息------------------------------------------% --- Executes on button press in pushbutton_info.function pushbutton_info_Callback(hObject, eventdata, handles)% hObject    handle to pushbutton_info (see GCBO)% eventdata  reserved - to be defined in a future version of MATLAB% handles    structure with handles and user data (see GUIDATA)info=imfinfo(handles.addr);msgbox({'路径及名称';info.Filename;' ';...        '修改时间';info.FileModDate;' ';...        '文件大小';int2str(info.FileSize);' ';...        '文件格式';info.Format;' ';...        '图像高度';int2str(info.Height);' ';...        '图像宽度';int2str(info.Width);' ';...         '位深';int2str(info.BitDepth);' '},...         '原图信息');guidata(hObject,handles);% --------------------------------------------------------------------% ------------------撤销按钮----------------------------------------% --- Executes on button press in pushbutton_revoke.function pushbutton_revoke_Callback(hObject, eventdata, handles)% hObject    handle to pushbutton_revoke (see GCBO)% eventdata  reserved - to be defined in a future version of MATLAB% handles    structure with handles and user data (see GUIDATA)%axes(handles.axes1);    %global T%imshow(T);%handles.img=T;%guidata(hObject,handles);% --------------------------------------------------------------------% --------------------------------------------------------------------     %-------------------图层合成函数--------------  f

3 仿真结果

4 参考文献

[1]李寅, 李小红, 金建. 基于MATLAB图像处理系统的开发与实现[C]// 全国第21届计算机技术与应用学术会议(CACIS·2010)暨全国第2届安全关键技术与应用学术会议论文集. 2010.

博主简介:擅长智能优化算法、神经网络预测、信号处理、元胞自动机、图像处理、路径规划、无人机等多种领域的Matlab仿真,相关matlab代码问题可私信交流。

部分理论引用网络文献,若有侵权联系博主删除。

5 代码下载

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

matlab科研助手

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值