www.pudn.com > wenlituxiangjiansuo.rar > ImageSearch.asv


function varargout = ImageSearch(varargin) 
% IMAGESEARCH M-file for ImageSearch.fig 
%      IMAGESEARCH, by itself, creates a new IMAGESEARCH or raises the existing 
%      singleton*. 
% 
%      H = IMAGESEARCH returns the handle to a new IMAGESEARCH or the handle to 
%      the existing singleton*. 
% 
%      IMAGESEARCH('CALLBACK',hObject,eventData,handles,...) calls the local 
%      function named CALLBACK in IMAGESEARCH.M with the given input arguments. 
% 
%      IMAGESEARCH('Property','Value',...) creates a new IMAGESEARCH or raises the 
%      existing singleton*.  Starting from the left, property value pairs are 
%      applied to the GUI before ImageSearch_OpeningFunction gets called.  An 
%      unrecognized property name or invalid value makes property application 
%      stop.  All inputs are passed to ImageSearch_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 ImageSearch 
 
% Last Modified by GUIDE v2.5 22-Sep-2007 18:57:28 
 
% Begin initialization code - DO NOT EDIT 
gui_Singleton = 1; 
gui_State = struct('gui_Name',       mfilename, ... 
                   'gui_Singleton',  gui_Singleton, ... 
                   'gui_OpeningFcn', @ImageSearch_OpeningFcn, ... 
                   'gui_OutputFcn',  @ImageSearch_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 ImageSearch is made visible. 
function ImageSearch_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 ImageSearch (see VARARGIN) 
 
% Choose default command line output for ImageSearch 
handles.output = hObject; 
 
% Update handles structure 
guidata(hObject, handles); 
 
% UIWAIT makes ImageSearch wait for user response (see UIRESUME) 
% uiwait(handles.figure1); 
 
 
% --- Outputs from this function are returned to the command line. 
function varargout = ImageSearch_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 Search. 
function Search_Callback(hObject, eventdata, handles) 
% hObject    handle to Search (see GCBO) 
% eventdata  reserved - to be defined in a future version of MATLAB 
% handles    structure with handles and user data (see GUIDATA) 
 
%searchColour(hObject,handles);     %%%%但dt-cwt提取颜色特征,用daubechies累似方法进行相似性比较LoadImage,OpenDatabase,searchColou 
SearchTexture(hObject,handles); 
 
k = handles.k; 
 
    set(handles.axes2,'HandleVisibility','OFF');   
    set(handles.axes2,'HandleVisibility','ON'); 
    axes(handles.axes2); 
    result_image=imread(handles.filename(k(1)).name); 
    image(result_image); 
    axis equal; 
    axis tight; 
    axis off; 
    set(handles.axes2,'HandleVisibility','OFF'); 
     
    set(handles.axes3,'HandleVisibility','OFF');   
    set(handles.axes3,'HandleVisibility','ON'); 
    axes(handles.axes3); 
    result_image=imread(handles.filename(k(2)).name); 
    image(result_image); 
    axis equal; 
    axis tight; 
    axis off; 
    set(handles.axes3,'HandleVisibility','OFF'); 
     
    set(handles.axes4,'HandleVisibility','OFF');   
    set(handles.axes4,'HandleVisibility','ON'); 
    axes(handles.axes4); 
    result_image=imread(handles.filename(k(3)).name); 
    image(result_image); 
    axis equal; 
    axis tight; 
    axis off; 
    set(handles.axes4,'HandleVisibility','OFF'); 
     
     set(handles.axes5,'HandleVisibility','OFF');   
    set(handles.axes5,'HandleVisibility','ON'); 
    axes(handles.axes5); 
    result_image=imread(handles.filename(k(4)).name); 
    image(result_image); 
    axis equal; 
    axis tight; 
    axis off; 
    set(handles.axes5,'HandleVisibility','OFF'); 
     
     set(handles.axes6,'HandleVisibility','OFF');   
    set(handles.axes6,'HandleVisibility','ON'); 
    axes(handles.axes6); 
    result_image=imread(handles.filename(k(5)).name); 
    image(result_image); 
    axis equal; 
    axis tight; 
    axis off; 
    set(handles.axes6,'HandleVisibility','OFF'); 
     
     
 set(handles.axes7,'HandleVisibility','OFF');   
    set(handles.axes7,'HandleVisibility','ON'); 
    axes(handles.axes7); 
    result_image=imread(handles.filename(k(6)).name); 
    image(result_image); 
    axis equal; 
    axis tight; 
    axis off; 
    set(handles.axes7,'HandleVisibility','OFF'); 
     
    set(handles.axes8,'HandleVisibility','OFF');   
    set(handles.axes8,'HandleVisibility','ON'); 
    axes(handles.axes8); 
    result_image=imread(handles.filename(k(7)).name); 
    image(result_image); 
    axis equal; 
    axis tight; 
    axis off; 
    set(handles.axes8,'HandleVisibility','OFF'); 
     
    set(handles.axes9,'HandleVisibility','OFF');   
    set(handles.axes9,'HandleVisibility','ON'); 
    axes(handles.axes9); 
    result_image=imread(handles.filename(k(8)).name); 
    image(result_image); 
    axis equal; 
    axis tight; 
    axis off; 
    set(handles.axes9,'HandleVisibility','OFF'); 
     
    set(handles.axes10,'HandleVisibility','OFF');   
    set(handles.axes10,'HandleVisibility','ON'); 
    axes(handles.axes10); 
    result_image=imread(handles.filename(k(9)).name); 
    image(result_image); 
    axis equal; 
    axis tight; 
    axis off; 
    set(handles.axes10,'HandleVisibility','OFF'); 
     
    set(handles.axes11,'HandleVisibility','OFF');   
    set(handles.axes11,'HandleVisibility','ON'); 
    axes(handles.axes11); 
    result_image=imread(handles.filename(k(10)).name); 
    image(result_image); 
    axis equal; 
    axis tight; 
    axis off; 
    set(handles.axes11,'HandleVisibility','OFF'); 
 
    set(handles.axes12,'HandleVisibility','OFF');   
    set(handles.axes12,'HandleVisibility','ON'); 
    axes(handles.axes12); 
    result_image=imread(handles.filename(k(11)).name); 
    image(result_image); 
    axis equal; 
    axis tight; 
    axis off; 
    set(handles.axes12,'HandleVisibility','OFF'); 
     
    set(handles.axes13,'HandleVisibility','OFF');   
    set(handles.axes13,'HandleVisibility','ON'); 
    axes(handles.axes13); 
    result_image=imread(handles.filename(k(12)).name); 
    image(result_image); 
    axis equal; 
    axis tight; 
    axis off; 
    set(handles.axes13,'HandleVisibility','OFF'); 
     
    set(handles.axes14,'HandleVisibility','OFF');   
    set(handles.axes14,'HandleVisibility','ON'); 
    axes(handles.axes14); 
    result_image=imread(handles.filename(k(13)).name); 
    image(result_image); 
    axis equal; 
    axis tight; 
    axis off; 
    set(handles.axes14,'HandleVisibility','OFF'); 
     
    set(handles.axes15,'HandleVisibility','OFF');   
    set(handles.axes15,'HandleVisibility','ON'); 
    axes(handles.axes15); 
    result_image=imread(handles.filename(k(14)).name); 
    image(result_image); 
    axis equal; 
    axis tight; 
    axis off; 
    set(handles.axes15,'HandleVisibility','OFF'); 
 
% --- Executes on button press in LoadImage. 
function LoadImage_Callback(hObject, eventdata, handles) 
% hObject    handle to LoadImage (see GCBO) 
% eventdata  reserved - to be defined in a future version of MATLAB 
% handles    structure with handles and user data (see GUIDATA 
 
%LoadImage(hObject,handles);        %%%但dt-cwt提取颜色特征,用daubechies累似方法进行相似性比较OpenDatabase,searchColour 
LoadImageTexture(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) 
 
 
% -------------------------------------------------------------------- 
function OpenDatabase_Callback(hObject, eventdata, handles) 
% hObject    handle to OpenDatabase (see GCBO) 
% eventdata  reserved - to be defined in a future version of MATLAB 
% handles    structure with handles and user data (see GUIDATA) 
 
%OpenDatabase(hObject,handles);     %%%但dt-cwt提取颜色特征,用daubechies累似方法进行相似性比较LoadImage,OpenDatabase,searchColour 
OpenDatabaseTexture(hObject,handles); 
 
 
% -------------------------------------------------------------------- 
function Exit_Callback(hObject, eventdata, handles) 
% hObject    handle to Exit (see GCBO) 
% eventdata  reserved - to be defined in a future version of MATLAB 
% handles    structure with handles and user data (see GUIDATA) 
 
 
% -------------------------------------------------------------------- 
function File_1_Callback(hObject, eventdata, handles) 
% hObject    handle to File_1 (see GCBO) 
% eventdata  reserved - to be defined in a future version of MATLAB 
% handles    structure with handles and user data (see GUIDATA)