Mengubah Image RGB Ke Grayscale
Mengubah Image RGB Ke Grayscale
komponen R,G,B
image1=imread('woodsculpt.jpg');
image2=rgb2gray (image1);
figure(1);imshow(image2)
[r c d]=size (image1);
z=zeros(r,c);
tempr=image1;
tempr(:,:,2)=z;
tempr(:,:,3)=z;
figure(2);imshow(tempr)
tempg=image1;
tempg(:,:,1)=z;
tempg(:,:,3)=z;
figure(3);imshow(tempg)
tempb=image1;
tempb(:,:,1)=z;
tempb(:,:,2)=z;
figure(4);imshow(tempb)
Tugas:
1. Silahkan masing-masing mencoba menggunakan file jpg lain
2. Berikan resume tentang hasil latihan diatas dalam bentuk makalah
tentang image color feature dan image color space.