11-01-2021, 11:07 AM
This is very odd. There are 32 regularly spaced (step=8) peaks in the output histogram (that are the same on all channels). IS the image quantized in the process? If so, forget it, no way you are going to get a proper image after compensation. That would be a bit like transforming a cow so that it eventually comes out alive from the meat grinder.