Vips.Image.hist_entropy (original) (raw)

Method

VipsImagehist_entropy

Declaration [src]


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

Description [src]

Estimate image entropy from a histogram. Entropy is calculated as:

-sum(p * log2(p))

where p is histogram-value / sum-of-histogram-values.

This method is not directly available to language bindings.

Parameters

out

Type: double*

Image entropy.

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.