Konversi Image berwarna ke hitam putih


Sedikit nya ada 3 algoritma untuk mengkonversi gambar berwarna ke dalam hitam putih

1. The lightness method averages the most prominent and least prominent colors: (max(R, G, B) + min(R, G, B)) / 2.

2. The average method simply averages the values: (R + G + B) / 3.

3. The luminosity method is a more sophisticated version of the average method. It also averages the values, but it forms a weighted average to account for human perception. We’re more sensitive to green than other colors, so green is weighted most heavily. The formula for luminosity is 0.21 R + 0.71 G + 0.07 B.

Lebih baik yang mana diantara ketiga metode tersebut? mari kita lihat sample nya

original image

The luminance

metode 1 lightness method averages

The lightness

metode 2 simple average

simply_averages

metode 3 Luminosity method 

The luminance

apa yang akan terjadi jikalau kita hanya mengambil komponen red green atau blue nya saja

Red

red only

blue

blue only

green

green only

Advertisements

Author: ridhobustami

orang ngak jelas

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s