I have images with a black figure on white background, but the brightness of the latter varies smoothly in different parts.
How to make it uniform or max. white (255)? Threshold cut is not possible because at the corners brightness drops almost to the brightness of the figure.