Consistent equalization on set of images
I want to use exposure.equalize_adapthist() on a set of images, but a defined part of each image occasionally will have a very bright object in it, which I would like to ignore when calculating the equalization. Currently, the images with the very bright object are much darker than the images without it. Really, one of two solutions would work, but I don't know how to do either with scikit-image: 1) Calculate a histogram equalization for the entire set of images and apply the same equalization to each one 2) Mask the area with the bright object, calculate the equalization of the rest of the image, and apply that equalization to the original image. Are either possible? Thanks!
There is no way to do either directly, however: 1. You could take the mean of all images and apply the equalization to that image. 2. If you know the affected region you could just set the pixels in that region to the mean count in the image or take the pixels directly from an image that does not have the bright spot. Then run the equalization on that image.
Hi Jim On Tue, May 27, 2014 at 7:33 PM, <jim@rybarski.com> wrote:
I want to use exposure.equalize_adapthist() on a set of images, but a defined part of each image occasionally will have a very bright object in it, which I would like to ignore when calculating the equalization. Currently, the images with the very bright object are much darker than the images without it.
It sounds like histogram matching might be a good first step. See, e.g., https://github.com/stefanv/supreme/blob/master/supreme/photometry/register.p... That function hasn't been battle tested, so you may want to use it as inspiration only. Stéfan
participants (3)
-
jim@rybarski.com
-
Steven Silvester
-
Stéfan van der Walt