Strange output for ColorMapping application with LUT computed on support image
Mantis Issue 976, reported by mgrizonnet, assigned to gpasero, created: 2014-10-06
I think that there is an issue in the computation of the LUT using a support image. I try to colorized a segmentation results using a support image to compute the LUT. Most of the segment are correctly colorized but some of them got strange value (completely blue or red for instance)
I attached an extract on a PHR image and a segmentation result over the area to reproduce the issue.
I suspect that this issue appear after the migration to ITKv4 and is related to modification in itkLabelToRGBImageFilter.
Or perhaps I need to adjust lower and upper quantile (put them to zero), in this case we should probably change the default value in the application.
1412609381 - gpaseroThe problem comes from the cast into unsigned char that happens before clamping. (see otbColorMapping.cxx : line 658 and 661). For instance, a very dark region can give a scaled value (-1.0), which is cast into 254.
1412613189 - gpaseroFixed here : http://hg.orfeo-toolbox.org/OTB/rev/1e1a2f257428
1413464713 - grizonnetmworks now on my image. Thanks.