-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.m
37 lines (26 loc) · 918 Bytes
/
main.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
Im1 = imread('card2.jpg');
Im1 = imresize(Im1, 0.3);
[featureX, featureY, R] = cornerHarris(Im1, 20, 1, 50, 0.04);
[width, height] = size(featureX);
Im2 = zeros(size(Im1));
for i=1:1:width
Im2(featureX(i,1), featureY(i,1)) = 255;
if(featureY(i,1)-1>0 && featureX(i,1)-1)
Im1(featureX(i,1)-1, featureY(i,1)-1) = 256;
Im1(featureX(i,1), featureY(i,1)-1) = 256;
Im1(featureX(i,1)+1, featureY(i,1)-1) = 256;
Im1(featureX(i,1)-1, featureY(i,1)) = 256;
Im1(featureX(i,1), featureY(i,1)) = 256;
Im1(featureX(i,1)+1, featureY(i,1)) = 256;
Im1(featureX(i,1)-1, featureY(i,1)+1) = 256;
Im1(featureX(i,1), featureY(i,1)+1) = 256;
Im1(featureX(i,1)+1, featureY(i,1)+1) = 256;
end
Im1(featureX(i,1), featureY(i,1)) = 255;
end
subplot(1,3,1);
subimage(uint8(Im1));
subplot(1,3,2);
subimage(Im2);
subplot(1,3,3);
subimage(R);