-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprob3script.m
More file actions
40 lines (31 loc) · 854 Bytes
/
prob3script.m
File metadata and controls
40 lines (31 loc) · 854 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
imageData = imread('zebra_small.jpg');
%Zebra stripes on neck
centerX = 90;
centerY = 60;
radius = 40;
[~,~,imagePatch1] = filterDistribution(imageData,centerX,centerY,radius);
%Tree leaves
centerX = 165;
centerY = 20;
radius = 30;
[~,~,imagePatch2] = filterDistribution(imageData,centerX,centerY,radius);
%Grass
centerX = 136;
centerY = 224;
radius = 20;
[~,~,imagePatch3] = filterDistribution(imageData,centerX,centerY,radius);
imagePatch2=imresize(imagePatch2,[41 41]);
imagePatch3=imresize(imagePatch3,[41 41]);
figure
subplot(1,3,1)
imshow(imagePatch1)
subplot(1,3,2)
imshow(imagePatch2)
subplot(1,3,3)
imshow(imagePatch3)
imwrite(imagePatch1,'imagePatch1.png','PNG')
imwrite(imagePatch2,'imagePatch2.png','PNG')
imwrite(imagePatch3,'imagePatch3.png','PNG')
% filterBank(imagePatch1);
% filterBank(imagePatch2);
% filterBank(imagePatch3);