Let’s say i have a Mat
object representing a grayscale image and another Mat
that represents a black/white mask. Is there a way to equalize the histogram of the image accounting only for the image pixels that correspond to white pixels in the mask?
The pixels outside the mask can either be transformed according to the localized equalization or discarded completely, i only care about the ones inside the mask