标签:插入图片 temp odi content hit efi mat ted move
基于matlab GUI综合特征的图像检索
function varargout = Run(varargin)
% RUN M-file for Run.fig
% RUN, by itself, creates a new RUN or raises the existing
% singleton*.
%
% H = RUN returns the handle to a new RUN or the handle to
% the existing singleton*.
%
% RUN(‘CALLBACK‘,hObject,eventData,handles,...) calls the local
% function named CALLBACK in RUN.M with the given input arguments.
%
% RUN(‘Property‘,‘Value‘,...) creates a new RUN or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before Run_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to Run_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 Run
% Last Modified by GUIDE v2.5 03-Jan-2013 16:06:52
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct(‘gui_Name‘, mfilename, ...
‘gui_Singleton‘, gui_Singleton, ...
‘gui_OpeningFcn‘, @Run_OpeningFcn, ...
‘gui_OutputFcn‘, @Run_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 Run is made visible.
function Run_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 Run (see VARARGIN)
axes( handles.axes1 ) ;
imshow( ‘GUI选择.jpg‘ ) ;
axes( handles.axes2 ) ;
imshow( ‘GUI颜色.jpg‘ ) ;
axes( handles.axes3 ) ;
imshow( ‘GUI形状.jpg‘ ) ;
axes( handles.axes4 ) ;
imshow( ‘GUI纹理.jpg‘ ) ;
axes( handles.axes9 )
imshow( ‘GUI问号.jpg‘ ) ;
axes( handles.axes5 )
imshow( ‘GUI问号.jpg‘ ) ;
axes( handles.axes6 )
imshow( ‘GUI问号.jpg‘ ) ;
axes( handles.axes7 )
imshow( ‘GUI问号.jpg‘ ) ;
axes( handles.axes8 )
imshow( ‘GUI问号.jpg‘) ;
handles.Chose = 6 ;
guidata(hObject, handles);
handles.To_be_matched = 0 ;
guidata(hObject, handles);
handles.color_w = 0.5 ;
guidata(hObject, handles);
handles.edge_w = 0.01 ;
guidata(hObject, handles);
handles.texture_w =0.01 ;
guidata(hObject, handles);
% Choose default command line output for Run
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes Run wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = Run_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 slider movement.
function slider_color_Callback(hObject, eventdata, handles)
% hObject handle to slider_color (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
temp_color_w = get( hObject , ‘Value‘ ) ;
set( handles.edit_color , ‘String‘ , num2str(temp_color_w) ) ;
handles.color_w = temp_color_w ;
guidata( hObject , handles ) ;
% Hints: get(hObject,‘Value‘) returns position of slider
% get(hObject,‘Min‘) and get(hObject,‘Max‘) to determine range of slider
% --- Executes during object creation, after setting all properties.
function slider_color_CreateFcn(hObject, eventdata, handles)
% hObject handle to slider_color (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: slider controls usually have a light gray background.
if isequal(get(hObject,‘BackgroundColor‘), get(0,‘defaultUicontrolBackgroundColor‘))
set(hObject,‘BackgroundColor‘,[.9 .9 .9]);
end
set ( hObject , ‘Value‘ , 0 ) ;
% --- Executes on slider movement.
function slider_edge_Callback(hObject, eventdata, handles)
% hObject handle to slider_edge (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,‘Value‘) returns position of slider
% get(hObject,‘Min‘) and get(hObject,‘Max‘) to determine range of slider
temp_edge_w = get( hObject , ‘Value‘ ) ;
set( handles.edit_edge , ‘String‘ , num2str(temp_edge_w) ) ;
handles.edge_w = temp_edge_w ;
guidata( hObject , handles ) ;
% --- Executes during object creation, after setting all properties.
function slider_edge_CreateFcn(hObject, eventdata, handles)
% hObject handle to slider_edge (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: slider controls usually have a light gray background.
if isequal(get(hObject,‘BackgroundColor‘), get(0,‘defaultUicontrolBackgroundColor‘))
set(hObject,‘BackgroundColor‘,[.9 .9 .9]);
end
set( hObject , ‘Value‘ , 0 ) ;
% --- Executes on slider movement.
function slider_texture_Callback(hObject, eventdata, handles)
% hObject handle to slider_texture (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,‘Value‘) returns position of slider
% get(hObject,‘Min‘) and get(hObject,‘Max‘) to determine range of slider
temp_texture_w = get( hObject , ‘Value‘ ) ;
set( handles.edit_texture , ‘String‘ , num2str(temp_texture_w) ) ;
handles.texture_w = temp_texture_w ;
guidata( hObject , handles ) ;
% --- Executes during object creation, after setting all properties.
function slider_texture_CreateFcn(hObject, eventdata, handles)
% hObject handle to slider_texture (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: slider controls usually have a light gray background.
if isequal(get(hObject,‘BackgroundColor‘), get(0,‘defaultUicontrolBackgroundColor‘))
set(hObject,‘BackgroundColor‘,[.9 .9 .9]);
end
set( hObject , ‘Value‘ , 0 ) ;
function edit_color_Callback(hObject, eventdata, handles)
% hObject handle to edit_color (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 edit_color as text
% str2double(get(hObject,‘String‘)) returns contents of edit_color as a double
value = str2double( get( hObject , ‘String‘ ) ) ;
if isnan(value)
msgbox(‘黄老师,要输入数字才行哦!‘);
set( hObject , ‘String‘ , ‘0‘ );
set( handles.slider_color , ‘Value‘ , 0 );
elseif value<0 | value >1
msgbox(‘黄老师,只能数入0-1才行哦!‘);
set( hObject , ‘String‘ , ‘0‘ );
set( handles.slider_color , ‘Value‘ , value );
else
set( handles.slider_color , ‘Value‘ , 0 );
handles.color_w = value ;
guidata( hObject , handles ) ;
end
% --- Executes during object creation, after setting all properties.
function edit_color_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit_color (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 edit_edge_Callback(hObject, eventdata, handles)
% hObject handle to edit_edge (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 edit_edge as text
% str2double(get(hObject,‘String‘)) returns contents of edit_edge as a double
value = str2double( get( hObject , ‘String‘ ) ) ;
if isnan(value)
msgbox(‘黄老师,要输入数字才行哦!‘);
set( hObject , ‘String‘ , ‘0‘ );
set( handles.slider_edge , ‘Value‘ , 0 );
elseif value<0 | value >1
msgbox(‘黄老师,只能数入0-1才行哦!‘);
set( hObject , ‘String‘ , ‘0‘ );
set( handles.slider_edge , ‘Value‘ , 0 );
else
set( handles.slider_edge , ‘Value‘ , value );
handles.edge_w = value ;
guidata( hObject , handles ) ;
end
% --- Executes during object creation, after setting all properties.
function edit_edge_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit_edge (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 edit_texture_Callback(hObject, eventdata, handles)
% hObject handle to edit_texture (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 edit_texture as text
% str2double(get(hObject,‘String‘)) returns contents of edit_texture as a double
value = str2double( get( hObject , ‘String‘ ) ) ;
if isnan(value)
msgbox(‘黄老师,要输入数字才行哦!‘);
set( hObject , ‘String‘ , ‘0‘ );
set( handles.slider_texture , ‘Value‘ , 0 );
elseif value<0 | value >1
msgbox(‘黄老师,只能数入0-1才行哦!‘);
set( hObject , ‘String‘ , ‘0‘ );
set( handles.slider_texture , ‘Value‘ , 0 );
else
set( handles.slider_texture , ‘Value‘ , value );
handles.texture_w = value ;
guidata( hObject , handles ) ;
end
版本:2014a
完整代码或代写加1564658423
【图像检索】基于matlab GUI综合特征图像检索【含Matlab源码 395期】
标签:插入图片 temp odi content hit efi mat ted move
原文地址:https://www.cnblogs.com/homeofmatlab/p/14897877.html