I want to convert grayscale data to colored image using C#. I try 2D and convert 1D data and show bitmap, but I want to show Colored image.
相关问题
- Views base64 encoded blob in HTML with PHP
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- How to get the background from multiple images by
- Why am I getting UnauthorizedAccessException on th
The built in graphics and drawings function from the .NET framework do not support working with Grayscale images.
I did the same thing to display a gray image as a heatmap with false colors.
In my case I used the library Emgu.CV
This is some example code I used for my project:
The function GetHueValue:
Note: that the varibale grayShadeMatrix is a greyscale image with just one color-channel (grey value).
This results in images like this (with applied transparency where the greyimage had a value of 0):