MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0031454Open CASCADE[OCCT] OCCT:Visualizationpublic2020-03-20 23:302020-03-28 13:46
Reporterabv 
Assigned Tobugmaster 
PrioritynormalSeverityminor 
StatusverifiedResolutionfixed 
PlatformOSOS Version
Product Version 
Target Version[OCCT] 7.5.0Fixed in Version 
Summary0031454: Visualization - perceptually uniform color scale
DescriptionCurrent implementation of AIS_ColorSCale can generate color scale using variation of hue parameter in HSL color space. This looks nice but the resulting colors have very different lightness as perceived by the user: blue is much darker than e.g. yellow. This results in very uneven distribution of colors across the model which is shown using the colors from the color scale.

Another problem is that while some colors on the color scale are rather distinct, some are quite close and can hardly be distinguished (especially in green part, see attached image).

It is desirable to have a possibility to generate color scales more uniform in terms of lightness (preferably the same for all colors) and differences between neighbor colors (preferably the same), as percieved by the human user.

This should be achievable using CIE Lch color space and CIE Delta E metric, to produce colors with the same lightness and equal distances between the colors.
Steps To Reproducetest bugs vis bug31454
TagsNo tags attached.
Test case numberbugs/vis/bug22632,bugs/vis/bug31454,v3d/colors/begin,v3d/colors/de2000,v3d/colors/de2000_sharma,v3d/colors/rgb2lab,v3d/colors/rgb2lch,v3d/colors/stability
Attached Filespng file icon uniform_color_scale.png (3,653 bytes) 2020-03-25 10:31
png file icon bug31454.png (11,787 bytes) 2020-03-25 20:39

- Relationships

-  Notes
(0091098)
git (administrator)
2020-03-20 23:33

Branch CR31454 has been created by abv.

SHA-1: a609901501d279d88250db29223a1b01dcd37bcf


Detailed log of new commits:

Author: abv
Date: Thu Mar 19 10:03:40 2020 +0300

    Support of CIE Lab and Lch color spaces in Quantity_Color
    
    Enumeration Quantity_TypeOfColor is extended by new values representing CIE Lab and Lch color spaces (with D65 2 deg illuminant).
    Conversion of RGB color to and from these color spaces is implemented in Quantity_Color class (using existing interface).
    
    DRAW command vconvertcolor is added to perform relevant conversions.
(0091225)
git (administrator)
2020-03-24 23:36

Branch CR31454 has been updated forcibly by abv.

SHA-1: f4fd5dad14debb330e5c36061c8a6bcdca303d3f
(0091227)
git (administrator)
2020-03-25 00:50

Branch CR31454 has been updated forcibly by abv.

SHA-1: 0fdcf1d2ca45dce7a0e1621be95fdce9358d807e
(0091230)
git (administrator)
2020-03-25 07:41

Branch CR31454 has been updated forcibly by abv.

SHA-1: ec38b6bce05e1161553210616892bd42cce52ec1
(0091232)
abv (manager)
2020-03-25 10:50

Please review branch CR31454. Tests are OK, see Jenkins job CR31454-abv (there are some irrelevant failures - one fail looks like instability, and C# wrapper fails reportedly due to disk space).

Support of CIE Lab and Lch color spaces is introduced in Quantity_Color:
- Enumeration Quantity_TypeOfColor is extended by new values representing CIE Lab and Lch color spaces (with D65 2 deg illuminant).
- Conversion of RGB color to and from these color spaces is implemented in Quantity_Color class (within existing API).
- Color difference calculation using CIE Delta E 200 formula is implemented in method DeltaE2000().

New methods MakeUniformColors() and SetUniformColors() are added in class AIS_ColorScale, generating and setting color scale based on colors of the same lightness in CIE Lch color model.

DRAW commands vcolorconvert and vcolordiff are added to perform conversions and compute difference, respectively.
A new option -uniform is added in DRAW command vcolorscale, to set uniform color scale.

Added test grid v3d colors (color conversions and difference), test bugs vis bug31454 (uniform color scale)

The image uniform_color_scale.png shows standard color scale (generated in HSL space) and new uniform one. Note that it was expected that neighbour colors in the uniform color scale should be perceived as equally distant; this is not the case (at least for my eyes and with the monitors I have). This can be investigated further, though I do not see now what else can be impeoved.
(0091239)
kgv (developer)
2020-03-25 13:44

Please correct misprints in comments.
(0091250)
git (administrator)
2020-03-25 20:37

Branch CR31454 has been updated forcibly by abv.

SHA-1: fb665b544ede5f805cd7367a18415a996121b68e
(0091251)
abv (manager)
2020-03-25 20:39

Documentation comments and names of arguments are corrected; test is improved to show several uniform color scales with different lightness and 10 intervals. Please review
(0091252)
kgv (developer)
2020-03-25 20:43

Please raise patch in OCCT branch CR31454.
(0091300)
bugmaster (administrator)
2020-03-27 14:54

Combination -
OCCT branch : WEEK-13
master SHA - 64943a5187fa485536cd2dd1dd4d51b13d189b89
fe4497f3246e6bc1ced97ac331c148f0809ded15
Products branch : WEEK-13 SHA - f10b867b449ebfa55e0a3c8cb276ae511f9cf7f2
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.

Number of compiler warnings:
No new/fixed warnings

Regressions/Differences/Improvements:
No regressions/differences

CPU differences:
Debian80-64:
OCCT
Total CPU difference: 16868.620000000134 / 16846.320000000138 [+0.13%]
Products
Total CPU difference: 11317.180000000084 / 11306.210000000074 [+0.10%]
Windows-64-VC14:
OCCT
Total CPU difference: 18288.046875 / 18268.796875 [+0.11%]
Products
Total CPU difference: 13120.859375 / 13110.609375 [+0.08%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
(0091321)
git (administrator)
2020-03-28 13:46

Branch CR31454 has been deleted by inv.

SHA-1: fb665b544ede5f805cd7367a18415a996121b68e

- Related Changesets
occt: master 14b741b0
Timestamp: 2020-03-19 07:03:40
Author: abv
Committer: bugmaster
Details ] Diff ]
0031454: Visualization - perceptually uniform color scale

Support of CIE Lab and Lch color spaces is introduced in Quantity_Color:
- Enumeration Quantity_TypeOfColor is extended by new values representing CIE Lab and Lch color spaces (with D65 2 deg illuminant).
- Conversion of RGB color to and from these color spaces is implemented in Quantity_Color class (within existing API).
- Color difference calculation using CIE Delta E 200 formula is implemented in method DeltaE2000().

New methods MakeUniformColors() and SetUniformColors() are added in class AIS_ColorScale, generating and setting color scale based on colors of the same lightness in CIE Lch color model.

DRAW commands vcolorconvert and vcolordiff are added to perform conversions and compute difference, respectively.
A new option -uniform is added in DRAW command vcolorscale, to set uniform color scale.

Added test grid v3d colors (color conversions and difference), test bugs vis bug31454 (uniform color scale)
mod - src/AIS/AIS_ColorScale.cxx Diff ] File ]
mod - src/AIS/AIS_ColorScale.hxx Diff ] File ]
mod - src/Quantity/Quantity_Color.cxx Diff ] File ]
mod - src/Quantity/Quantity_Color.hxx Diff ] File ]
mod - src/Quantity/Quantity_TypeOfColor.hxx Diff ] File ]
mod - src/ViewerTest/ViewerTest_ViewerCommands.cxx Diff ] File ]
mod - tests/bugs/vis/bug22632 Diff ] File ]
add - tests/bugs/vis/bug31454 Diff ] File ]
add - tests/v3d/colors/begin Diff ] File ]
add - tests/v3d/colors/de2000 Diff ] File ]
add - tests/v3d/colors/de2000_sharma Diff ] File ]
add - tests/v3d/colors/rgb2lab Diff ] File ]
add - tests/v3d/colors/rgb2lch Diff ] File ]
add - tests/v3d/colors/stability Diff ] File ]
mod - tests/v3d/grids.list Diff ] File ]

- Issue History
Date Modified Username Field Change
2020-03-20 23:30 abv New Issue
2020-03-20 23:30 abv Assigned To => kgv
2020-03-20 23:33 git Note Added: 0091098
2020-03-24 23:36 git Note Added: 0091225
2020-03-25 00:50 git Note Added: 0091227
2020-03-25 07:41 git Note Added: 0091230
2020-03-25 10:31 abv File Added: uniform_color_scale.png
2020-03-25 10:50 abv Note Added: 0091232
2020-03-25 10:50 abv Status new => resolved
2020-03-25 10:50 abv Steps to Reproduce Updated View Revisions
2020-03-25 13:44 kgv Note Added: 0091239
2020-03-25 13:44 kgv Assigned To kgv => abv
2020-03-25 13:44 kgv Status resolved => assigned
2020-03-25 20:37 git Note Added: 0091250
2020-03-25 20:39 abv Note Added: 0091251
2020-03-25 20:39 abv Assigned To abv => kgv
2020-03-25 20:39 abv Status assigned => resolved
2020-03-25 20:39 abv File Added: bug31454.png
2020-03-25 20:43 kgv Note Added: 0091252
2020-03-25 20:43 kgv Assigned To kgv => bugmaster
2020-03-25 20:43 kgv Status resolved => reviewed
2020-03-27 14:54 bugmaster Note Added: 0091300
2020-03-27 14:54 bugmaster Status reviewed => tested
2020-03-27 14:56 bugmaster Test case number => bugs/vis/bug22632,bugs/vis/bug31454,v3d/colors/begin,v3d/colors/de2000,v3d/colors/de2000_sharma,v3d/colors/rgb2lab,v3d/colors/rgb2lch,v3d/colors/stability
2020-03-28 13:36 bugmaster Changeset attached => occt master 14b741b0
2020-03-28 13:36 bugmaster Status tested => verified
2020-03-28 13:36 bugmaster Resolution open => fixed
2020-03-28 13:46 git Note Added: 0091321


Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker