TMS icon indicating copy to clipboard operation
TMS copied to clipboard

update plugins to have output in range [0,1]

Open freetomik opened this issue 6 years ago • 1 comments

As said in #83, plugins' output is expected to be in range [0,1] to get them correctly work with tmocmd, otherwise result image has wrong luminance range.

More plugins does not respect that. There are some I have tested - name and output range: Ward94: 0-1.8 CLAHE: 0-344 Biswas05: 0-2.3 Ancuti16: 0-255 Zhongping15: from 0-1 to 0-11.4 (Tested with image with input range 0-241.)

With OpenCV it is matter of calling function

cv::normalize(image, image, 0, 1, cv::NORM_MINMAX, image.type());

before writing result image to output.

For plugins which don't use OpenCV, it should be possible with help of minLum and maxLum from TMOImage.statistics I guess.

Also it will be good to write some guideline for writing plugins and mention this output range there.

freetomik avatar Feb 14 '19 17:02 freetomik

done for Kou15

freetomik avatar May 15 '19 12:05 freetomik