Chairul Azdaman

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

PENGOLAHAN CITRA DIGITAL

Disusun Oleh:
Nama
Nim
Kelas
Jurusan/Prodi

:
:
:
:

Chairul Azdaman
1320305079
P3
TIK/Prodi TMJK

PROGRAM STUDI
TEKNIK MULTIMEDIA DAN KOMPUTER
JARINGAN

1. Membaca dan menampilkan Image/Citra


P = imread('D:\gambarku.jpg');
size (P)
[M,N]=size(P);
M = size(P,1);
whos P

Hasil Program :

2. Ekstraksi Nilai Piksel Red, Green dan Blue (RGB)

P = imread('D:\gambarku.jpg');
red = P(:,:,1);
green = P(:,:,2);
blue = P (:,:,3);
subplot(2,2,1);
imshow(P);
title('ini citra asli');
subplot(2,2,2);
imshow(red);
title('ini citra merah');
subplot(2,2,3);
imshow(green);
title('ini citra hijau');
subplot(2,2,4);
imshow(blue);
title('ini citra biru');

Hasil Program :

3. Konversi gambar ke Grayscale

clear;
RGB = imread('D:\gambarku.jpg');
P = rgb2gray(RGB);
subplot(1,2,1);
imshow(RGB);
title('citra asli');
subplot(1,2,2);
imshow (P);
title('citra grayscale');

4. Merubah Nilai Bobot yang berbeda pada gambar

P = imread('D:\gambarku.jpg');
red = P(:,:,1);
green = P(:,:,2);
blue = P (:,:,3);
gray2 = 0.3*red+0.5*green+0.2*blue;
subplot(2,2,1);
imshow(red);
title('citra merah');
subplot(2,2,2);
imshow(green);
title('citra hijau');
subplot(2,2,3);
imshow(blue);
title('citra biru');
subplot(2,2,4);
imshow(gray2);
title('citra grayscale');

You might also like