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


function LoadImageTexture((hObject,handles) 
QueryImageName = uigetfile({'*.jpg;*.gif;*.tif;*.bmp','Pictures(*.jpg,*.gif,*.tif,*.bmp)';'*.*','All Files(*.*)'}); 
 
level = 3; 
FV_e =[]; 
FV_std = []; 
 
image = imread(QueryImageName); 
image = RGB2GRAY(image); 
[Yl,Yh] = dtwavexfm2(image,level,'near_sym_b','qshift_b'); 
 
sz = size(Yl); 
FV_e(1) = sum(abs(Yl(:)))/sz(1)*sz(2); 
FV_std(1) = std(abs(Yl(:))); 
 
matric = []; 
for i=1:level 
    for j=1:6 
        matric = Yh{i,1}(:,:,j); 
        sz = size(matric); 
        FV_e((i-1)*6+1+j) = sum(abs(matric(:)))/(sz(1)*sz(2)); 
        FV_std((i-1)*6+1+j) = std(abs(matric(:))); 
    end 
end 
 
FV_Query=[FV_e,FV_std]; 
 
 %display picture 
set(handles.axes1,'HandleVisibility','OFF');   
set(handles.axes1,'HandleVisibility','ON'); 
axes(handles.axes1); 
%[pathstr,name,ext,versn]=fileparts(file_name) 
%query_image = imread('image\name.jpg'); 
image(QueryImage); 
axis equal; 
axis tight; 
axis off; 
set(handles.axes1,'HandleVisibility','OFF');   
 
handles.FV_Query=FV_Query; 
 handles.QueryInfo=QueryInfo; 
 
%disp_white(handles,1); 
% --- Outputs from this function are returned to the command line.% Choose default command line output for image_search1 
handles.output = hObject; 
 
% Update handles structure 
guidata(hObject, handles); 
 
% UIWAIT makes image_search1 wait for user response (see UIRESUME) 
% uiwait(handles.figure1);