function varargout = jiqishijue1111111111(varargin)
% JIQISHIJUE1111111111 M-file for jiqishijue1111111111.fig
% JIQISHIJUE1111111111, by itself, creates a new JIQISHIJUE1111111111 or raises the existing
% singleton*.
%
% H = JIQISHIJUE1111111111 returns the handle to a new JIQISHIJUE1111111111 or the handle to
% the existing singleton*.
%
% JIQISHIJUE1111111111('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in JIQISHIJUE1111111111.M with the given input arguments.
%
% JIQISHIJUE1111111111('Property','Value',...) creates a new JIQISHIJUE1111111111 or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before jiqishijue1111111111_OpeningFunction gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to jiqishijue1111111111_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
% Copyright 2002-2003 The MathWorks, Inc.
% Edit the above text to modify the response to help jiqishijue1111111111
% Last Modified by GUIDE v2.5 12-Nov-2008 15:44:49
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @jiqishijue1111111111_OpeningFcn, ...
'gui_OutputFcn', @jiqishijue1111111111_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 jiqishijue1111111111 is made visible.
function jiqishijue1111111111_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 jiqishijue1111111111 (see VARARGIN)
% Choose default command line output for jiqishijue1111111111
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes jiqishijue1111111111 wait for user response (see UIRESUME)
% uiwait(handles.figure1);
set(handles.pushbutton2,'enable','off');
set(handles.pushbutton3,'enable','off');
set(handles.pushbutton4,'enable','off');
set(handles.pushbutton5,'enable','off');
set(handles.pushbutton6,'enable','off');
set(handles.pushbutton7,'enable','off');
set(handles.pushbutton9,'enable','off');
set(handles.pushbutton8,'enable','off');
set(handles.pushbutton10,'enable','off');
set(handles.pushbutton11,'enable','off');
set(handles.pushbutton12,'enable','off');
set(handles.pushbutton14,'enable','off');
% --- Outputs from this function are returned to the command line.
function varargout = jiqishijue1111111111_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;
% --- Executes on button press in pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
set(handles.pushbutton2,'enable','on');
set(handles.pushbutton3,'enable','on');
set(handles.pushbutton4,'enable','on');
set(handles.pushbutton5,'enable','on');
set(handles.pushbutton6,'enable','on');
set(handles.pushbutton7,'enable','on');
set(handles.pushbutton9,'enable','on');
set(handles.pushbutton8,'enable','on');
set(handles.pushbutton10,'enable','on');
set(handles.pushbutton11,'enable','on');
set(handles.pushbutton12,'enable','on');
set(handles.pushbutton14,'enable','on');
handles.pic=imread('1.jpg');
handles.public=handles.pic;
guidata(hObject,handles);
imshow(handles.public);
% --- Executes on button press in pushbutton2.
function pushbutton2_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
switch class(handles.public)
case 'double'
guiyi=mat2gray(handles.public);
fanzhuan=1-guiyi;
case 'uint8'
fanzhuan=255-handles.public;
end
imshow(fanzhuan);
handles.public=fanzhuan;
guidata(hObject,handles);
% --- Executes on button press in pushbutton3.
function pushbutton3_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
guiyi=mat2gray(double(handles.public));
duishu=log(1+guiyi);
imshow(duishu);
handles.public=duishu;
guidata(hObject,handles);
% --- Executes on button press in pushbutton4.
function pushbutton4_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton4 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
guiyi=mat2gray(double(handles.public));
r=str2double(get(handles.edit1,'String'));
zhishu=guiyi.^r;
imshow(zhishu);
handles.public=zhishu;
guidata(hObject,handles);
% --- Executes on button press in pushbutton5.
function pushbutton5_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton5 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
pic=handles.public;
[m,n]=size(pic);
gailv=zeros(1,256); %hui du gai lv=0
for k=0:255
gailv(k+1)=length(find(pic==k))/(m*n); %jisuan mei ge hui du chu xian de gai lv
end
leijia=zeros(1,256);
for i=1:256
for j=1:i
leijia(i)=gailv(j)+leijia(i); %ji suan lei jia gai lv
end
end
duiyin=round((leijia*256)+0.5); %jiang lei jia gai lv duiying dao xiang yin de huidu
junhen=pic;
for i=0:255
junhen(find(pic==i))=duiyin(i+1); %dui xiang shu fu zhi
end
imshow(junhen);
% --- Executes on button press in pushbutton6.
function pushbutton6_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton6 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
plot(imhist(handles.public));
% --- Executes on button press in pushbutton7.
function pushbutton7_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton7 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
A=handles.public;
[m n]=size(A);
for i=2:m-1
j=2;
for j=2:n-1
handles.public(i,j)=(A(i-1,j-1)+A(i-1,j)+A(i-1,j+1)+A(i,j-1)+A(i,j)+A(i,j+1)+A(i+1,j-1)+A(i+1,j)+A(i+1,j+1))/9;
end
end
imshow(handles.public);
guidata(hObject,handles);
% --- Executes on button press in pushbutton8.
function pushbutton8_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton8 (see GCBO)
% eventdata reserved - to be defined in a future versio
评论0