Page 112 - EMODUL - PENGOLAHAN CITRA DIGITAL
P. 112
clc;clear;close all;
I = imread('peppers.png');
R = I(:,:,1);
G = I(:,:,2);
B = I(:,:,3);
Red = cat(3,R,G*0,B*0);
Green = cat(3,R*0,G,B*0);
Blue = cat(3,R*0,G*0,B);
figure, imshow(I);
figure, imshow(Red);
figure, imshow(Green);
figure, imshow(Blue);
Gambar 6. 2 Citra RGB
Sedangkan representasi kanal warna R, G, dan B berturut-turut
ditunjukkan pada Gambar 3, 4, dan 5.
112