-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathOperations_image.m
65 lines (63 loc) · 1.24 KB
/
Operations_image.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
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
%Assignment -1
%Part-1
imdata=imread('pic.png'); %reading image as matrix
imshow(imdata) %displayingimage
% store= figure(1); %saving image int store
% saveas(store,'selfie.pdf'); %saving as pdf format
%Part-2
% grey_scale=rgb2gray(imdata);
% imshow(grey_scale)
%Part-3
% grey_scale=rgb2gray(imdata);
% p=grey_scale;
% grey_scale=double(grey_scale);
% subplot(1,1,1);
% imshow(p);
% store_gray_scale=figure(1);
%
% bit_0=bitget(grey_scale,1);
% bit_1=bitget(grey_scale,2);
% bit_2=bitget(grey_scale,3);
% bit_3=bitget(grey_scale,4);
% bit_4=bitget(grey_scale,5);
% bit_5=bitget(grey_scale,6);
% bit_6=bitget(grey_scale,7);
% bit_7=bitget(grey_scale,8);
%
% bit_planes_0to4=figure(2);
% subplot(1,4,1);
% imshow(bit_0);
% title('bit0');
% hold on
%
% subplot(1,4,2);
% imshow(bit_1);
% title('bit1');
%
% subplot(1,4,3);
% imshow(bit_2);
% title('bit2');
%
% subplot(1,4,4);
% imshow(bit_3);
% title('bit3');
% hold off
%
% bit_planes_5to8=figure(3);
% subplot(1,4,1);
% imshow(bit_4);
% title('bit4');
% hold on
% subplot(1,4,2);
% imshow(bit_5);
% title('bit5');
%
% subplot(1,4,3);
% imshow(bit_6);
% title('bit6');
%
% subplot(1,4,4);
% imshow(bit_7);
% title('bit7');
% hold off
%