Vips.Image.max (original) (raw)

Method

VipsImagemax

Declaration [src]


int
vips_max (
  VipsImage* in,
  double* out,
  ...
)

Description [src]

This operation finds the maximum value in an image.

By default it finds the single largest value. If size is set >1, it will find the size largest values. It will stop searching early if has found enough values. Equal values will be sorted by y then x.

It operates on all bands of the input image: use vips_stats() if you need to find an maximum for each band.

For complex images, this operation finds the maximum modulus.

You can read out the position of the maximum with x and y. You can read out arrays of the values and positions of the top size maxima without_array, x_array and y_array. These values are returned sorted from largest to smallest.

If there are more than size maxima, the maxima returned will be a random selection of the maxima in the image.

Optional arguments

This method is not directly available to language bindings.

Parameters

out

Type: double*

Output pixel maximum.

The argument will be set by the function.

...

Type: ``

NULL-terminated list of optional named arguments.

Return value

Type: int

0 on success, -1 on error.