Gini Coefficient Filter

Calculates the Gini coefficient per pixel.

Category

category_math Math

Node

distributioncoefficient_node

Parameters

(none)

Inputs

Input: the input

Outputs

Output: the Gini coefficient output

Effect of the Filter

This filter calculates the Gini coefficient for each pixel according to the formula:

G = \frac{\sum_{i=1}^{N} \sum_{j=1}^{N} |y_i - y_j|}{2N^2\bar y}

where N is the number of channels, y_i is an individual channel value and \bar y is the average of a given channel.

For example, the following spectrum would have a Gini coefficient of 0.047553:

_images/distributioncoefficient_input.png