Thursday, October 30, 2008

DATA COMPRESSION AND ENCODING USING COLORS (A NEW APPROACH FOR CODING

DATA COMPRESSION AND ENCODING USING COLORS Any color is the combination of three primary colors Red, Green
and Blue in fixed quantities. A color is stored in a computer in
form of three numbers representing the quantities of Red, Green
and Blue respectively.
This representation is called RGB representation which is used in
computers to store images in BMP, JPEG and PDF formats. Here each
pixel is represented as values for Red, Green and Blue.
RGB color model is an additive model in which Red, green and Blue
are combined in various ways to produce other colors.
By using appropriate combination of Red, Green and Blue intensities,
many colors can be represented. Typically, 24 bits are used to store
a color pixel. This is usually apportioned with 8 bits each for red,
green and blue, giving a range of 256 possible values, or intensities,
for each hue.With this system,16 777 216 discrete combinations of hue
and intensity can be specified.
Each color can vary between the minimum (no color) and maximum (full
intensity).If all the colors are at minimum the result is black.
If all the colors are at the maximum, the result is white.
Numeric representations:
1) color science talks about colors in the range 0.0 (minimum) to
1.0 (maximum).Most color formulae take these values.For instance,
full intensity red is (1.0,0.0,0.0).

2) The color values may be written as percentages, from 0% (minimum)
to 100% (maximum).Full intensity red is 100%, 0%,0%.

3) The color values may also be written as numbers in the range 0 to
255,simply by multiplying the range 0.0 to 1.0 by 255.Full intensity
red is (255,0,0).
Color sensor circuit and operation :
|------------------------------ RGB color filter
|
|----------------------------- Photo diode
reflective or |----------------- current to voltage
voltage converter
transmitted _ _ _ -
Color light ---------& gt;| |---> -->|--------> | _ _ _ _
| || | |
------------>| |---> -->| -------> | |
| | | \/ \/
| | |
-------------->| |---> -->|--------->
| | |
|-| - ---- |

color sensor
--------> ---> ---->
A light to analog - voltage-color sensor comprises an array of photo
diodes behind color filters and an integrated current to voltage conversion
circuit(usually a transimpedence amplifier).
Light falls on each of the photodiodes is converted into a photocurrent,the
magnitude of which is dependent on both the brightnesses wavelength(wavelength
due to the color filter) of the incident light.
The photocurrents from each of the three photodiodes are converted to VRout,
VGout,VBout using a current- to- voltage converter.
Thus we get three output voltage levels for a single color.
The maximum possible output voltage is given the value 255 on scale and the
whole length is divided into 256 equal parts(pixel length).
The output of sensor is exactly computer representation and can be directly
fed into computer using interfacing circuits(multiplier).
Color sensing: A light source and an object are kept very near to each other.
Light reflects on the object and falls on the sensor''s lenses. Then sensor
operation takes place and three output voltages are obtained for Red,Blue and
Green respectively.
Data security: Data printed using color code can be made secured by using
an encoding technique. Key(X,Y,Z) can be used for encoding purpose.
For example ,if we have to print a color representing(R,G,B), instead of
printing that color (R+X,G+Y, B+Z) can be printed. X,Y, Z values can be
positive or negative integers.Confidential data can be transmitted using
this "Key'' concept.
Data encoding and Compression using ASCII :- ASCII codes represent text in
computers, communications equipment, and other devices that work with text.
Using ASCII, 128 characters are encoded. Each character is represented
by 7 bits.
Data encoding :- In RGB 256 color mode, a pixel is represented by 24 bits,
in which 8 bits represent the intensity of each color.For example, a color
(80,121,150) is represented as (01010000 01111001 10010110).
Data compression: - using seven sub cubes contain 256* 256* 156 * 7/8 =
14680064 colors. There are nearly 10000000 English words and templates
used in MS word (Including all fonts and formats).Then any other word
which has more than 3 letters ( or characters) can be defined by a color
which requires three 8 bit numbers to be represented.
Thus data can be compressed to a large extent and more efficient and
error free.

No comments: