The heterogeneity of a landscape can be quantified using the Shannon measures for Richness and Evenness. These metrics are a measure of the likelihood that a selected pixel will have the same land cover class as the adjacent pixel. Richness is a measure of the abundance of land cover classes, and evenness is a measure of the relative area of land cover classes.
Richness is the total number of land cover classes in the selected area. A homogeneous area would have a Richness of 1.
Evenness is a measure of the relative abundance of pixels in the area selected and has a value between >0 and 1. For a given number of classes (Richness), an Evenness = 1 is reached when all classes have the same area. Thus, higher values indicate that the number of pixels (area) is more evenly distributed between the land cover classes. Conversely, a value near 0 would indicate that nearly every pixel in the landscape is the same.
The following example demonstrates the range of Shannon Evenness and Richness. If an area with 40 pixels has 40 different land cover classes, then the Richness = 40 and the Evenness = 1. If that same 40 pixel area has two land cover classes and one class is represented in only 1 pixel then the Richness = 2 and the Evenness = 0.1687.
More information on the Shannon Diversity: Richness and Evenness can be found on the Internet: