OpenCV
3.0.0
Open Source Computer Vision
|
Enumerations | |
enum | cv::ColormapTypes { cv::COLORMAP_AUTUMN = 0, cv::COLORMAP_BONE = 1, cv::COLORMAP_JET = 2, cv::COLORMAP_WINTER = 3, cv::COLORMAP_RAINBOW = 4, cv::COLORMAP_OCEAN = 5, cv::COLORMAP_SUMMER = 6, cv::COLORMAP_SPRING = 7, cv::COLORMAP_COOL = 8, cv::COLORMAP_HSV = 9, cv::COLORMAP_PINK = 10, cv::COLORMAP_HOT = 11, cv::COLORMAP_PARULA = 12 } |
GNU Octave/MATLAB equivalent colormaps. More... | |
Functions | |
void | cv::applyColorMap (InputArray src, OutputArray dst, int colormap) |
Applies a GNU Octave/MATLAB equivalent colormap on a given image. More... | |
The human perception isn't built for observing fine changes in grayscale images. Human eyes are more sensitive to observing changes between colors, so you often need to recolor your grayscale images to get a clue about them. OpenCV now comes with various colormaps to enhance the visualization in your computer vision application.
In OpenCV you only need applyColorMap to apply a colormap on a given image. The following sample code reads the path to an image from command line, applies a Jet colormap on it and shows the result:
enum cv::ColormapTypes |
void cv::applyColorMap | ( | InputArray | src, |
OutputArray | dst, | ||
int | colormap | ||
) |
Applies a GNU Octave/MATLAB equivalent colormap on a given image.
src | The source image, grayscale or colored does not matter. |
dst | The result is the colormapped source image. Note: Mat::create is called on dst. |
colormap | The colormap to apply, see cv::ColormapTypes |