-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathedgefeature.m
More file actions
executable file
·63 lines (35 loc) · 793 Bytes
/
edgefeature.m
File metadata and controls
executable file
·63 lines (35 loc) · 793 Bytes
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
52
53
54
55
56
57
58
59
60
61
62
63
function array3=edgefeature()
clc
query2=imread('queryedge.jpg');
Red = query2(:,:,1);
Green = query2(:,:,2);
Blue = query2(:,:,3);
array3=[];
FileList3 = dir(fullfile('wangselectedge', '*.jpg'));
F3 = natsortfiles({FileList3.name});
for iFile = 1:numel(F3)
File3 = fullfile('wangselectedge', F3(iFile));
Img3 = imread(cell2mat(File3));
Red1 = Img3(:,:,1);
Green1 = Img3(:,:,2);
Blue1 = Img3(:,:,3);
C=abs(Red-Red1);
D=Red+Red1;
E=C.^2 ./D;
F=E./2
fmat=reshape(F,1,256*256);
G=abs(Green-Green1);
H=Green+Green1;
I=G.^2 ./H;
J=I./2
jmat=reshape(J,1,256*256);
K=abs(Blue-Blue1);
L=Blue+Blue1;
M=L.^2 ./L;
N=M./2
nmat=reshape(N,1,256*256);
O= [fmat jmat nmat]
P=sum(O)
array3=[array3,P];
end
end