How Diversidad Works

Diversidad is a two step process. In step one, Diversidad computes the diversity of a digital image (using the Compute Diversity under the Diversity Menu). To do so, users specify the size of the sampling grid (using the Diversity Options under the Diversity Menu). Grid size can be between 9 and 961 pixels (3 x 3 to 31 x 31 pixel grids). Diversidad than calculates two values for each and every pixel in the image, actual diversity and the theoretical maximum diversity. The theoretical maximum diversity is used in step two in which Diversidad displays the results of step one (using the Display Diversity under the Diversity Menu). To view the results, users can toggle back and forth (D), from the original image to a 100-level grayscale rendering of diversity where white/light gray is low diversity and black/dark gray is high diversity. One can also specify whether they want to overlay areas of high or low diversity as a function of the regions percent of the maximum diversity.

The mathematical models that Diversidad uses are familiar to most ecologists and are derived from the work of Shannon and Weaver (1949). The three models used in Diversidad are: Diversity (H'), Maximum Diversity (Hmax) and Percent of Maximum Diversity (PD). These variables are calculated as follows:


1. Diversity: H' = - …(pi € ln pi)


Where pi = p/s

pi = proportion of color i of total pixels in the sample grid
p = total number of pixels of color i
s = total number of pixels in the sample grid

2. Maximum Diversity: Hmax = -s(p/s € lnp/s) = -ln (1/s)

3. Percent of Maximum Diversity: PD = H' / Hmax € 100

The sample grid below contains a total of 121 pixels of 14 colors. As such, it achieves 73.5% of its maximum possible diversity (1.94 / 2.64 x 100).



Color    pi    # of Pixels

 0      0.43       52
 1      0.41        5
 2      0.33        4
 3      0.50        6
 4      1.30       16
 5      0.33        4 
 6      0.17        2   H'  = 1.94
 7      1.20       15   HMax= 2.64
 8      0.08        1   PD  = 73.5%
 9      0.08        1
10      0.66        8
11      0.17        2
12      0.33        4
13      0.08        1 
14      1.00    s=121



Diversidad Diversity Options Examples Resume Next