The *Edge Histogram Descriptor (EHD)* is calculated by dividing an image into 4×4 subframes. Each subframe consists of five bins, each of which represents different edge types, namely vertical, horizontal, 45° diagonal, 135° diagonal, and non-directional edges. The subframes are further divided into non-overlapping, small image blocks to extract all five edge types. If a block contains an edge, the counter of the corresponding edge type is increased by one. If there is no edge in a block, i.e., the region contains only monotonous gray levels, no histogram bin is increased. The five bin values are normalized by the total number of blocks in the subframe, and finally these normalized bin values are quantized. The total number of bins is 4×4×5=80 (the number of subframes multiplied by the number of edge types), as demonstrated by the following example:

<hill.jpg> mpeg7:BinCounts "5 2 1 3 3 4 3 3 4 3 6 0 5 1 3 4 3 2 3 1 2 3 1 4 4 3 0 4 5 6 2 1 5 5 1 2 4 1 7 7 3 2 6 4 2 2 5 7 1 6 6 7 3 7 4 1 1 1 2 0 4 2 1 2 5 4 4 5 3 3 2 2 0 2 3 5 1 3 5 3" .

In this example, the normalized and quantized bins are represented using the `Bincounts`

MPEG-7 property, which are declared by values of the mpeg7:unsigned3 datatype (80 nonnegative integers in the range [0, 7]).