*3.2. Optimal Number of Blocks*

As mentioned above, the mutual information can indicate the correlation between images, however calculating that between each bit plane not only is a large amount of calculation, but also the information entropy obtained cannot distinguish different categories well. Therefore, we used a block method to describe the texture of dorsal hand vein, which not only solves the above problems, but in addition; the texture relationship between blocks can eliminate the effects of image rotation and scale changes. The image is divided into m × n blocks as shown in Figure 9.

**Figure 9.** Divide image into blocks.

The number of blocks will affect the extraction of texture features, the appropriate number of blocks can not only minimize dimension of the image, but also largely retain the texture information of the dorsal hand vein, so it is necessary to find the most appropriate number of blocks. According to the principle of pattern recognition, the optimal number of blocks should meet the requirement that the variance of the average entropy matrix based the average threshold as large as possible [16], so as to maximize the difference in average entropy between different blocks. In other words, the difference in texture information is obviously reflected and has good separability [17].

The image is divided from 1 × 1 to 25 × 25 blocks, and the grayscale symbiosis matrix of each sub-block is calculated to obtain the average entropy matrix of each image [18]. We used the Otsu method [19] to obtain the global threshold of each average entropy matrix, and then calculated the average threshold of all images under the same number of blocks, the result is shown in Figure 10.

**Figure 10.** Average threshold distribution of average entropy matrix.

As the number of blocks increases, the average threshold gradually decreases. This is because the sub-image becomes smaller as the number of blocks increases, so the energy of the grayscale symbiosis matrix is reduced. Calculate the corresponding variance according to the average threshold distribution of the average entropy matrix, the formula is:

$$V = \sum \left( f\_{ij} - t \right)^2 \tag{6}$$

In Formula (6), *t* is the average threshold corresponding to average entropy matrix, *fij* is the global threshold corresponding to average entropy matrix of each dorsal hand vein image, *i* is the category to which image belongs in this experiment, and *j* is the order in which image are arranged in this category, the result is shown in Figure 11.

**Figure 11.** The variance of the average entropy matrix.

It can be seen from Figure 11, that when the number of blocks is 20 × 20, the variance is the largest, that is, its threshold value is the best for the classification of the average entropy matrix.
