A list,

Objective evaluation based on MATLAB GUI image

Ii. Source code

function varargout = Kgpj(varargin)
%KGPJ M-file for Kgpj.fig
%      KGPJ, by itself, creates a new KGPJ or raises the existing
%      singleton*.
%
%      H = KGPJ returns the handle to a new KGPJ or the handle to
%      the existing singleton*.
%
%      KGPJ('Property'.'Value',...). creates anew KGPJ using the
%      given property value pairs. Unrecognized properties are passed via
%      varargin to Kgpj_OpeningFcn.  This calling syntax produces a
%      warning when there is an existing singleton*.
%
%      KGPJ('CALLBACK') and KGPJ('CALLBACK',hObject,...) call the
%      local function named CALLBACK in KGPJ.M with the given input
%      arguments.
%
%      *See GUI Options on GUIDE's Tools menu.  Choose "GUI allows only one % instance to run (singleton)".
%
%  

%  

% 

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...
                   'gui_Singleton',  gui_Singleton, ...
                   'gui_OpeningFcn', @Kgpj_OpeningFcn, ...
                   'gui_OutputFcn',  @Kgpj_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 Kgpj is made visible.
function Kgpj_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   unrecognized PropertyName/PropertyValue pairs from the
%            command line (see VARARGIN)

% Choose default command line output for Kgpj
handles.output = hObject;

% Update handles structure
guidata(hObject, handles);

% UIWAIT makes Kgpj wait for user response (see UIRESUME)
% uiwait(handles.figure1);


% --- Outputs from this function are returned to the command line.
function varargout = Kgpj_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 pushbuttonLoadImage.
function pushbuttonLoadImage_Callback(hObject, eventdata, handles)
% hObject    handle to pushbuttonLoadImage (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
filter = {...'*.bmp; *.jpg; *.gif; *.emf'.'All image files (*.bmp; *.jpg; *.gif; *emf)'; .'*.bmp'.'Bitmap file (*.bmp)'; .'*.jpg'.'JPEG files (*.jpg)'; .'*.gif'.'GIF files (*. GIF)'; .'*.emf'.'Metafile (*.emf)'; .'*. *'.'All files (*.*)'. }; % Select file [filename, pathName] = uigetFile (filter,'open... ');
if isequal(filename,0) | isequal(pathname,0).return, end % reads the image and displays [X,map] = imread([pathname filename]);
colormap(map) image(X) % Sets the coordinate system to the appropriate way to display the image %axis imageset(gca, 'vis'.'off')

set(gcf,'UserData',X);

% --- Executes during object creation, after setting all properties.
function pushbuttonLoadImage_CreateFcn(hObject, eventdata, handles)
% hObject    handle to pushbuttonLoadImage (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 selection change in popupmenu.
function popupmenu_Callback(hObject, eventdata, handles)
% hObject    handle to popupmenu (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: contents = cellstr(get(hObject,'String')) returns popupmenu contents as cell array
%        contents{get(hObject,'Value')} returns selected item from popupmenu


% --- Executes during object creation, after setting all properties.
function popupmenu_CreateFcn(hObject, eventdata, handles)
% hObject    handle to popupmenu (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 editJG_Callback(hObject, eventdata, handles)
% hObject    handle to editJG (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 editJG as text
%        str2double(get(hObject,'String')) returns contents of editJG as a double
 
 
 

% --- Executes during object creation, after setting all properties.
function editJG_CreateFcn(hObject, eventdata, handles)
% hObject    handle to editJG (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 the function of SF = SpaceFrequency computing spatial frequency (image) % % = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = % spatial frequency reflects the overall activity of an image spatial domain %============================================= % clear all % [filename,pathname]=uigetfile('*. *'.'image');
% A=imread([pathname,filename]);
A=image;

%s=size(size(A));
%if s(2)= =3
%   A=rgb2gray(A);
%end

A=double(A);
[M,N]=size(A);
sum1=0;
sum2=0;
Copy the code

3. Operation results









Fourth, note

Version: 2014 a