magickClaheImage method

Future<bool> magickClaheImage({
  1. required int width,
  2. required int height,
  3. required double numberBins,
  4. required double clipLimit,
})

magickCLAHEImage() is a variant of adaptive histogram equalization in which the contrast amplification is limited, so as to reduce this problem of noise amplification.

This method runs inside an isolate different from the main isolate.

  • width : the width of the tile divisions to use in horizontal direction.
  • height : the height of the tile divisions to use in vertical direction.
  • numberBins : number of bins for histogram ("dynamic range"). Although parameter is currently a double, it is cast to size_t internally.
  • clipLimit : contrast limit for localised changes in contrast. A limit less than 1 results in standard non-contrast limited AHE.

Implementation

Future<bool> magickClaheImage({
  required int width,
  required int height,
  required double numberBins,
  required double clipLimit,
}) async =>
    await _magickCompute(
      _magickCLAHEImage,
      _MagickCLAHEImageParams(
        _wandPtr.address,
        width,
        height,
        numberBins,
        clipLimit,
      ),
    );