-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathimage_concat.m
More file actions
29 lines (27 loc) · 1.17 KB
/
image_concat.m
File metadata and controls
29 lines (27 loc) · 1.17 KB
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
%--------------------------------------------------------------
% Welcome to Getscriptall
%--------------------------------------------------------------
img=imread('lena.png');
%-------------------------------------------------------------------------
%Decomposing in to R,G,B
R=img(:,:,1);
G=img(:,:,2);
B=img(:,:,3);
%-------------------------------------------------------------------------
figure;
imshow(img);title('Original image');
figure;
imshow(R);title('Decomposed R');
figure;
imshow(G);title('Decomposed G');
figure;
imshow(B);title('Decomposed B');
%-------------------------------------------------------------------------
% Concatenation
%-------------------------------------------------------------------------
% We have to concatenate the R,G,B channel using the function cat function
new=cat(3,R,G,B); % The cat function concatenate the RGB Channel, 3 is the dimension.
imshow(new);title('Concatenated image');
%-------------------------------------------------------------------------
%%%%%%%%%%%-------------------$$$$$$$$>>>>> BY Getscriptall <<<<$$$$$$$$$-----------------%%%%%%%%%%%%%%
% @@@ for any query contact: info.getscriptall@gmail.com