NxView ColorScale Rules

General Information

  • Product: C57-6-M
  • Serial Number: 244888
  • Ensenso SDK Version: 4.0.1502
  • Operating System: Windows
  • Data Attachments?
    • Screenshots

Problem / Question

In my software, I want to display the image calculated from the Disparity map
in the same color scale as the Default Color Scale of the Depth Image display
in NxView.

How does the Default Color Scale setting for NxView’s depth image display
calculate distance to color?

Best regards,
K.N,

Hi,

that’s the Jet color map repeated back to back to make it cyclic. The scaling can be set by the user with the buttons in the top right, but by default it is 100mm for a single blue to red transition and starts with blue at z = 0mm.

It’s nice that you want to replicate the look of NxView, but please note that the Jet color map is not considered very good nowadays :slight_smile:. There are more modern color maps available which are better perceptually and for color blind people, such e.g. the perceptually uniform color maps from matplotlib.

1 Like

If you want to dig into the color conversion you can have a look at the NxView source. The color mapping is mostly in <InstallationFolder>/development/examples/C++/nxView/NxGuiShared/src/binaryFormatConversionFunctions.cpp. The function valueToColorIndex does the repeated mapping of the z coordinate (or disparity) to the index in the color map. And in qtColormaps.cpp in the same folder you can find an implementation of how the “jet” colormap can be generated.

1 Like

Thank you for your reply.
It was very helpful.
I checked the sources you provided and my understanding was deepened.
It looks like it can be implemented.
Thanks for your support and
With kind regards
K.N.

Continuing the discussion from NxView ColorScale Rules:

Thank you for your reply.
The detailed explanation helped me understand the behavior.
It was a great help.
Thank you very much for your kind support and
With kind regards
K.N.

Thank you for your reply.
It was very helpful.
I checked the sources you provided and my understanding was deepened.
It looks like it can be implemented.
Thanks for your support and
With kind regards
K.N.