SlideShare a Scribd company logo
Color Images
We have seen that photographs and images can be in grayscale or in color. We utilize color in
many contexts to convey information.
The retina is a light-sensitive layer at the back of the eye that covers about 65 percent of its
interior surface. The human eye contains two different kinds of photosensitive receptor cells
called rods and cones in the retina that convert incident light energy into signals that are carried
to the brain by the optic nerve.
(http://hyperphysics.phy-astr.gsu.edu/hbase/vision/eye.html)
Rods are used for night vision and are mostly color independent. Cones mediate color vision.
There are three types of cones. The wavelength of visible light is between 400 nm and 700 nm.
(http://hyperphysics.phy-astr.gsu.edu/hbase/vision/colcon.html)
The tristimulus theory states that any color can be specified by a weighted combination of three
(primary) colors. Red, green and blue are one set of additive primary colors. Additive colors are
defined as the three colors of light that when mixed can produce white.
Color depth in digital representations
The total number of bits over all primary colors used to represent a color is called the color
depth. When we refer to a 24-bit color depth with a tristimulus color model we mean each color
is represented with 8 bits and hence can have one of 256 different intensities for each color. The
total number of colors is 2^24; approximately 16.7 million colors.
Indexed color
Not all images need to have 16 million different colors. The image itself can have a limited
number of colors or an approximation could be tolerated in exchange for file size. Indexed color
uses a table to store the colors and stores the index of a color in the table instead of the full color
for each pixel. For example, a 1024x1024 image with 256 colors would need 3x1024x1024 = 3
Megabytes using a 24-bit color representation and only need 3x256+1024x1024 ~= 1 Megabyte
with an indexed color format; almost 3 fold. The figure below shows the palette and images in
two formats.
The figures below show the 256-element palettes (left) corresponding to the indexed color images
(right) obtained from the original color images (middle).
(Original) (Palette) (Indexed)
The RGB color model
Uses the three primary colors RGB to construct colors. The RGB color space is shown below. It
is a cube with red, green and blue as the intensities on the principal axes (X, Y and Z).
This, however, only produces a subset of actual colors seen by humans. The triangle in the figure
below shows the limits of the RGB model compared to human vision. Nevertheless, this model is
useful because TV and computer monitor manufacturers use these three colors to produce an
approximation to the color spectrum in an affordable way.
(http://dot-color.com/)
(CIE: International Commission on Illumination)
The HSV color model
Another way to describe color is through its hue, saturation and value (brightness). Hue is
defined as the wavelength at which most of the energy is concentrated. Brightness or value is a
measure of how light or dark the color is. Saturation refers to the color’s purity or colorfulness.
There is a direct conversion between the RGB color representation and the HSV representation.
(https://en.wikipedia.org/wiki/HSL_and_HSV)
MATLAB has two functions to convert between the RGB and HSV representations. The
functions are called hsv2rgb and rgb2hsv. See the help pages for their use. Remember that
MATLAB will only display RGB images, so if you are working with an HSV representation you
need to convert it to RGB before using imshow.
CMYK color model
Is a subtractive color model. It is usually used for printing. Mixtures of cyan, magenta and
yellow are used to produce colors and black (K) is used to produce pure black.

More Related Content

What's hot

Color model
Color modelColor model
RGB Color Model and Monitor Resolution
RGB Color Model and Monitor ResolutionRGB Color Model and Monitor Resolution
RGB Color Model and Monitor Resolution
Adya Tiwari
 
Rgb colour model
Rgb colour modelRgb colour model
Rgb colour model
Ashek Shanto
 
Color fundamentals and color models - Digital Image Processing
Color fundamentals and color models - Digital Image ProcessingColor fundamentals and color models - Digital Image Processing
Color fundamentals and color models - Digital Image Processing
Amna
 
Color models
Color modelsColor models
Color models
Haitham Ahmed
 
test 1
test 1test 1
test 1
amberglo
 
Computer graphices presentation
Computer graphices presentationComputer graphices presentation
Computer graphices presentation
Md. Touhidur Rahman
 
Color model in computer graphics
Color model in computer graphicsColor model in computer graphics
Color model in computer graphics
Puja Dhakal
 
HSI MODEL IN COLOR IMAGE PROCESSING
HSI MODEL IN COLOR IMAGE PROCESSING HSI MODEL IN COLOR IMAGE PROCESSING
HSI MODEL IN COLOR IMAGE PROCESSING
anam singla
 
Color image processing
Color image processingColor image processing
Color image processing
rmsurya
 
Color Image Processing
Color Image ProcessingColor Image Processing
Color Image Processing
kiruthiammu
 
Color image processing Presentation
Color image processing PresentationColor image processing Presentation
Color image processing Presentation
Revanth Chimmani
 
Coloring
ColoringColoring
Coloring
dharshan119
 
Multimedia color in image and video
Multimedia color in image and videoMultimedia color in image and video
Multimedia color in image and video
Mazin Alwaaly
 
Image processing
Image processingImage processing
Image processing
Mydul Islam Rashed
 
Lect 06
Lect 06 Lect 06
Lect 06
Moe Moe Myint
 
Color models in Digitel image processing
Color models in Digitel image processingColor models in Digitel image processing
Color models in Digitel image processing
Aryan Shivhare
 
introduction to colors in images and videos
introduction to colors in images and videosintroduction to colors in images and videos
introduction to colors in images and videos
wasrse
 
Color Image Processing: Basics
Color Image Processing: BasicsColor Image Processing: Basics
Color Image Processing: Basics
A B Shinde
 
color image processing
color image processingcolor image processing
color image processing
HemanthvenkataSaiA
 

What's hot (20)

Color model
Color modelColor model
Color model
 
RGB Color Model and Monitor Resolution
RGB Color Model and Monitor ResolutionRGB Color Model and Monitor Resolution
RGB Color Model and Monitor Resolution
 
Rgb colour model
Rgb colour modelRgb colour model
Rgb colour model
 
Color fundamentals and color models - Digital Image Processing
Color fundamentals and color models - Digital Image ProcessingColor fundamentals and color models - Digital Image Processing
Color fundamentals and color models - Digital Image Processing
 
Color models
Color modelsColor models
Color models
 
test 1
test 1test 1
test 1
 
Computer graphices presentation
Computer graphices presentationComputer graphices presentation
Computer graphices presentation
 
Color model in computer graphics
Color model in computer graphicsColor model in computer graphics
Color model in computer graphics
 
HSI MODEL IN COLOR IMAGE PROCESSING
HSI MODEL IN COLOR IMAGE PROCESSING HSI MODEL IN COLOR IMAGE PROCESSING
HSI MODEL IN COLOR IMAGE PROCESSING
 
Color image processing
Color image processingColor image processing
Color image processing
 
Color Image Processing
Color Image ProcessingColor Image Processing
Color Image Processing
 
Color image processing Presentation
Color image processing PresentationColor image processing Presentation
Color image processing Presentation
 
Coloring
ColoringColoring
Coloring
 
Multimedia color in image and video
Multimedia color in image and videoMultimedia color in image and video
Multimedia color in image and video
 
Image processing
Image processingImage processing
Image processing
 
Lect 06
Lect 06 Lect 06
Lect 06
 
Color models in Digitel image processing
Color models in Digitel image processingColor models in Digitel image processing
Color models in Digitel image processing
 
introduction to colors in images and videos
introduction to colors in images and videosintroduction to colors in images and videos
introduction to colors in images and videos
 
Color Image Processing: Basics
Color Image Processing: BasicsColor Image Processing: Basics
Color Image Processing: Basics
 
color image processing
color image processingcolor image processing
color image processing
 

Similar to Color

About Color
About ColorAbout Color
About Color
Naushad Thotad
 
Project report_DTRL_subrat
Project report_DTRL_subratProject report_DTRL_subrat
Project report_DTRL_subrat
Subrat Prasad
 
Image processing tatorial
Image processing tatorialImage processing tatorial
Image processing tatorial
Syed Muhammad Hammad
 
Color_Spaces.pptx
Color_Spaces.pptxColor_Spaces.pptx
Color_Spaces.pptx
JosRamnIglesiasGamar
 
Image processing report
Image processing reportImage processing report
Image processing report
Siddhesh Chavan
 
Color image processing.ppt
Color image processing.pptColor image processing.ppt
Color image processing.ppt
Papajuvvanapudi
 
Colour spaces
Colour spacesColour spaces
Colour spaces
Khaled Nowara
 
Color Models Computer Graphics
Color Models Computer GraphicsColor Models Computer Graphics
Color Models Computer Graphics
dhruv141293
 
An investigation for steganography using different color system
An investigation for steganography using different color systemAn investigation for steganography using different color system
An investigation for steganography using different color system
Dr Amira Bibo
 
06 color image processing
06 color image processing06 color image processing
06 color image processing
Jaiverdhan .
 
Colorization of Gray Scale Images in YCbCr Color Space Using Texture Extract...
Colorization of Gray Scale Images in YCbCr Color Space Using  Texture Extract...Colorization of Gray Scale Images in YCbCr Color Space Using  Texture Extract...
Colorization of Gray Scale Images in YCbCr Color Space Using Texture Extract...
IOSR Journals
 
Color-in-Digital-Image-Processing.pptx
Color-in-Digital-Image-Processing.pptxColor-in-Digital-Image-Processing.pptx
Color-in-Digital-Image-Processing.pptx
EveCarolino
 
Color theorykareemebrahim
Color theorykareemebrahimColor theorykareemebrahim
Color theorykareemebrahim
Kareem .
 
Colormodels
ColormodelsColormodels
Colormodels
Bhavik Vashi
 
lecture3 color representation in computer graphics(Computer graphics tutorials)
lecture3 color representation in computer graphics(Computer graphics tutorials)lecture3 color representation in computer graphics(Computer graphics tutorials)
lecture3 color representation in computer graphics(Computer graphics tutorials)
Daroko blog(www.professionalbloggertricks.com)
 
image-pro.ppt
image-pro.pptimage-pro.ppt
image-pro.ppt
RANJITHA58
 
Id3115321536
Id3115321536Id3115321536
Id3115321536
IJERA Editor
 
Color models
Color modelsColor models
Color models
Rakesh Pandey
 
Color image processing
Color image processingColor image processing
Color image processing
Madhuri Sachane
 
Lecnoninecolorspacemodelindigitalimageprocess
LecnoninecolorspacemodelindigitalimageprocessLecnoninecolorspacemodelindigitalimageprocess
Lecnoninecolorspacemodelindigitalimageprocess
IrsaAamir
 

Similar to Color (20)

About Color
About ColorAbout Color
About Color
 
Project report_DTRL_subrat
Project report_DTRL_subratProject report_DTRL_subrat
Project report_DTRL_subrat
 
Image processing tatorial
Image processing tatorialImage processing tatorial
Image processing tatorial
 
Color_Spaces.pptx
Color_Spaces.pptxColor_Spaces.pptx
Color_Spaces.pptx
 
Image processing report
Image processing reportImage processing report
Image processing report
 
Color image processing.ppt
Color image processing.pptColor image processing.ppt
Color image processing.ppt
 
Colour spaces
Colour spacesColour spaces
Colour spaces
 
Color Models Computer Graphics
Color Models Computer GraphicsColor Models Computer Graphics
Color Models Computer Graphics
 
An investigation for steganography using different color system
An investigation for steganography using different color systemAn investigation for steganography using different color system
An investigation for steganography using different color system
 
06 color image processing
06 color image processing06 color image processing
06 color image processing
 
Colorization of Gray Scale Images in YCbCr Color Space Using Texture Extract...
Colorization of Gray Scale Images in YCbCr Color Space Using  Texture Extract...Colorization of Gray Scale Images in YCbCr Color Space Using  Texture Extract...
Colorization of Gray Scale Images in YCbCr Color Space Using Texture Extract...
 
Color-in-Digital-Image-Processing.pptx
Color-in-Digital-Image-Processing.pptxColor-in-Digital-Image-Processing.pptx
Color-in-Digital-Image-Processing.pptx
 
Color theorykareemebrahim
Color theorykareemebrahimColor theorykareemebrahim
Color theorykareemebrahim
 
Colormodels
ColormodelsColormodels
Colormodels
 
lecture3 color representation in computer graphics(Computer graphics tutorials)
lecture3 color representation in computer graphics(Computer graphics tutorials)lecture3 color representation in computer graphics(Computer graphics tutorials)
lecture3 color representation in computer graphics(Computer graphics tutorials)
 
image-pro.ppt
image-pro.pptimage-pro.ppt
image-pro.ppt
 
Id3115321536
Id3115321536Id3115321536
Id3115321536
 
Color models
Color modelsColor models
Color models
 
Color image processing
Color image processingColor image processing
Color image processing
 
Lecnoninecolorspacemodelindigitalimageprocess
LecnoninecolorspacemodelindigitalimageprocessLecnoninecolorspacemodelindigitalimageprocess
Lecnoninecolorspacemodelindigitalimageprocess
 

Recently uploaded

CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECTCHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
jpsjournal1
 
14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application
SyedAbiiAzazi1
 
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
University of Maribor
 
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
Mukeshwaran Balu
 
CSM Cloud Service Management Presentarion
CSM Cloud Service Management PresentarionCSM Cloud Service Management Presentarion
CSM Cloud Service Management Presentarion
rpskprasana
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
Rahul
 
DfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributionsDfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributions
gestioneergodomus
 
basic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdfbasic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdf
NidhalKahouli2
 
Literature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptxLiterature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptx
Dr Ramhari Poudyal
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
KrishnaveniKrishnara1
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
Aditya Rajan Patra
 
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMSA SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
IJNSA Journal
 
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdfBPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
MIGUELANGEL966976
 
Exception Handling notes in java exception
Exception Handling notes in java exceptionException Handling notes in java exception
Exception Handling notes in java exception
Ratnakar Mikkili
 
Question paper of renewable energy sources
Question paper of renewable energy sourcesQuestion paper of renewable energy sources
Question paper of renewable energy sources
mahammadsalmanmech
 
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
IJECEIAES
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
Madan Karki
 
sieving analysis and results interpretation
sieving analysis and results interpretationsieving analysis and results interpretation
sieving analysis and results interpretation
ssuser36d3051
 
A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...
nooriasukmaningtyas
 
International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...
gerogepatton
 

Recently uploaded (20)

CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECTCHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
 
14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application
 
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
 
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
 
CSM Cloud Service Management Presentarion
CSM Cloud Service Management PresentarionCSM Cloud Service Management Presentarion
CSM Cloud Service Management Presentarion
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
 
DfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributionsDfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributions
 
basic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdfbasic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdf
 
Literature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptxLiterature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptx
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
 
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMSA SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
 
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdfBPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
 
Exception Handling notes in java exception
Exception Handling notes in java exceptionException Handling notes in java exception
Exception Handling notes in java exception
 
Question paper of renewable energy sources
Question paper of renewable energy sourcesQuestion paper of renewable energy sources
Question paper of renewable energy sources
 
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
 
sieving analysis and results interpretation
sieving analysis and results interpretationsieving analysis and results interpretation
sieving analysis and results interpretation
 
A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...
 
International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...
 

Color

  • 1. Color Images We have seen that photographs and images can be in grayscale or in color. We utilize color in many contexts to convey information. The retina is a light-sensitive layer at the back of the eye that covers about 65 percent of its interior surface. The human eye contains two different kinds of photosensitive receptor cells called rods and cones in the retina that convert incident light energy into signals that are carried to the brain by the optic nerve. (http://hyperphysics.phy-astr.gsu.edu/hbase/vision/eye.html) Rods are used for night vision and are mostly color independent. Cones mediate color vision. There are three types of cones. The wavelength of visible light is between 400 nm and 700 nm. (http://hyperphysics.phy-astr.gsu.edu/hbase/vision/colcon.html)
  • 2. The tristimulus theory states that any color can be specified by a weighted combination of three (primary) colors. Red, green and blue are one set of additive primary colors. Additive colors are defined as the three colors of light that when mixed can produce white. Color depth in digital representations The total number of bits over all primary colors used to represent a color is called the color depth. When we refer to a 24-bit color depth with a tristimulus color model we mean each color is represented with 8 bits and hence can have one of 256 different intensities for each color. The total number of colors is 2^24; approximately 16.7 million colors. Indexed color Not all images need to have 16 million different colors. The image itself can have a limited number of colors or an approximation could be tolerated in exchange for file size. Indexed color uses a table to store the colors and stores the index of a color in the table instead of the full color for each pixel. For example, a 1024x1024 image with 256 colors would need 3x1024x1024 = 3 Megabytes using a 24-bit color representation and only need 3x256+1024x1024 ~= 1 Megabyte with an indexed color format; almost 3 fold. The figure below shows the palette and images in two formats.
  • 3. The figures below show the 256-element palettes (left) corresponding to the indexed color images (right) obtained from the original color images (middle). (Original) (Palette) (Indexed)
  • 4. The RGB color model Uses the three primary colors RGB to construct colors. The RGB color space is shown below. It is a cube with red, green and blue as the intensities on the principal axes (X, Y and Z). This, however, only produces a subset of actual colors seen by humans. The triangle in the figure below shows the limits of the RGB model compared to human vision. Nevertheless, this model is useful because TV and computer monitor manufacturers use these three colors to produce an approximation to the color spectrum in an affordable way. (http://dot-color.com/) (CIE: International Commission on Illumination)
  • 5. The HSV color model Another way to describe color is through its hue, saturation and value (brightness). Hue is defined as the wavelength at which most of the energy is concentrated. Brightness or value is a measure of how light or dark the color is. Saturation refers to the color’s purity or colorfulness. There is a direct conversion between the RGB color representation and the HSV representation. (https://en.wikipedia.org/wiki/HSL_and_HSV) MATLAB has two functions to convert between the RGB and HSV representations. The functions are called hsv2rgb and rgb2hsv. See the help pages for their use. Remember that MATLAB will only display RGB images, so if you are working with an HSV representation you need to convert it to RGB before using imshow. CMYK color model Is a subtractive color model. It is usually used for printing. Mixtures of cyan, magenta and yellow are used to produce colors and black (K) is used to produce pure black.