Method

VipsImagepercent

Declaration [src]

int
vips_percent (
  VipsImage* in,
  double percent,
  int* threshold,
  ...
)

Description [src]

Vips_percent() returns (through the threshold parameter) the threshold below which there are percent values of in. For example:

$ vips percent k2.jpg 90
214

Means that 90% of pixels in k2.jpg have a value less than 214.

The function works for uchar and ushort images only. It can be used to threshold the scaled result of a filtering operation.

See also: vips_hist_find(), vips_profile().

This method is not directly available to language bindings.

Parameters

percent

Type: double

Threshold percentage.

threshold

Type: int*

Output threshold value.

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.