SlideShare a Scribd company logo
OPENCV-
COLORMAPS
Standard types of colormaps in OpenCV-python
COLORMAPS
• Color mapping is a function that maps the colors of one image to the colors of
another image.
• A color mapping may be referred to as the algorithm that results in the mapping
function or the algorithm that transforms the image colors.
• A colored image consists of three channels namely the Red, Green and Blue.
• So the colormap function maps colors to the given RGB image.
• Colormap is like a filter which uses gradients of different colors.
• A colormap seen in the previous presentation is the HSV.
• The HSV maps the temperature color for the RGB image.
COLORMAP IN OPENCV
• The function used for the colormap is known as applyColorMap.
• cv2.applyColorMap(image location, mode)
• The first argument is the location of the read image. This is simply a variable which
is used to store the read image from the cv2.imread function.
• The second argument is the mode we are going to use. This refers to the type of
colormap we are going to use.
• This is done by calling the name of the colormap…like COLORMAP_BONE
• This will use the bone type of colormap on the input image.
• Also we have to use imshow and waitKey functions.
INDICES
• The commands given in the mode argument are a bit longer.
• So there are indices for each mode of colormap.
• In python version of OpenCV there are about 22 different standard colormaps
available.
• These colormaps are indexed from 0 to 21.
• For example, COLORMAP_AUTUMN has the index of 0.
• So instead of typing the entire command, we can just type the index number for the
respective colormap to access it.
• The indices for the standard colormaps are given in the next slide.
STANDARD COLORMAPS
COLORMAP_AUTUMN = 0,
COLORMAP_BONE = 1,
COLORMAP_JET = 2,
COLORMAP_WINTER = 3,
COLORMAP_RAINBOW = 4,
COLORMAP_OCEAN = 5,
COLORMAP_SUMMER = 6,
COLORMAP_SPRING = 7,
COLORMAP_COOL = 8,
COLORMAP_HSV = 9,
COLORMAP_PINK = 10,
CONTD…
• COLORMAP_HOT = 11,
COLORMAP_PARULA = 12,
COLORMAP_MAGMA = 13,
COLORMAP_INFERNO = 14,
COLORMAP_PLASMA = 15,
COLORMAP_VIRIDIS = 16,
COLORMAP_CIVIDIS = 17,
COLORMAP_TWILIGHT = 18,
COLORMAP_TWILIGHT_SHIFTED = 19,
COLORMAP_TURBO = 20,
COLORMAP_DEEPGREEN = 21
COLORMAP_AUTUMN
COLORMAP_BONE
COLORMAP_JET
COLORMAP_WINTER
COLORMAP_RAINBOW
COLRMAP_OCEAN
COLORMAP_SUMMER
COLORMAP_SPRING
COLORMAP_COOL
COLORMAP_HSV
COLORMAP_PINK
COLORMAP_HOT
COLORMAP_PARULA
COLORMAP_MAGMA
COLORMAP_INFERNO
COLORMAP_PLASMA
COLORMAP_VIRIDIS
COLORMAP_CIVIDIS
COLORMAP_TWILIGHT
COLORMAP_TWILIGHT_SHIFTED
COLORMAP_TURBO
COLORMAP_DEEPGREEN
OpenCV presentation series- part 2

More Related Content

PPTX
OpenCV presentation series- part 3
PPTX
OpenCV presentation series- part 4
PPTX
OpenCV presentation series- part 5
PDF
Local binary pattern
PPTX
Introduction to Image Processing with MATLAB
PDF
Basics of Image Processing using MATLAB
PDF
//STEIM Workshop: A Vernacular of File Formats
PPTX
Jpeg compression
OpenCV presentation series- part 3
OpenCV presentation series- part 4
OpenCV presentation series- part 5
Local binary pattern
Introduction to Image Processing with MATLAB
Basics of Image Processing using MATLAB
//STEIM Workshop: A Vernacular of File Formats
Jpeg compression

What's hot (20)

PPTX
Particle filter and cam shift approach for motion detection
PPTX
PPTX
5. gray level transformation
PPTX
Digital image processing
PPTX
Point processing
PPTX
Active contour segmentation
PPTX
Psuedo color
PPTX
Ec section
PPT
Image compression jpeg coding standards
PPTX
Introductory Digital Image Processing using Matlab, IIT Roorkee
PPT
Muzammil Abdulrahman PPT On Gabor Wavelet Transform (GWT) Based Facial Expres...
PDF
Contrast enhancement in digital images
PPTX
JPEG Image Compression
PPT
Image Compression
PPT
Image enhancement
PPT
image_enhancement_spatial
PDF
Image analysis using python
PPTX
Chapter 6 color image processing
PPTX
Image compression and jpeg
PPTX
Image processing second unit Notes
Particle filter and cam shift approach for motion detection
5. gray level transformation
Digital image processing
Point processing
Active contour segmentation
Psuedo color
Ec section
Image compression jpeg coding standards
Introductory Digital Image Processing using Matlab, IIT Roorkee
Muzammil Abdulrahman PPT On Gabor Wavelet Transform (GWT) Based Facial Expres...
Contrast enhancement in digital images
JPEG Image Compression
Image Compression
Image enhancement
image_enhancement_spatial
Image analysis using python
Chapter 6 color image processing
Image compression and jpeg
Image processing second unit Notes
Ad

Similar to OpenCV presentation series- part 2 (20)

PPTX
Presentation.pptx
PPTX
ATTRIBUTES OF OUTPUT PRIMITIVES IN COMPUTER GRAPHICS
PPSX
Iterative Algorithms.ppsx
PPSX
iterativealgorithms.ppsx
PPTX
attribute.pptx
PDF
User Interactive Color Transformation between Images
DOC
Pulse code modulation and Quantization
PPTX
OpenCV presentation series- part 1
PPTX
Gamma and Colour Space
PDF
RP BASED OPTIMIZED IMAGE COMPRESSING TECHNIQUE
PPTX
Algorithm analysis and design
PDF
05 Scalar Visualization
PDF
Mediump support in Mesa (XDC 2019)
PPTX
COLOUR DETECTION MODEL PPT.pptx.........
PPTX
Graph coloring problem(DAA).pptx
PPT
Fill area algorithms
PPTX
Unit 11. Graphics
PDF
Photoshop Tools
PDF
Parallel Artificial Bee Colony Algorithm
PDF
maXbox Starter78 PortablePixmap
Presentation.pptx
ATTRIBUTES OF OUTPUT PRIMITIVES IN COMPUTER GRAPHICS
Iterative Algorithms.ppsx
iterativealgorithms.ppsx
attribute.pptx
User Interactive Color Transformation between Images
Pulse code modulation and Quantization
OpenCV presentation series- part 1
Gamma and Colour Space
RP BASED OPTIMIZED IMAGE COMPRESSING TECHNIQUE
Algorithm analysis and design
05 Scalar Visualization
Mediump support in Mesa (XDC 2019)
COLOUR DETECTION MODEL PPT.pptx.........
Graph coloring problem(DAA).pptx
Fill area algorithms
Unit 11. Graphics
Photoshop Tools
Parallel Artificial Bee Colony Algorithm
maXbox Starter78 PortablePixmap
Ad

More from Sairam Adithya (7)

PPTX
COUNTERS(Synchronous & Asynchronous)
PPTX
SEQUENTIAL LOGIC CIRCUITS (FLIP FLOPS AND LATCHES)
PPTX
Medical waste segregation using deep learning
PPTX
A Brief Introduction to Diabetes Mellitus
PPTX
Detection of medical instruments project- PART 2
PPTX
Detection of medical instruments project- PART 1
PPTX
TASK-OPTIMIZED DEEP NEURAL NETWORK TO REPLICATE THE HUMAN AUDITORY CORTEX
COUNTERS(Synchronous & Asynchronous)
SEQUENTIAL LOGIC CIRCUITS (FLIP FLOPS AND LATCHES)
Medical waste segregation using deep learning
A Brief Introduction to Diabetes Mellitus
Detection of medical instruments project- PART 2
Detection of medical instruments project- PART 1
TASK-OPTIMIZED DEEP NEURAL NETWORK TO REPLICATE THE HUMAN AUDITORY CORTEX

Recently uploaded (20)

PDF
Supply Chain Operations Speaking Notes -ICLT Program
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PDF
Computing-Curriculum for Schools in Ghana
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
Complications of Minimal Access Surgery at WLH
PDF
Anesthesia in Laparoscopic Surgery in India
PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
01-Introduction-to-Information-Management.pdf
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PPTX
Lesson notes of climatology university.
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PDF
Pre independence Education in Inndia.pdf
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
Supply Chain Operations Speaking Notes -ICLT Program
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
Computing-Curriculum for Schools in Ghana
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Complications of Minimal Access Surgery at WLH
Anesthesia in Laparoscopic Surgery in India
PPH.pptx obstetrics and gynecology in nursing
01-Introduction-to-Information-Management.pdf
Renaissance Architecture: A Journey from Faith to Humanism
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Lesson notes of climatology university.
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
Pre independence Education in Inndia.pdf
STATICS OF THE RIGID BODIES Hibbelers.pdf
Final Presentation General Medicine 03-08-2024.pptx
2.FourierTransform-ShortQuestionswithAnswers.pdf
102 student loan defaulters named and shamed – Is someone you know on the list?

OpenCV presentation series- part 2

  • 1. OPENCV- COLORMAPS Standard types of colormaps in OpenCV-python
  • 2. COLORMAPS • Color mapping is a function that maps the colors of one image to the colors of another image. • A color mapping may be referred to as the algorithm that results in the mapping function or the algorithm that transforms the image colors. • A colored image consists of three channels namely the Red, Green and Blue. • So the colormap function maps colors to the given RGB image. • Colormap is like a filter which uses gradients of different colors. • A colormap seen in the previous presentation is the HSV. • The HSV maps the temperature color for the RGB image.
  • 3. COLORMAP IN OPENCV • The function used for the colormap is known as applyColorMap. • cv2.applyColorMap(image location, mode) • The first argument is the location of the read image. This is simply a variable which is used to store the read image from the cv2.imread function. • The second argument is the mode we are going to use. This refers to the type of colormap we are going to use. • This is done by calling the name of the colormap…like COLORMAP_BONE • This will use the bone type of colormap on the input image. • Also we have to use imshow and waitKey functions.
  • 4. INDICES • The commands given in the mode argument are a bit longer. • So there are indices for each mode of colormap. • In python version of OpenCV there are about 22 different standard colormaps available. • These colormaps are indexed from 0 to 21. • For example, COLORMAP_AUTUMN has the index of 0. • So instead of typing the entire command, we can just type the index number for the respective colormap to access it. • The indices for the standard colormaps are given in the next slide.
  • 5. STANDARD COLORMAPS COLORMAP_AUTUMN = 0, COLORMAP_BONE = 1, COLORMAP_JET = 2, COLORMAP_WINTER = 3, COLORMAP_RAINBOW = 4, COLORMAP_OCEAN = 5, COLORMAP_SUMMER = 6, COLORMAP_SPRING = 7, COLORMAP_COOL = 8, COLORMAP_HSV = 9, COLORMAP_PINK = 10,
  • 6. CONTD… • COLORMAP_HOT = 11, COLORMAP_PARULA = 12, COLORMAP_MAGMA = 13, COLORMAP_INFERNO = 14, COLORMAP_PLASMA = 15, COLORMAP_VIRIDIS = 16, COLORMAP_CIVIDIS = 17, COLORMAP_TWILIGHT = 18, COLORMAP_TWILIGHT_SHIFTED = 19, COLORMAP_TURBO = 20, COLORMAP_DEEPGREEN = 21