-
Notifications
You must be signed in to change notification settings - Fork 0
/
new.m
51 lines (43 loc) · 1021 Bytes
/
new.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
clc;
close all;
clear all;
load('TRAINING SET.mat')
u=5;
v=8;
hist_data1 = cell(1,1);
%gaborArray = gaborFilterBank(u,v,39,39);
match = zeros(200,40);
min1 = zeros(200,1);
%get File Browser
[filename,pathname]=uigetfile('*.*','Select an Image');
tic;
I=strcat(pathname,filename);
img=imread(I);
%img=robust_postprocessor(I1);
figure;
imshow(img);
title('Input image');
img= imresize(img,[512 512]);
gaborResult = gabor_conv(img,gaborArray);
featureVector = gaborFeatures(img,gaborArray,gaborResult);
lbpfinal = im_lbp(gaborResult);
hist_data1(1,1) = mat2cell(histo_gram(lbpfinal));
A = cell2mat(hist_data1(1,1));
for i=1:200
B = cell2mat(hist_data(1,i));
match(i,:) = histmatch(A,B);
min1(i,:) = mean(match((i),:));
end
min2 = min(min1);
min3 = sort(min1);
for i=1:1
for j=1:200
if min1(j)==min3(i)
figure;
imshow(strcat('TRAINING SET\a (',int2str(j),').bmp'));
title(sprintf('Matched image'));
display((j));
end
end
end
toc;