News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Color

Started by Farabi, November 05, 2011, 03:38:50 AM

Previous topic - Next topic

Farabi



Law of physic. Black = 0 White = 1. Where R = 0.3 G = 0.3 B = 0.3. See the prism, if the white light through it, the prism will separate the white color into a single channel. White mean R+G+B.

Problem occur when we are going to analyzing a picture.



If we had a red channel 100, and the maxmum is 255, if we add the red channel, it doesnot mean the green channel is increase the intensity where the red channel is back to black, but became a yellow color. My statement showed us that there is something wrong on our logic understanding the color using computers. We need a new logic that will change our paradigm about this subject.
Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"

Farabi

How do you solve this equation? 1=R+G+B ?

Lets multiplyit by ten times to make things easier.
1+G+B=10 ?


Or youre going to use

1+G+B=9?
Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"

dedndave

QuoteHow do you solve this equation? 1=R+G+B ?

what this equation is meant to say is that the total of R and G and B levels makes 1, or 100%
i don't know where you got this equation, but i am guessing that the context of it's use is the key

light and color levels is somewhat confusing
as programmers, we want to squeeze them into values from 0 to 255 and make a cube out of their levels
that isn't how it works
the human eye is more sensitive to some wavelengths than others
this distorts what we would like to view as a cube

note - i just googled around a bit for a decent representation of a color chart
i was disappointed in that i didn't find what i was looking for   :P

Farabi

Yeah. That is what I want, Sum of RGB is 1. As you can see on the chart, red is the lowest level above black, and yellow is next, and green is next. So we can use RGB order to represent a light. So, since red is the lowest, we need to define is as 1. And youre right, maybe we just need to adjust the result not as 1 or 10, but 8.

So, R+G+B=8 and we found it.

1=R
2=G
4=B

7=WHITE right? and it is the sum of all channel on the 0 based.

If you analyze a picture, you will confuse classificating between red an yelow. Is yellowon a red side, or on green side. This confusion appear because of our misunderstanding about color.

This would be usefull for color segmentation or object segmentation on an augment reality system.
Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"

MichaelW

RGB is just one possible Color Model. And as Dave stated, the human eye is more sensitive to some wavelengths than it is to others, and this is accounted for in the typical conversion to Grayscale, where the goal is to produce a grayscale image with the same luminance as the color image.
eschew obfuscation

Farabi

I think the different is just the brightness. Not really the color. Mainly, Cyan, is just another bright type of Yellow. And dark blue was just another type with blue, and dont confuse blue with blue sky since it is on different component.
Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"

Farabi

I'll try to understand your link gave to me Michael , maybe Im just misunderstood.


EDIT:

Hey, This is what I mean ;D Thanks, once again, Im not the only one who got this understanding. This is common sense.
Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"

ToutEnMasm


How to solve the equation ?
Quote
Function RevRGB(red, green, blue)
   RevRGB= CLng(blue + (green * 256) + (red * 65536))
End Function
There is another code of color.



ToutEnMasm

With RGB:
If RGB=1 => blue = 1  ;green=red=0


Farabi

As you can see, that red=1 and green is =2. If you get the logic, so Yelow is Red+Green right? So it was 3

Why dont you test it on your computer, Red=255, Green=255, it will yield Yellow right? Now, why dont you add Red and Green on your GDI bitmap? What color should you put? This is what I want us to discuss.


4-bit color

0-0-0-0
R-G-B-A
Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"

Farabi

Errr, sorry, so is this mean I misunderstood afterall?  :cheekygreen: As ussual.


Quote
Vertebrate animals were primitively tetrachromatic. They possessed four types of cones—long, mid, short wavelength cones, and ultraviolet sensitive cones. Today, fish, reptiles and birds are all tetrachromatic. Placental mammals lost both the mid and short wavelength cones. Thus, most mammals do not have complex color vision—they are dichromatic but they are sensitive to ultraviolet light, though they cannot see its colors. Human trichromatic color vision is a recent evolutionary novelty that first evolved in the common ancestor of the Old World Primates. Our trichromatic color vision evolved by duplication of the long wavelength sensitive opsin, found on the X chromosome. One of these copies evolved to be sensitive to green light and constitutes our mid wavelength opsin. At the same time, our short wavelength opsin evolved from the ultraviolet opsin of our vertebrate and mammalian ancestors.

Human red-green color blindness occurs because the two copies of the red and green opsin genes remain in close proximity on the X chromosome. Because of frequent recombination during meiosis, these gene pairs can get easily rearranged, creating versions of the genes that do not have distinct spectral sensitivities.

About human trichromatic, does it mean, human eye only able to "see" short-medium-high frequency? So I guess, I need to radically change the concept.
Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"

Tedd

A 'normal' (non-colourblind) human eye has cones that peak in hues of yellow, greenish-yellow, and blue. All the other colours we 'see' are a weighted combination of these, with our brain using various tricks to tell us what colour we think we see. In addition to that, there's further processing in an attempt to account for lighting levels and contrast effects (mid-grey on white looks darker than the same mid-grey on black.)
The physical frequency of light actually contributes minimally to our experience of colour.
No snowflake in an avalanche feels responsible.