adjust_contrast

Stoner.Image.imagefuncs.adjust_contrast(im, lims=(0.1, 0.9), percent=True)[source]

Rescale the intensity of the image.

Parameters:

im (ImargeArray,ImageFile) – Image data to be worked with.

Keyword Arguments:
  • lims (2-tuple) – limits of rescaling the intensity

  • percent (bool) – if True then lims are the give the percentile of the image intensity histogram, otherwise lims are absolute

Returns:

(ImageArray) – rescaled image

Mostly a call through to skimage.exposure.rescale_intensity. The absolute limits of contrast are added to the metadata as ‘adjust_contrast’