Function

Vipsbandrank

Declaration [src]

int
vips_bandrank (
  VipsImage** in,
  VipsImage** out,
  int n,
  ...
)

Description [src]

Optional arguments:

  • index: pick this index from list of sorted values

Sorts the images in band-element-wise, then outputs an image in which each band element is selected from the sorted list by the index parameter. For example, if index is zero, then each output band element will be the minimum of all the corresponding input band elements.

By default, index is -1, meaning pick the median value.

It works for any uncoded, non-complex image type. Images are cast up to the smallest common-format.

Any image can have either 1 band or n bands, where n is the same for all the non-1-band images. Single band images are then effectively copied to make n-band images.

Smaller input images are expanded by adding black pixels.

See also: vips_rank().

This function is not directly available to language bindings

Parameters

in An array of VipsImage*
 

Array of input images.

 The length of the array is specified in the n argument.
 The data is owned by the caller of the function.
out VipsImage
 

Output image.

 The argument will be set by the function.
 The called function takes ownership of the data, and is responsible for freeing it.
n int
 

Number of input images.

...
 

NULL-terminated list of optional named arguments.

Return value

Returns: int
 

0 on success, -1 on error.