图像评价图像客观评价matlab源码含GUI

Posted Matlab咨询QQ1575304183

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了图像评价图像客观评价matlab源码含GUI相关的知识,希望对你有一定的参考价值。

一、简介

基于matlab GUI图像客观评价

二、源代码

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 a new 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', '所有图像文件 (*.bmp; *.jpg; *.gif; *emf)'; ...       
        '*.bmp',  '位图文件 (*.bmp)'; ...       
        '*.jpg', 'JPEG文件 (*.jpg)'; ...       
        '*.gif', 'GIF文件 (*.gif)'; ...        
        '*.emf', '图元文件 (*.emf)'; ...       
        '*.*',  '所有文件 (*.*)' ...  
        };
% 选择文件
[filename, pathname] = uigetfile( filter, '打开...');
if isequal(filename,0) | isequal(pathname,0), return, end
% 读入图像并显示
[X, map] = imread([pathname filename]);
colormap(map)
image(X)
% 设置坐标系为适合显示图像的方式
% 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
function SF = SpaceFrequency(image)
%计算空间频率
%=============================================
%空间频率反映了一幅图像空间域的总体活跃度
%=============================================

% clear all
% [filename,pathname]=uigetfile('*.*','图像');
% 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;

三、运行结果

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

完整代码或者仿真咨询添加QQ1575304183

以上是关于图像评价图像客观评价matlab源码含GUI的主要内容,如果未能解决你的问题,请参考以下文章

图像评价基于matlab GUI图像质量评价含Matlab源码 1373期

图像评价基于matlab GUI图像评价系统含Matlab源码 2185期

语音评价基于matlab语音质量客观评价(PESQ)含Matlab源码 1717期

毕设题目:Matlab图像融合

图像融合基于matlab高分辨率全色图小波变换图像融合(含评价指标)含Matlab源码 2405期

图像融合基于matlab高分辨率全色图IHS图像融合(含评价指标)含Matlab源码 2406期