function varargout = main(varargin)
% MAIN MATLAB code for main.fig
% MAIN, by itself, creates a new MAIN or raises the existing
% singleton*.
%
% H = MAIN returns the handle to a new MAIN or the handle to
% the existing singleton*.
%
% MAIN('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in MAIN.M with the given input arguments.
%
% MAIN('Property','Value',...) creates a new MAIN or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before main_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to main_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 main
% Last Modified by GUIDE v2.5 15-Feb-2020 11:33:23
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @main_OpeningFcn, ...
'gui_OutputFcn', @main_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 main is made visible.
function main_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 main (see VARARGIN)
% Choose default command line output for main
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes main wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = main_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 pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% cd query
[I, path] = uigetfile('.jpg','Select Query Image');
I=strcat(path,I);
I=imread(I);
cd ..
save I I
axes(handles.axes1);
set(handles.edit1,'String',path);
imshow(I)
function edit1_Callback(hObject, eventdata, handles)
% hObject handle to edit1 (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 edit1 as text
% str2double(get(hObject,'String')) returns contents of edit1 as a double
% --- Executes during object creation, after setting all properties.
function edit1_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit1 (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
% --- Executes on button press in pushbutton2.
function pushbutton2_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
load I
I = imresize(I,[128 128]);
c1 = Glcm(I);
tes = c1;
%--------------------------------------------
% cd train
delete('*.db');
cd ..
FileNames = dir('train');
FileNames = char(FileNames.name);
for i=1:length(FileNames)-2
cd train
j=imread(strcat(num2str(i),'.jpg'));
j=imresize(j,[128 128]);
cd ..
c2 = Glcm(j);
res = c2;
d1(i) = min(min(dist(tes,res')));
d1(i) = abs(d1(i));
end
r=0;
k=sort(d1);
for i=1:length(k)
g=find(k(i)==d1);
r(i)=g(1);
end
cd train
j=imread(strcat(num2str(r(1)),'.jpg'));
axes(handles.axes2)
imshow(imresize(j,[128 128]));
j=imread(strcat(num2str(r(2)),'.jpg'));
axes(handles.axes3)
imshow(imresize(j,[128 128]));
j=imread(strcat(num2str(r(3)),'.jpg'));
axes(handles.axes4)
imshow(imresize(j,[128 128]));
j=imread(strcat(num2str(r(4)),'.jpg'));
axes(handles.axes5)
imshow(imresize(j,[128 128]));
j=imread(strcat(num2str(r(5)),'.jpg'));
axes(handles.axes6)
imshow(imresize(j,[128 128]));
j=imread(strcat(num2str(r(6)),'.jpg'));
axes(handles.axes7)
imshow(imresize(j,[128 128]));
cd ..
% --- 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)
load I
I=imresize(I,[128 128]);
c1=UCILM(I);
tes=c1;
%--------------------------------------------
% cd train
delete('*.db');
cd ..
FileNames = dir('train');
FileNames = char(FileNames.name);
for i=1:length(FileNames)-2
cd train
j=imread(strcat(num2str(i),'.jpg'));
j=imresize(j,[128 128]);
cd ..
c2=UCILM(j);
res=c2;
d(i)=min(min(dist(tes,res')));
end
r=0;
k=sort(d);
for i=1:length(k)
g=find(k(i)==d);
r(i)=g(1);
end
cd train
j=imread(strcat(num2str(r(1)),'.jpg'));
axes(handles.axes2)
imshow(imresize(j,[128 128]));
j=imread(strcat(num2str(r(2)),'.jpg'));
axes(handles.axes3)
imshow(imresize(j,[128 128]));
j=imread(strcat(num2str(r(3)),'.jpg'));
axes(handles.axes4)
imshow(imresize(j,[128 128]));
j=imread(strcat(num2str(r(4)),'.jpg'));
axes(handles.axes5)
imshow(imresize(j,[128 128]));
j=imread(strcat(num2str(r(5)),'.jpg'));
axes(handles.axes6)
imshow(imresize(j,[128 128]));
j=imread(strcat(num2str(r(6)),'.jpg'));
axes(handles.axes7)
imshow(imresize(j,[128 128]));
cd ..
% --- Executes on button press in pushbutton4.
function pushbutton4_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton4 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
axes(handles.axes1);imshow('matlab.jpg');
axes(handles.axes2);imshow('matlab.jpg');
axes(handles.axes3);imshow('matlab.jpg');
axes(handles.axes4);imshow('matlab.jpg');
axes(handles.axes5);imshow('matlab.jpg');
axes(handles.axes6);imshow('matlab.jpg');
axes(handles.axes7);imshow('matlab.jpg');
set(handles.edit1,'String','');
% --- Executes on button press in pushbutton5.
function pushbutton5_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton5 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
clc
clear
close all
% --- Executes on button press in pushbutton6.
function pushbutton6_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton6 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (s
没有合适的资源?快使用搜索试试~ 我知道了~
基于颜色和纹理的深度学习Web图像检索方法matlab代码.zip
共73个文件
jpg:68个
m:3个
mat:1个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 115 浏览量
2024-02-21
23:23:11
上传
评论
收藏 1.54MB ZIP 举报
温馨提示
1.版本:matlab2014/2019a/2021a 2.附赠案例数据可直接运行matlab程序。 3.代码特点:参数化编程、参数可方便更改、代码编程思路清晰、注释明细。 4.适用对象:计算机,电子信息工程、数学等专业的大学生课程设计、期末大作业和毕业设计。
资源推荐
资源详情
资源评论
收起资源包目录
基于颜色和纹理的深度学习Web图像检索方法matlab代码.zip (73个子文件)
基于颜色和纹理的深度学习Web图像检索方法matlab代码
40.jpg 2KB
43.jpg 12KB
44.jpg 4KB
2.jpg 5KB
41.jpg 7KB
42.jpg 5KB
66.jpg 72KB
27.jpg 3KB
10.jpg 6KB
28.jpg 4KB
47.jpg 8KB
25.jpg 4KB
Glcm.m 165B
13.jpg 3KB
39.jpg 2KB
46.jpg 5KB
14.jpg 4KB
30.jpg 5KB
6.jpg 3KB
22.jpg 8KB
15.jpg 7KB
16.jpg 4KB
45.jpg 3KB
matlab.jpg 67KB
36.jpg 2KB
1.jpg 4KB
48.jpg 4KB
main.m 8KB
17.jpg 4KB
35.jpg 5KB
21.jpg 7KB
57.jpg 4KB
52.jpg 5KB
23.jpg 13KB
26.jpg 4KB
63.jpg 59KB
I.mat 106KB
12.jpg 3KB
64.jpg 7KB
58.jpg 38KB
32.jpg 2KB
5.jpg 3KB
50.jpg 6KB
main.fig 119KB
54.jpg 4KB
61.jpg 56KB
62.jpg 44KB
8.jpg 4KB
24.jpg 5KB
67.jpg 175KB
56.jpg 5KB
18.jpg 15KB
11.jpg 6KB
65.jpg 563KB
29.jpg 2KB
UCILM.m 1KB
31.jpg 2KB
37.jpg 1KB
59.jpg 6KB
20.JPG 6KB
19.jpg 4KB
60.jpg 4KB
38.jpg 2KB
49.jpg 36KB
33.jpg 3KB
3.jpg 7KB
53.jpg 14KB
7.jpg 4KB
51.jpg 5KB
9.jpg 3KB
55.jpg 5KB
4.jpg 4KB
34.jpg 27KB
共 73 条
- 1
资源评论
Matlab科研辅导帮
- 粉丝: 2w+
- 资源: 7668
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功