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.

Parameters

out double*
 

Image entropy.

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

NULL-terminated list of optional named arguments.

Return value

Returns: int
 

0 on success, -1 on error.