📄 loadimagetexture.m
字号:
function LoadImageTexture(hObject,handles)
QueryImageName = uigetfile({'*.jpg;*.gif;*.tif;*.bmp','Pictures(*.jpg,*.gif,*.tif,*.bmp)';'*.*','All Files(*.*)'});
level = 3;
FV_e =[];
FV_std = [];
QueryImage = imread(QueryImageName);
if length(size(QueryImage))==3
image1 = RGB2GRAY(QueryImage);
else
image1 = QueryImage;
end
[Yl,Yh] = dtwavexfm2(image1,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(:)));
FV_e((i-1)*6+j) = sum(abs(matric(:)))/(sz(1)*sz(2));
FV_std((i-1)*6+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');
%QueryImage = imread(QueryImageName);
image(QueryImage);
axis equal;
axis tight;
axis off;
set(handles.axes1,'HandleVisibility','OFF');
handles.FV_Query=FV_Query;
%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);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -