-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProgram2flip_image.sce
67 lines (53 loc) · 1.16 KB
/
Program2flip_image.sce
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
64
65
66
67
A = imread('C:\Users\agamg\Desktop\images (1).jpg');
B = rgb2gray(A);
[m,n] = size(B);
for row = 1 : m
for col = 1 : n
AA(row,col) = B(m-row+1,col);
//AA(row,col) = B(row,n-col+1);
end
end
imshow(AA);
figure();
imshow(B);
//another
im = imread("s3.jpg");
im1 = imread("s3.jpg");
[x,y,z] = size(im);
for plane =1:z
len = x;
for i = 1:x
for j =1:y
if i<x/2
temp = im(i,j,plane);
im(i,j,plane) = im(len,j,plane);
im(len,j,plane)=temp;
end
end
len = len-1;
end
end
subplot(2,1,1),imshow(im1);
subplot(2,1,2),imshow(im);
im = imread("s3.jpg");
im1 = imread("s3.jpg");
[x,y,z] = size(im);
for plane =1:z
len = x;
for i = 1:x
for j =1:y
if i<x/2
temp = im(i,j,plane);
im(i,j,plane) = im(len,j,plane);
im(len,j,plane)=temp;
end
end
len = len-1;
end
end
subplot(2,1,1),imshow(im1);
subplot(2,1,2),imshow(im);
im = imread('sign.jpg')
imshow(im)
f=flipdim(im,1)
imshow(f)