Membuat histogram citra berwarna dengan matlab

Berikut contoh koding matlab untuk membuat histogram pada citra berwarna

function [ output_args ] = tgspc( input_args )
gambar=imread('baboon24.bmp'); %——–membaca file gambar

red=gambar(:,:,1); %memanggil matriks gambar yang hanya berisi piksel warna merah

green=gambar(:,:,2);% memanggil matriks gambar yang hanya berisi piksel warna hijau

blue=gambar(:,:,3); %memanggil matriks gambar yang hanya berisi piksel warna biru

gray=0.3*red+0.5*green+0.2*blue ;
figure; imshow(gambar);
figure; subplot(4,1,1);
imhist(red);
title('Merah');

subplot (4,1,2);
imhist(green);
title('Hijau');

subplot (4,1,3);
imhist(blue);
title('Biru');

subplot(4,1,4);
imhist(gray);
title('Abu-abu');

end




Artikel yang berhubungan




1 comments:

Blog27999 said...

This is how my partner Wesley Virgin's tale starts in this SHOCKING and controversial VIDEO.

Wesley was in the military-and shortly after leaving-he unveiled hidden, "MIND CONTROL" secrets that the government and others used to get everything they want.

As it turns out, these are the exact same tactics many celebrities (especially those who "became famous out of nowhere") and the greatest business people used to become rich and famous.

You probably know that you utilize only 10% of your brain.

That's mostly because the majority of your brain's power is UNTAPPED.

Perhaps that thought has even occurred INSIDE your very own head... as it did in my good friend Wesley Virgin's head 7 years back, while riding an unlicensed, garbage bucket of a vehicle with a suspended driver's license and with $3.20 in his pocket.

"I'm very fed up with going through life paycheck to paycheck! Why can't I turn myself successful?"

You took part in those thoughts, right?

Your success story is waiting to be written. All you have to do is in YOURSELF.

Take Action Now!

Post a Comment

Related Posts Plugin for WordPress, Blogger...