Skip to content

Better Grayscale Image Support via Psuedocoloring controls #10178

@sdsteck

Description

@sdsteck

Actions before raising this issue

  • I searched the existing issues and did not find anything similar.
  • I read/searched the docs

Is your feature request related to a problem? Please describe.

I like most of the features provided by CVAT, but I work primarily with 12bit grayscale image data from Industrial cameras and the limited support for grayscale images in general and down sampling to 8bit almost makes using CVAT for my application not worth it. I have seen many other posts often associated with similar issues with grayscale data as well as many from medical applications where I believe much of the data is also grayscale in nature an potentially higher bit depth than mine (12, 16, 24bit?). I've read some of the docs that mention that some of the limitation is related to the web browser UI and its limited grayscale support. I have used a number of other utility software that offers what is sometime referred to as a pseudo-color representation of the grayscale values in order to preserve the full contrast and highlights of the original data using a full RGB color pallet for display without changing the original grayscale data. I believe this would also be useful for data from IR \ Thermal cameras which typically already perform this type of color scaling for displaying temperature intensity.

Describe the solution you'd like

I would like to request a feature to apply a psuedo - color map to grayscale images. The option would have a user configurable feature to specify the bitness of the data and how to map it to the RGB color pallet. Many applications that offer this type of feature typically have several common preallocated look up tables to choose from, as well as an option for the user to point to their own custom LUT. For example I collect my images using National Instruments Labview and their description of the basic function is as follows:


NI LabVIEW Vision Development Module (VDM) allows for simple color emulation of a grayscale image by using color palettes. This process, also known as pseudocoloring or color mapping, does not alter the underlying pixel data but changes how it is visually represented on the screen.

How Color Palettes Work
Pixel Value as Index: A grayscale image stores each pixel's brightness as a single numerical value (e.g., 0 for black to 255 for white in an 8-bit image).

Color Look-Up Table: VDM uses a color table, called a palette, which is an array of Red, Green, and Blue (RGB) intensity values. The grayscale value of a pixel acts as an index into this table.
RGB Mapping: For each grayscale value (0-255), the palette defines a corresponding specific color (an RGB triplet). When the image is displayed, Vision converts each pixel's grayscale value into its mapped RGB intensities.
Key Features and Functions

Predefined Palettes: NI Vision includes several built-in color palettes, such as Gray, Temperature, Rainbow, and Gradient, each emphasizing different gray-level ranges with distinct colors. For example, the Rainbow palette provides a gradation from blue to red.

Customization: Users can create and apply custom palettes to associate specific colors with desired grayscale value ranges, allowing for enhanced visualization of details that are difficult to perceive in pure grayscale.
Enhanced Visualization: Displaying images with different palettes helps highlight subtle intensity variations, making it easier to identify specific features or regions of interest, which is particularly useful in scientific, medical, or temperature monitoring applications.
By applying a palette, users can visually "colorize" the image without changing the original data, effectively using color as a tool to interpret grayscale information.


Describe alternatives you've considered

I could potentially apply this conversion ahead of time to my images prior to importing into CVAT, but this adds additional image processing steps. Using things like adaptative scaling to maximize the the most significant bits is better than nothing but still represents potential loss of data.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions