We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 610e4a0 commit 36af09eCopy full SHA for 36af09e
Zooming/zoom.jpg
77.5 KB
Zooming/zoom.m
@@ -0,0 +1,34 @@
1
+f1 = input('Enter the factor by which the image is to be Zoomed: ');
2
+A = imread('cameraman.tif');
3
+s = size(A);
4
+s2 = s*f1;
5
+k = 1;
6
+l = 1;
7
+for (i=1:f1:s2)
8
+ for( j=1:f1:s2)
9
+ C(i,j) = A(k,l);
10
+ l = l+1;
11
+ end
12
+ l = 1;
13
+ k = k+1;
14
+end
15
+
16
17
+ for (j=2:f1:s2-1)
18
+ C(i,j) = [C(i,j-1)+ C(i, j+1)]*0.5;
19
20
21
22
+for(j=1:f1:s2)
23
+ for(i=2:f1:s2-1)
24
+ C(i,j) = [C(i-1,j)+C(i+1,j)]*0.5;
25
26
27
28
+for (i=2:f1:s2-1)
29
30
31
32
33
+figure,imshow(C);
34
+title('Zoomed Image');
0 commit comments