Mar 21 2009

## Converting Optical Density of a Neutral Target into its RGB code value

Converting Optical Density of a Neutral Target into its RGB code value

Update

Recently a Color Science  expert who I worked with reviewed this post and here is his comment:

Everything you have is correct.  However, in talking about scanners I think you should make it very clear that you are speaking about the linear response of the scanner.  The work you did on scanners was very much at the core of the true engineering that goes into making a good scanner and dealt with the data before subsequent image processing and color management.

Most people, however are used to seeing the scan data after it goes through gamma correction and image processing (trivial image processing stuff).  Gamma correction is applied “approximately” as such:

CV = 255*T^(1/2.4)

So, your 0.5 transmittance sample will have an 8 bit code value of 191 .  This is further complicated by the fact that my equation above is a simplification of the true 2.2 gamma function (the fact that I use 2.4 instead of 2.2 approximates the effect of an offset term) .  Also, not everyone uses sRGB and there are some 1.8 gamma scanners out there.  Finally, the scanner manufacturer may apply some color management which would further confuse the issue.

Long story short:  Just make it clear that your discussion is on the Linear Response.

====== Original Post Below=======

Well, the headline seems nerdy. Not really if you are into scanner world. This post it very much a knowledge sharing as I could not find anywhere in the net which says how to do the conversion. Not that it is difficult, but takes some understanding and head twitching to do the conversion.

To know what is Optical Density, refer to this wikipedia article . In layman terms, OD is a unit less measurement of  how much light passes through a sample.

Formula to know $OD_lambda = log_{10} O = - log_{10} T = - log_{10} left ({I over I_0} right )$

 O = the per-unit opacity T = the per-unit transmittance I0 = the intensity of the incident light beam I = the intensity of the transmitted light beam

if you want a sample to have 50% transmittance, then OD of that sample is

OD (50%) =  -log(.50) = 0.3

A neutral target is one that has equal amount of RGB color coded in it. A OD 0.3 neutral target is one whose transmittance is 50%. Now you ask what is the RGB value of the OD 0.3 neutral target. If we consider 8 bit RGB value, then 0 stands for black and 255 stands for white. For 50% transmittance, then the value should be exactly half and it is 128 for R,G & B.

Now let us say you want to prepare a sample that has OD of 0.6. RGB value for OD 0.6 can be obtained as below

-log10(x) = 0.6
x = 10−0.6  ( Should be read as 10 to the power of -0.6 )
X = .25  ( This is 25% transmittance. )
Hence the RGB code will be ( .25 X 256 ) =  64 each ( i.e R=64, G=64,B=64)

Another example, OD of .08

-log10(x) = .08
x = 10−0.08  ( Should be read as 10 to the power of -0.08)
X = .83  ( This is 83% transmittance. )
Hence the RGB code will be ( .83X 256 ) =  212 each ( i.e R=212, G=212,B=212)

Comments Off on Converting Optical Density of a Neutral Target into its RGB code value

Mar 14 2009

## Strong Password Generator & Verification Tools

Actually, it is not that difficult to choose something you can remember and at the same time it is strong. In general a strong password should be at least 8 characters wide and should be a combination of  small letters, capital letters, numbers and one of  printable special characters like [email protected]#\$%^&*()_+ …

One way to generate a strong password and yet easy to remember is to follow the below methodology.

Choose a name that you can remember. Lets us choose justin

Let us create a 9 character password using “justin” as the core

In unix world, ^ stands for beginning of a word/line, \$ stands for the end of word/line

So first morphing of justin is ^justin\$

Now we need to add at least  a capital letter. Let us choose “s” in “justin” to be capital letter.

So the second morphing is ^juStin\$

Now we need to add at least a number. lets count the position of letter “s” in the word “justin”. it is in the 3 rd position. Please not in previous line we capitalized character “s”.  This is in a way helps your brain to remember that 3 rd character in the word “justin” needs to be captilized.

so the third morphing is ^ju3Stin\$

This is good enough. Microsoft Password strength checker shows this as STRONG password. To make it even stronger, you need to increase the length to 14 characters and above.

Then you can use pwgen.net to create a strong password. But, it is not easy to rembember the password generated by this site.

If you really want a super strong password, then you cant beat GRC’s password generator.  This site is recommended if you are looking for a Wifi WPA pre-shared key.

Also, you can use one of the free tools available in the Net. Please be aware of any downloadable tools as it may be infested with spyware, adware or malwares.

Mar 08 2009