ImageManipulation.asv
上传用户:changqing
上传日期:2013-01-11
资源大小:2384k
文件大小:26k
- function varargout = ImageManipulation(varargin)
- % ImageManipulation M-file for ImageManipulation.fig
- % ImageManipulation, by itself, creates a new ImageManipulation or raises the existing
- % singleton*.
- %
- % H = ImageManipulation returns the handle to a new ImageManipulation or the handle to
- % the existing singleton*.
- %
- % ImageManipulation('CALLBACK',hObject,eventData,handles,...) calls the local
- % function named CALLBACK in ImageManipulation.M with the given input arguments.
- %
- % ImageManipulation('Property','Value',...) creates a new ImageManipulation or raises the
- % existing singleton*. Starting from the left, property value pairs are
- % applied to the GUI before ImageManipulation_OpeningFunction gets called. An
- % unrecognized property name or invalid value makes property application
- % stop. All inputs are passed to ImageManipulation_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 ImageManipulation
- % Last Modified by GUIDE v2.5 18-Apr-2008 02:31:06
- % Begin initialization code - DO NOT EDIT
- gui_Singleton = 1;
- gui_State = struct('gui_Name', mfilename, ...
- 'gui_Singleton', gui_Singleton, ...
- 'gui_OpeningFcn', @ImageManipulation_OpeningFcn, ...
- 'gui_OutputFcn', @ImageManipulation_OutputFcn, ...
- 'gui_LayoutFcn', [] , ...
- 'gui_Callback', []);
- if nargin && ischar(varargin{1})
- gui_State.gui_Callback = str2func(varargin{1});
- end
- if 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 ImageManipulation is made visible.
- function ImageManipulation_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 ImageManipulation (see VARARGIN)
- % Choose default command line output for ImageManipulation
- handles.output = hObject;
- % Update handles structure
- guidata(hObject, handles);
- % UIWAIT makes ImageManipulation wait for user response (see UIRESUME)
- % uiwait(handles.figure1);
- % --- Outputs from this function are returned to the command line.
- function varargout = ImageManipulation_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 structure
- varargout{1} = handles.output;
- % --------------------------------------------------------------------
- function file_Callback(hObject, eventdata, handles)
- % hObject handle to file (see GCBO)
- % eventdata reserved - to be defined in a future version of MATLAB
- % handles structure with handles and user data (see GUIDATA)
- % --------------------------------------------------------------------
- function openfile_Callback(hObject, eventdata, handles)
- % hObject handle to openfile (see GCBO)
- % eventdata reserved - to be defined in a future version of MATLAB
- % handles structure with handles and user data (see GUIDATA)
- [filename, pathname, filterindex] = uigetfile({'*.bmp;*.cur;*.gif;*.hdf;*.ico;*.jpg;*.jpeg;*.pbm;*.pcx;*.pgm;*.png;*.ppm;*.ras;*.tiff;*.xwd',...
- '所有图片文件 (*.bmp;*.cur;*.gif;*.hdf;*.ico;*.jepg;*.pbm;*.pcx;*.pgm;*.png;*.ppm;*.ras;*.tiff;*.xwd)';...
- '*.bmp','bmp格式文件(*.bmp)'; '*.cur','cur格式文件(*.cur)';'*.gif','gif格式文件(*.gif)';'*.hdf','hdf格式文件(*.hdf)';'*.ico','ico格式文件(*.ico)';...
- '*.jpg','jpg格式文件(*.jpg)';'*.jpeg','jpeg格式文件(*.jpeg)';'*.pbm','pbm格式文件(*.pbm)';'*.pcx','pcx格式文件(*.pcx)';'*.pgm','pgm格式文件(pgm)';...
- '*.png','png格式文件(*.png)';'*.ppm','ppm格式文件(*.ppm)';'*.ras','ras格式文件(*.ras)';'*.tiff','tiff格式文件(*.tiff)';'*.xwd','xwd格式文件(*.xwd)'},...
- '打开图片文件');
- global Image
- global changedImage
- global XX
- global mmap
- global myflag
- if filename==0
- return;
- end
- Image=imread(strcat(pathname,filename));
- changedImage=Image;
- Info=imfinfo(strcat(pathname,filename));
- cla(handles.original);
- cla(handles.changed);
- imshow(Image,'parent',handles.original);
- imshow(changedImage,'parent',handles.changed);
- myflag=[0 0 0 0];
- if strcmp(Info.ColorType,'indexed')
- myflag(1)=1;
- s='索引图像';
- elseif strcmp(Info.ColorType,'grayscale')
- myflag(2)=1;
- s='灰度图像';
- elseif strcmp(Info.ColorType,'truecolor')
- myflag(3)=1;
- s='真彩图像';
- elseif ffisbw(Image)
- myflag(4)=1;
- s='二值图像';
- end
- set(handles.information,'string',sprintf([' 文件名:',filename,'n','n',...
- '颜色类型:',s,'n','n',' 大小:',...
- num2str(Info.Height),'*',num2str(Info.Width),'n','n',' ',...
- '占用空间:',num2str(Info.FileSize),'Bytes',]));
- if myflag(1)
- [XX,mmap]=imread(strcat(pathname,filename));
- elseif myflag(4)
- set(handles.imagestyle,'string','原始图像为二值图像');
- end
-
-
- % --------------------------------------------------------------------
- function saveas_Callback(hObject, eventdata, handles)
- % hObject handle to saveas (see GCBO)
- % eventdata reserved - to be defined in a future version of MATLAB
- % handles structure with handles and user data (see GUIDATA)
- global changedImage
- global XX
- global mmap
- [filename, pathname, filterindex] = uiputfile({'*.bmp;*.cur;*.gif;*.hdf;*.ico;*.jpg;*.jpeg;*.pbm;*.pcx;*.pgm;*.png;*.ppm;*.ras;*.tiff;*.xwd',...
- '所有图片文件 (*.bmp;*.cur;*.gif;*.hdf;*.ico;*.jepg;*.pbm;*.pcx;*.pgm;*.png;*.ppm;*.ras;*.tiff;*.xwd)';...
- '*.bmp','bmp格式文件(*.bmp)'; '*.cur','cur格式文件(*.cur)';'*.gif','gif格式文件(*.gif)';'*.hdf','hdf格式文件(*.hdf)';'*.ico','ico格式文件(*.ico)';...
- '*.jpg','jpg格式文件(*.jpg)';'*.jpeg','jpeg格式文件(*.jpeg)';'*.pbm','pbm格式文件(*.pbm)';'*.pcx','pcx格式文件(*.pcx)';'*.pgm','pgm格式文件(pgm)';...
- '*.png','png格式文件(*.png)';'*.ppm','ppm格式文件(*.ppm)';'*.ras','ras格式文件(*.ras)';'*.tiff','tiff格式文件(*.tiff)';'*.xwd','xwd格式文件(*.xwd)'},...
- '保存图片文件');
- if filename==0
- return;
- end
- axes (handles.changed);
- if ffisind(changedImage)
- imwrite(XX,mmap,strcat(pathname,filename));
- else
- imwrite(changedImage,strcat(pathname,filename));
- end
- % --------------------------------------------------------------------
- function Quit_Callback(hObject, eventdata, handles)
- % hObject handle to Quit (see GCBO)
- % eventdata reserved - to be defined in a future version of MATLAB
- % handles structure with handles and user data (see GUIDATA)
- clear all;
- close all;
- % --- Executes on mouse press over axes background.
- function changed_ButtonDownFcn(hObject, eventdata, handles)
- % hObject handle to changed (see GCBO)
- % eventdata reserved - to be defined in a future version of MATLAB
- % handles structure with handles and user data (see GUIDATA)
- % --- Executes on selection change in viewstyle.
- function viewstyle_Callback(hObject, eventdata, handles)
- % hObject handle to viewstyle (see GCBO)
- % eventdata reserved - to be defined in a future version of MATLAB
- % handles structure with handles and user data (see GUIDATA)
- % Hints: contents = get(hObject,'String') returns viewstyle contents as cell array
- % contents{get(hObject,'Value')} returns selected item from viewstyle
- global Image
- global changedImage
- global XX
- global mmap
- global myflag
- s=get(hObject,'Value');
-
- if ffisind(changedImage)
- % 此时的图像是索引图像
- x=XX;
- map=mmap;
- switch s
- case 1
- imshow(changedImage,'parent',handles.changed);
- case 2
- changedImage=ind2gray(x,map);
- imshow(changedImage,'parent',handles.changed);
- case 3
- changedImage=ind2rgb(x,map);
- imshow(changedImage,'parent',handles.changed);
- case 4
- changdeImage=im2bw(changedImage);
- imshow(changedImage,'parent',handles.changed);
- end
- elseif ffisgray(changedImage)
- % 此时的图像是灰度图像
- switch s
- case 1
- [XX,mmap]=gray2ind(changedImage);
- imshow(XX,mmap,'parent',handles.changed);
- case 2
- imshow(changedImage,'parent',handles.changed);
- case 3
- msgbox('无法将灰度图像转换为真彩图像','警告');
- return;
- case 4
- changedImage=im2bw(changedImage);
- imshow(changedImage,'parent',handles.changed);
- end
- elseif ffisrgb(changedImage)
- % 此时的图像是真彩图像
- switch s
- case 1
- [XX,mmap]=rgb2ind(changedImage,128);
- imshow(XX,mmap,'parent',handles.changed);
- case 2
- changedImage=rgb2gray(changedImage);
- imshow(changedImage,'parent',handles.changed);
- case 3
- imshow(changedImage,'parent',handles.changed);
- case 4
- changedImage=im2bw(changedImage);
- imshow(changedImage,'parent',handles.changed);
- end
- elseif ffisbw(changedImage)
- % 此时为二值图像
- switch s
- case 1
- [XX,mmap]=gray2ind(changedImage);
- imshow(XX,mmap,'parent',handles.changed);
- case 2
- msgbox('无法将二值图像转换为灰度图像','警告');
- return;
- case 3
- msgbox('无法将二值图像转换为真彩图像','警告');
- return;
- case 4
- imshow(changedImage,'parent',handles.changed);
-
- end
- end
-
-
-
- % --- Executes during object creation, after setting all properties.
- function viewstyle_CreateFcn(hObject, eventdata, handles)
- % hObject handle to viewstyle (see GCBO)
- % eventdata reserved - to be defined in a future version of MATLAB
- % handles empty - handles not created until after all CreateFcns called
- % Hint: popupmenu controls usually have a white background on Windows.
- % See ISPC and COMPUTER.
- if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
- set(hObject,'BackgroundColor','white');
- end
- % --- Executes on selection change in imagedeal.
- function imagedeal_Callback(hObject, eventdata, handles)
- % hObject handle to imagedeal (see GCBO)
- % eventdata reserved - to be defined in a future version of MATLAB
- % handles structure with handles and user data (see GUIDATA)
- % Hints: contents = get(hObject,'String') returns imagedeal contents as cell array
- % contents{get(hObject,'Value')} returns selected item from imagedeal
- global Image
- global changedImage
- global XX
- global mmap
- s=get(hObject,'Value');
- switch s
- case 1
- if ffisbw(changedImage)
- msgbox('无法对二值图像灰度调整','警告');
- return;
- end
- changedImage=imadjust(changedImage,[0.15,0.85],[]);
- imshow(changedImage,'parent',handles.changed);
- case 2
- if ffisind(changedImage)
- x=XX;
- map=mmap;
- changedImage=ind2gray(x,map);
- elseif ffisrgb(changedImage)
- changedImage=rgb2gray(changedImage);
- end
-
- f1=200;g1=256;
- k=g1/f1;
- [m,n]=size(changedImage);
- X=double(changedImage);
- for i=1:m
- for j=1:n
- f=X(i,j);
- g(i,j)=0;
- if(f>=0)&(f<f1)
- g(i,j)=g1-k*f;
- else
- g(i,j)=0;
- end
- end
- end
- changedImage=mat2gray(g);
- imshow(changedImage,'parent',handles.changed);
-
- case 3
- if ffisind(changedImage)
- x=XX;
- map=mmap;
- changedImage=ind2gray(x,map);
- elseif ffisrgb(changedImage)
- changedImage=rgb2gray(changedImage);
- end
-
- c=255/log(256);
- x=0:1:125;
- y=c*log(1+x);
- [m,n]=size(changedImage);
- X=double(changedImage);
- for i=1:m;
- for j=1:n
- g(i,j)=c*log(X(i,j)+1);
- end
- end
- changedImage=mat2gray(g);
- imshow(changedImage,'parent',handles.changed);
- end
- % --- Executes during object creation, after setting all properties.
- function imagedeal_CreateFcn(hObject, eventdata, handles)
- % hObject handle to imagedeal (see GCBO)
- % eventdata reserved - to be defined in a future version of MATLAB
- % handles empty - handles not created until after all CreateFcns called
- % Hint: popupmenu controls usually have a white background on Windows.
- % See ISPC and COMPUTER.
- if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
- set(hObject,'BackgroundColor','white');
- end
- % --- Executes on selection change in straightdeal.
- function straightdeal_Callback(hObject, eventdata, handles)
- % hObject handle to straightdeal (see GCBO)
- % eventdata reserved - to be defined in a future version of MATLAB
- % handles structure with handles and user data (see GUIDATA)
- % Hints: contents = get(hObject,'String') returns straightdeal contents as cell array
- % contents{get(hObject,'Value')} returns selected item from straightdeal
- global Image
- global changedImage
- global XX
- global mmap
- if ffisind(changedImage)
- changedImage=ind2gray(XX,mmap);
- elseif ffisrgb(changedImage)
- changedImage=rgb2gray(changedImage);
- end
- s=get(hObject,'Value');
- switch s
- case 1
- figure;
- imhist(changedImage);
- case 2
- if ffisbw(changedImage)
- msgbox('二值图像无法实现均衡化','警告');
- return;
- end
- figure;
- changedImage=histeq(changedImage);
- imhist(changedImage);
- imshow(changedImage,'parent',handles.changed);
- end
-
- % --- Executes during object creation, after setting all properties.
- function straightdeal_CreateFcn(hObject, eventdata, handles)
- % hObject handle to straightdeal (see GCBO)
- % eventdata reserved - to be defined in a future version of MATLAB
- % handles empty - handles not created until after all CreateFcns called
- % Hint: popupmenu controls usually have a white background on Windows.
- % See ISPC and COMPUTER.
- if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
- set(hObject,'BackgroundColor','white');
- end
- function edit2_Callback(hObject, eventdata, handles)
- % hObject handle to edit2 (see GCBO)
- % eventdata reserved - to be defined in a future version of MATLAB
- % handles structure with handles and user data (see GUIDATA)
- % Hints: get(hObject,'String') returns contents of edit2 as text
- % str2double(get(hObject,'String')) returns contents of edit2 as a double
- % --- Executes during object creation, after setting all properties.
- function edit2_CreateFcn(hObject, eventdata, handles)
- % hObject handle to edit2 (see GCBO)
- % eventdata reserved - to be defined in a future version of MATLAB
- % handles empty - handles not created until after all CreateFcns called
- % Hint: edit controls usually have a white background on Windows.
- % See ISPC and COMPUTER.
- if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
- set(hObject,'BackgroundColor','white');
- end
- % --- Executes on selection change in swaves.
- function swaves_Callback(hObject, eventdata, handles)
- % hObject handle to swaves (see GCBO)
- % eventdata reserved - to be defined in a future version of MATLAB
- % handles structure with handles and user data (see GUIDATA)
- % Hints: contents = get(hObject,'String') returns swaves contents as cell array
- % contents{get(hObject,'Value')} returns selected item from swaves
- global Image
- global changedImage
- global XX
- global mmap
- if ffisbw(changedImage)
- msgbox('当前图像为二值图像','注意');
- return;
- end
- if ffisind(changedImage)
- x=XX;
- map=mmap;
- changedImage=ind2gray(x,map);
- elseif ffisrgb(changedImage)
- changedImage=rgb2gray(changedImage);
- end
- s=get(hObject,'Value');
- switch s
- case 1
- changedImage=filter2(fspecial('average',5),changedImage)/255;
- imshow(changedImage,'parent',handles.changed);
- case 2
- domain=[0 0 1 0 0
- 0 0 1 0 0
- 1 1 1 1 1
- 0 0 1 0 0
- 0 0 1 0 0];
- changedImage=ordfilt2(changedImage,5,domain);
- imshow(changedImage,'parent',handles.changed);
- case 3
- h=fspecial('unsharp',0.5);
- changedImage=filter2(h,changedImage)/255;
- imshow(changedImage,'parent',handles.changed);
- case 4
- h1=fspecial('sobel');
- changedImage=conv2(changedImage,h1);
- imshow(changedImage,'parent',handles.changed);
- case 5
- h2=fspecial('prewitt');
- changedImage=conv2(changedImage,h2);
- imshow(changedImage,'parent',handles.changed);
- case 6
- h3=fspecial('log');
- changedImage=conv2(changedImage,h3);
- imshow(changedImage,'parent',handles.changed);
- end
- % --- Executes during object creation, after setting all properties.
- function swaves_CreateFcn(hObject, eventdata, handles)
- % hObject handle to swaves (see GCBO)
- % eventdata reserved - to be defined in a future version of MATLAB
- % handles empty - handles not created until after all CreateFcns called
- % Hint: popupmenu controls usually have a white background on Windows.
- % See ISPC and COMPUTER.
- if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
- set(hObject,'BackgroundColor','white');
- end
- % --- Executes on selection change in fwave.
- function fwave_Callback(hObject, eventdata, handles)
- % hObject handle to fwave (see GCBO)
- % eventdata reserved - to be defined in a future version of MATLAB
- % handles structure with handles and user data (see GUIDATA)
- % Hints: contents = get(hObject,'String') returns fwave contents as cell array
- % contents{get(hObject,'Value')} returns selected item from fwave
- global changedImage
- global XX
- global mmap
- if ffisbw(changedImage)
- msgbox('二值图像滤波无意义');
- return;
- end
- if ffisind(changedImage)
- x=XX;
- map=mmap;
- changedImage=ind2gray(x,map);
- elseif ffisrgb(changedImage)
- changedImage=rgb2gray(changedImage);
- end
- s=get(hObject,'Value');
- switch s
- case 1
- f=double(changedImage);
- g=fft2(f);
- g=fftshift(g);
- [N1,N2]=size(g);
- n=2;
- d0=50;
- n1=fix(N1/2);
- n2=fix(N2/2);
- for i=1:N1
- for j=1:N2
- d=sqrt((i-n1)^2+(j-n2)^2);
- h=1/(1+0.414*(d/d0)^(2*n));
- result(i,j)=h*g(i,j);
- end
- end
- result=ifftshift(result);
- changedImage=ifft2(result);
- changedImage=uint8(real(changedImage));
- imshow(changedImage,'parent',handles.changed);
- case 2
- f=double(changedImage);
- g=fft2(f);
- g=fftshift(g);
- [N1,N2]=size(g);
- n=2;
- d0=50;
- n1=fix(N1/2);
- n2=fix(N2/2);
- for i=1:N1
- for j=1:N2
- d=sqrt((i-n1)^2+(j-n2)^2);
- if d==0
- h=0;
- else
- h=1/(1+(d0/d)^(2*n));
- end
- result(i,j)=h*g(i,j);
- end
- end
- result=ifftshift(result);
- changedImage=ifft2(result);
- changedImage=uint8(real(changedImage));
- imshow(changedImage,'parent',handles.changed);
- end
-
-
- % --- Executes during object creation, after setting all properties.
- function fwave_CreateFcn(hObject, eventdata, handles)
- % hObject handle to fwave (see GCBO)
- % eventdata reserved - to be defined in a future version of MATLAB
- % handles empty - handles not created until after all CreateFcns called
- % Hint: popupmenu controls usually have a white background on Windows.
- % See ISPC and COMPUTER.
- if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
- set(hObject,'BackgroundColor','white');
- end
- % --- Executes during object creation, after setting all properties.
- function imagestyle_CreateFcn(hObject, eventdata, handles)
- % hObject handle to imagestyle (see GCBO)
- % eventdata reserved - to be defined in a future version of MATLAB
- % handles empty - handles not created until after all CreateFcns called
- % --- Executes on button press in lightincrease.
- function lightincrease_Callback(hObject, eventdata, handles)
- % hObject handle to lightincrease (see GCBO)
- % eventdata reserved - to be defined in a future version of MATLAB
- % handles structure with handles and user data (see GUIDATA)
- global changedImage
- changedImage=immultiply(changedImage,1.1);
- imshow(changedImage,'parent',handles.changed);
- % --- Executes on button press in darkincrease.
- function darkincrease_Callback(hObject, eventdata, handles)
- % hObject handle to darkincrease (see GCBO)
- % eventdata reserved - to be defined in a future version of MATLAB
- % handles structure with handles and user data (see GUIDATA)
- global changedImage
- changedImage=immultiply(changedImage,0.9);
- imshow(changedImage,'parent',handles.changed);
- % --- Executes on button press in pushbutton9.
- function pushbutton9_Callback(hObject, eventdata, handles)
- % hObject handle to pushbutton9 (see GCBO)
- % eventdata reserved - to be defined in a future version of MATLAB
- % handles structure with handles and user data (see GUIDATA)
- global changedImage
- changedImage=imrotate(changedImage,5, 'bicubic','crop' );
- imshow(changedImage,'parent',handles.changed);
- % --- Executes on button press in pushbutton12.
- function pushbutton12_Callback(hObject, eventdata, handles)
- % hObject handle to pushbutton12 (see GCBO)
- % eventdata reserved - to be defined in a future version of MATLAB
- % handles structure with handles and user data (see GUIDATA)
- global changedImage
- changedImage=imrotate(changedImage,-5, 'bicubic','crop');
- imshow(changedImage,'parent',handles.changed);
- % --- Executes on button press in back.
- function back_Callback(hObject, eventdata, handles)
- % hObject handle to back (see GCBO)
- % eventdata reserved - to be defined in a future version of MATLAB
- % handles structure with handles and user data (see GUIDATA)
- global Image
- global changedImage
- changedImage=Image;
- imshow(changedImage,'parent',handles.changed);
- % --- Executes during object creation, after setting all properties.
- function original_CreateFcn(hObject, eventdata, handles)
- % hObject handle to original (see GCBO)
- % eventdata reserved - to be defined in a future version of MATLAB
- % handles empty - handles not created until after all CreateFcns called
- % Hint: place code in OpeningFcn to populate original
- % --------------------------------------------------------------------
- function edit_Callback(hObject, eventdata, handles)
- % hObject handle to edit (see GCBO)
- % eventdata reserved - to be defined in a future version of MATLAB
- % handles structure with handles and user data (see GUIDATA)
- % --------------------------------------------------------------------
- function HELP_Callback(hObject, eventdata, handles)
- % hObject handle to HELP (see GCBO)
- % eventdata reserved - to be defined in a future version of MATLAB
- % handles structure with handles and user data (see GUIDATA)
- % --------------------------------------------------------------------
- function GOback_Callback(hObject, eventdata, handles)
- % hObject handle to GOback (see GCBO)
- % eventdata reserved - to be defined in a future version of MATLAB
- % handles structure with handles and user data (see GUIDATA)
- global Image
- global changedImage
- changedImage=Image;
- imshow(changedImage,'parent',handles.changed);
- % --------------------------------------------------------------------
- function copy_Callback(hObject, eventdata, handles)
- % hObject handle to copy (see GCBO)
- % eventdata reserved - to be defined in a future version of MATLAB
- % handles structure with handles and user data (see GUIDATA)
- global Image
- global changedImage
- changedImage=Image;
- % --------------------------------------------------------------------
- function paste_Callback(hObject, eventdata, handles)
- % hObject handle to paste (see GCBO)
- % eventdata reserved - to be defined in a future version of MATLAB
- % handles structure with handles and user data (see GUIDATA)
- global Image
- global changedImage
- imshow(changedImage,'parent',handles.changed);
- % --------------------------------------------------------------------
- function userguide_Callback(hObject, eventdata, handles)
- % hObject handle to userguide (see GCBO)
- % eventdata reserved - to be defined in a future version of MATLAB
- % handles structure with handles and user data (see GUIDATA)
- open('user_guide.pdf');
- % --------------------------------------------------------------------
- function related_Callback(hObject, eventdata, handles)
- % hObject handle to related (see GCBO)
- % eventdata reserved - to be defined in a future version of MATLAB
- % handles structure with handles and user data (see GUIDATA)
- msgbox(sprintf(['名称:图像增强','n','程序作者:房磊 汪滢 李彤','']),'关于');