Self-Adaptive Image Thresholding within Nonextensive Entropy and the Variance of the Gray-Level Distribution

In order to automatically recognize different kinds of objects from their backgrounds, a self-adaptive segmentation algorithm that can effectively extract the targets from various surroundings is of great importance. Image thresholding is widely adopted in this field because of its simplicity and high efficiency. The entropy-based and variance-based algorithms are two main kinds of image thresholding methods, and have been independently developed for different kinds of images over the years. In this paper, their advantages are combined and a new algorithm is proposed to deal with a more general scope of images, including the long-range correlations among the pixels that can be determined by a nonextensive parameter. In comparison with the other famous entropy-based and variance-based image thresholding algorithms, the new algorithm performs better in terms of correctness and robustness, as quantitatively demonstrated by four quality indices, ME, RAE, MHD, and PSNR. Furthermore, the whole process of the new algorithm has potential application in self-adaptive object recognition.


Introduction
One of the most important tasks in image segmentation is to precisely extract objects from their backgrounds. Image thresholding has previously been widely adopted because of its simplicity and efficiency [1][2][3]. For different types of images, a large number of thresholding algorithms exist based on the characteristics of images. More specifically, the gray-level distribution, i.e., the histogram of the gray-level image, plays an important role in the image thresholding algorithms. It is obvious that different types of images will show different histogram profiles, which contain information relating to both the objects and their backgrounds. Therefore, it is desirable to identify characteristic functions that can suggest proper thresholds to separate the objects and backgrounds. The Otsu algorithm [4] is widely adopted to deal with images having a bimodal histogram distribution and can be easily extended to multi-level image segmentation [5][6][7][8][9]. The entropy-based algorithm [10][11][12][13][14] is another option for image segmentation since the gray-level histogram can be considered as a kind of probability distribution, and maximization of the corresponding entropies is a nature-inspired means of finding the optimal thresholds. In order to improve the robustness and anti-interference of the thresholding algorithms, two-dimensional histogram distributions [15][16][17] are frequently used to detect the edges and noise of the images, and thus achieve better segmentation results [18][19][20]. It is worth mentioning that, among these entropy-based algorithms, "Tsallis entropybased thresholding" introduces the concept of nonextensivity into the image segmentation field [21,22]. The nonextensive entropy can be traced from the complex physical systems that have long-range interactions and/or long-duration memories [23,24]. There is a nonextensive parameter that measures the strength of the above mentioned non-local effects.
where M × N is the total number of pixels in the image, h i represents the number of pixels for which the gray-level value is equal to i. Therefore, the normalization of the probability distribution is explicitly expressed as Equation (1).

Otsu Algorithm
Now suppose that the threshold of an image is t. The corresponding gray-level histogram can be divided into two classes, C a = (0, 1, . . . , t) and C b = (t + 1, . . . , L − 1), and the cumulative probability of the above two classes can be written as: The mean values of the gray-level of C a and C b are given by: Using the same idea, the mean gray-level value of the image is: Therefore, the variances of C a , C b , and the total histogram can be respectively written as: Based on Equation (5), the within-class variance and between-class variance are defined as [4]: and the following relation holds: It can be easily seen that for the arbitrary threshold value t, the following relations always hold: The key point of the Otsu algorithm is to maximize the between-class variance by selecting a proper threshold value t * , i.e., t * = Arg max σ 2 B (t) (9) In fact, using Equation (8), the between-class variance can be rewritten as: From Equation (10), it is shown that the between-class variance is dominated by two factors, (ω b − ω a ) 2 and P a P b . Maximizing the factor (ω b − ω a ) 2 means that the gray-level difference between C a and C b is tuned to the maximum by a proper threshold t 1 , which coincides with the principle of image segmentation. However, maximizing the factor P a P b requires finding another threshold t 2 to satisfy P a = P b = 1/2, which means that the number of pixels in the foreground is equal to that in the background. In general, for a given image, t 1 = t 2 . However, the optimal threshold t * represents the trade-off between t 1 and t 2 . Therefore, the Otsu algorithm always has a tendency to equally separate the pixels of an image, demonstrating the deficiency when extracting tiny objects from the background.

Otsu-Kapur Algorithm
The Otsu algorithm is a classical global thresholding technique based on the clustering theorem. The idea of the entropy-based algorithm is quite different from Otsu's, although both of them start from the image's histogram. Shannon entropy is widely adopted in entropy-based image thresholding. It was first proposed by Pun [34] and improved by Kapur in 1985 [35]. By using the a priori entropy of the foreground and background, an objective function is obtained to indicate the optimal threshold under the Maximum Entropy Principle. Based on the gray-level histogram distribution of an image, Shannon entropy is given by: Entropy 2022, 24, 319 4 of 21 Assuming that the histogram is separated into two parts (a and b) by threshold t,. the corresponding entropies are: The objective function ϕ(t) is given by the sum of S(a) and S(b): and the optimal threshold of Kapur algorithm is determined by: In practice, the Kapur algorithm has better performance than the Otsu algorithm in extracting tiny targets from their background. However, this algorithm is quite sensitive to the perturbation of pixels. For instance, the value of Equation (13) varies drastically with the threshold t, which means that the optimal threshold can be easily disturbed by the variation in gray-level distribution and lead to incorrect segmentation. This instability also restricts the application of the Kapur algorithm to a more general scope. Taking the characteristics of the Otsu algorithm into account, it is possible to increase the stability by combining the Kapur and Otsu algorithms, without losing the accuracy of extracting tiny objects. For a given image, the total gray-level variance σ 2 G is fixed. From Equation (7), we can see that maximizing the between-class variance p(x) is equivalent to minimizing the within-class variance σ 2 W . Therefore, Equations (5) and (14) yield the objective function: The optimal threshold is obtained by the following algorithm:

Two-Dimensional Entropic Algorithm
The above-mentioned thresholding algorithms are based on the one-dimensional(1D) gray-level histogram. In order to improve the accuracy and robustness, Ahmed [36] considered not only the pixel's gray-level value, but also the spatial correlation of the pixels in an image. Therefore, the mean gray-level value of neighboring pixels is relevant and the one-dimensional (1D) histogram distribution is extended to the two-dimensional (2D) distribution. If a pixel's gray-level is equal to i and the average gray-level of its neighborhood is j, the number of this kind of pixel among the image is f ij .
The 2D probability distribution can be written as: The total entropy of the 2D histogram is defined as: If the two thresholds are located at s and t, the 2D gray-level histogram is divided into four regions, as shown in Figure 1.
If the two thresholds are located at s and t , the 2D gray-level histogram is divided into four regions, as shown in Figure 1. Assume that the pixels are mainly distributed at two regions, a and b in Figure 1. The cumulative probabilities a of and b are: The corresponding entropies can be written as: Based on the additivity of Shannon entropy, the total entropy is defined as: which is dependent on threshold ( , ) st . By the same idea of the 1D entropy-based algorithm, maximizing the objective function, i.e., Equation (21), can yield the optimal thresholds: Assume that the pixels are mainly distributed at two regions, a and b in Figure 1. The cumulative probabilities a of and b are: The corresponding entropies can be written as: Based on the additivity of Shannon entropy, the total entropy is defined as: which is dependent on threshold (s, t). By the same idea of the 1D entropy-based algorithm, maximizing the objective function, i.e., Equation (21), can yield the optimal thresholds: In practice, the above 2D entropic algorithm is effective for images with uneven illumination, noise, missing edges, poor contrast, and other interference from the environment [37]. It is reasonable to consider more correlations between the pixel and its neighborhood, and the histogram distribution can be extended to higher dimensions. However, the increase in the number of dimensions will lead to an exponential increment in computation.

Tsallis Entropy Algorithm
As mentioned above, Shannon entropy is additive and shows the property of extensivity in image processing. The concept of entropy was first proposed in thermodynamics to describe the physical systems that have a huge number of microstates. Furthermore, the extensivity of entropy is based on the assumption that the microstates among the system are independent of each other. However, for some systems with long-range interactions, Entropy 2022, 24, 319 6 of 21 long-time memory and fractal-type structures, the extensivity may not hold anymore. Tsallis introduces a kind of non-extensive entropy [23] to describe such systems, expressed as: where q is a real number that describes the nonextensivity of the system. In the q → 1 limit, Tsallis entropy is reduced to Shannon entropy and the extensivity of the system is recovered. The nonextensive generalization of entropy also shed lights on the information theory. In image segmentation, Tsallis entropy shows potential superiority and flexibility in a more general scope of image class [21]. In the Tsallis entropy algorithm, the cumulative probability of foreground a and background b are: According to Equation (23), the entropy of each part can be defined as [21]: Suppose that a and b are subsystems of the full image, due to the nonextensivity; the total entropy of the image is expressed as: where the third term on the right-hand side of Equation (26) shows the pseudo-additivity of Tsallis entropy. Maximizing S a+b q yields the optimal threshold t * , which is given by: Obviously, the optimal result of Equation (27) depends on the nonextensive parameter q, which describes the strength of internal correlation of the image. In other words, for an arbitrary two pixels in the image, their gray-level values may have long-range correlations. More specifically, for an image containing several objects, the pixels of objects will exhibit similar gray-level values, even though they are not adjacent to each other. It is possible to measure this kind of long-range correlation by nonextensive entropy [18,21], and this idea inspired a new algorithm that is discussed below. Since the parameter q is an additional index that can tune the optimal threshold, it is of great importance to determine the exact value of q for a given image. Recently, Abdiel and coauthors introduce a methodology to evaluate the nonextensive parameter q of an image [25]. Based on the information theory, the generalized redundancy of an image that presents nonextensive properties can be expressed as [25]: where S Tmax = 1 − L 1−q /(q − 1) is the possible maximum q-entropy of the image that can be achieved at p i = 1/L(0 ≤ i ≤ L − 1), i.e., equipartition of the gray-level probability.
Maximizing Equation (28) by a proper value of q means that the gray-level histogram of the given image is renormalized to deviate from the equal probability case (containing zero information) as far as possible. Therefore, the information contained in the image histogram can be strengthened by a particular q, which is highly image category dependent.

New Algorithm
As mentioned above, the nonextensive entropy algorithm is suitable for describing the long-range correlations within an image. However, like other entropy-based algorithms, it is still very sensitive to the perturbation of signals, so the scope of its application is limited. By comparison, the Otsu algorithm is stable but not accurate for small target extraction. Therefore, it is possible to combine the advantages of the two and develop a new algorithm with a more general scope of application. It is worth mentioning that the nonextensive parameter q in Tsallis entropy is now determined by information redundancy and cannot be tuned arbitrarily.
Based on Equations (5), (7) and (26), a new objective function can be written as: In order to retain the concavity of Tsallis entropy, q > 0 should be satisfied [23]. Alternatively, q < 1 is called superextensivity, which will increase the total entropy of the system in comparison with the extensive case (q = 1) [38]. In practice, almost all categories of images exhibit the property of superextensivity [25]. Therefore, the proper range of the nonextensive parameter can be 0 < q < 1. From Equations (9) and (27), we can see that both of the two algorithms are aimed to maximize the objective functions. Taking Equation (7) into account, it can be easily seen that the aim of Equation (29) is to maximize the objective function, i.e., The optimal threshold is obtained from Equation (30) with the above-mentioned range of q. For a synthetic image having a bimodal histogram distribution, as shown in Figure 2, the profile of each peak is the normalized q-Gaussian distribution function [39]. From Equations (9) and (27), we can see that both the Otsu algorithm and the Tsallis entropy algorithm indicate the valley gray-level between the two peaks as the optimal threshold, which exactly coincides with the result of Equation (30). For other natural pictures that have an arbitrary histogram distribution, there is no evidence that the result of Equation (9) coincides with that of Equation (27), whereas Equation (29) shows a trade-off between them and Equation (30) may yield a proper suggestion. For the histogram of Figure 2, it should be noted that the magnitude difference between S a+b q and σ 2 W is very large. As shown in Figure 3, both of them are functions of threshold t. However, the values of the Tsallis entropy algorithm are totally suppressed by those of the Otsu algorithm for any possible threshold t. Therefore, it is unsuitable to combine S a+b q and σ 2 W directly.    In order to avoid the impact of the magnitude difference, the q-exponential function [40] can be adopted to revise the magnitude of 2 W  . By definition, Tsallis entropy with a continuous probability distribution function can be expressed as: where () px represents the probability density of the normalized gray-level value x . For a system presenting nonextensive q-entropy, the corresponding probability distribution can be written as the q-Gaussian function [39]: In order to avoid the impact of the magnitude difference, the q-exponential function [40] can be adopted to revise the magnitude of σ 2 W . By definition, Tsallis entropy with a continuous probability distribution function can be expressed as: where p(x) represents the probability density of the normalized gray-level value x. For a system presenting nonextensive q-entropy, the corresponding probability distribution can be written as the q-Gaussian function [39]: where σ 2 is the variance of x and Z q is the partition function to keep the probability normalization condition, i.e., where Γ(k) is the Gamma function and will reduce to factorial (k − 1)! if k is an integer. Substituting p(x) into Equation (31) yields: where: Entropy 2022, 24, 319 9 of 21 is the integration constant for a given value of q. If p a and p b are two identical q-Gaussian distribution functions, according to the nonextensivity of Tsallis entropy, the total entropy can be written as: Substituting Therefore, the magnitude of (σ 2 W ) 1−q is comparable with S T (a + b) at the proper range of q, and the rationality of Equation (29) is shown. The main steps of the present algorithm can be seen in Figure 4: Therefore, the magnitude of at the proper range of q, and the rationality of Equation (29) is shown. The main steps of the present algorithm can be seen in Figure 4: The above procedure can also be applied to the segmentation of RGB or other color images. The intense distribution of each color channel can be considered as a gray-level distribution. Therefore, the threshold value of each channel can be obtained directly. It should be mentioned that the intense distributions may differ for different color channels, so the above algorithm cannot yield a unified value, in general. By comparison, both the Otsu algorithm and entropy-based algorithm can be independently adopted for multilevel image thresholding. According to the idea of Equation (29), the advantages of these two kinds of typical thresholding algorithms can be combined by extending Equation (29) to the multi-level case.

Analysis of Experimental Results
In order to show the stability and feasibility of the proposed algorithm, we used four quality indices, namely, Misclassification Error (ME), Relative Foreground Area Error (RAE), Modified Hausdorff Distance (MHD), and Peak Signal-to-Noise Ratio (PSNR), to illustrate the performance of Equation (29) and make comparisons with the other algorithms mentioned in Section 2.

Algorithm
Step 1:Input the image and obtain its graylevel histogram distribution h(t), .
Step 2: For , use Equation (6) to calculate the withinclass variance of foreground and background .

End
Step 3: For a given image, use Equation (28) to determine the value of q.
Step 4:For , use Equation (23) to calculate the total entropy of the graylevel distribution .
Step 5:Revise the magnitude of as: .
Step 7: For , search max to find the optimal threshold . Figure 4. The procedure of the new algorithm.
The above procedure can also be applied to the segmentation of RGB or other color images. The intense distribution of each color channel can be considered as a gray-level distribution. Therefore, the threshold value of each channel can be obtained directly. It should be mentioned that the intense distributions may differ for different color channels, so the above algorithm cannot yield a unified value, in general. By comparison, both the Otsu algorithm and entropy-based algorithm can be independently adopted for multi-level image thresholding. According to the idea of Equation (29), the advantages of these two kinds of typical thresholding algorithms can be combined by extending Equation (29) to the multi-level case.

Analysis of Experimental Results
In order to show the stability and feasibility of the proposed algorithm, we used four quality indices, namely, Misclassification Error (ME), Relative Foreground Area Error (RAE), Modified Hausdorff Distance (MHD), and Peak Signal-to-Noise Ratio (PSNR), to illustrate the performance of Equation (29) and make comparisons with the other algorithms mentioned in Section 2.

Misclassification Error (ME)
Misclassification error expresses the percentage of wrongly assigned image pixels that represent the object and background images. For the single threshold segmentation, ME can be simply expressed as [41]: where C gt and B gt represent the foreground and background of the ground-truth image, C t and B t are the foreground and background pixels in the segmented image, and | . | is the cardinality of the set. The value of ME is between 0 and 1. The lower the value of ME, the better the segmentation result.

Relative Foreground Area Error (RAE)
RAE is a quality assessment parameter that calculates the area of difference between the segmented image and the ground-truth image, which is defined as [42]: where A s and A t are the area of the ground-truth image and the segmented image, respectively. Obviously, for an ideal segmentation in which A t coincides with A s , RAE is zero.

Modified Hausdorff Distance (MHD)
Hausdorff distance is used to determine the degree of similarity between two objects that are overlapped with each other. In order to maintain the symmetry form, the Modified Hausdorff Distance (MHD) is more frequently used and is defined as [43]: where r gt and r t represent objects belonging to the ground-truth image R gt and the segmented result R t , respectively, and r gt − r t is the Hausdorff distance. This parameter can objectively describe the distortion degree of the segmented image and the ground-truth image. If R t perfectly coincides with R gt , then MHD is zero, by definition. Unlike ME and RAE, MHD is not normalized. For failed segmentation, the value of MHD will be much larger than 1.

Peak Signal-to-Noise Ratio (PSNR)
The Peak Signal-to-Noise Ratio is a measurement algorithm used in the image transmission. First, the concept of Mean Square Error (MSE) is required, which is a measure of the difference between two images. It is defined as [44]: where R gt (i, j) and R t (i, j) are pixels of the ground-truth image and segmented image, respectively. It can be easily seen that MSE = 0 if R gt (i, j) = R t (i.j) for arbitrary coordinates (i, j). Therefore, lower MSE represents better quality of image segmentation. Accordingly, PSNR is defined in terms of MSE: Equation (43) shows that, for ideal segmentation ( MSE → 0 ), PSNR will tend to infinity.

Experimental Results
First, we applied the proposed algorithm to segment several well-known testing images. The results of the four other algorithms mentioned above are also listed, as shown in Figures 5-7.

Experimental Results
First, we applied the proposed algorithm to segment several well-known testing images. The results of the four other algorithms mentioned above are also listed, as shown in  In Figure 5, compared to the results of the four other algorithms, i.e., Figure 5b-e, the result of the proposed algorithm has more details and edge contours. In Figure 6, we can see that both the 2D histogram algorithm and the Tsallis entropic algorithm failed to extract the objects from the image. However, the result of the proposed algorithm, i.e., Figure 6f is quite acceptable. We can see more detail information in it, in comparison with Figure 6b,c. In Figure 7e, it is shown that the Tsallis entropic algorithm over segments the original image and the detail of the baboon's face is lost. However, the Otsu, Otsu-Kapur and Shannon 2D thresholds are also not appropriate. As shown in Figure7b-d, the baboon's eyes are blurred by too many black pixels. In contrast, the proposed algorithm has a moderate result, as shown in Figure 7f.  In order to show the advantages of the proposed algorithm more convincingly, we choose 50 test images from VOC-2012, BSD300, and Ref. [45] to compare the performance of these five algorithms. These images have totally different gray-level histograms. Accordingly, their nonextensive parameters are also very different from each other, as shown in Table 1.

Experimental Results
First, we applied the proposed algorithm to segment several well-known testing images. The results of the four other algorithms mentioned above are also listed, as shown in Figures 5-7.
In Figure 5, compared to the results of the four other algorithms, i.e., Figure 5b-e, the result of the proposed algorithm has more details and edge contours. In Figure 6, we can see that both the 2D histogram algorithm and the Tsallis entropic algorithm failed to extract the objects from the image. However, the result of the proposed algorithm, i.e., Figure 6f is quite acceptable. We can see more detail information in it, in comparison with Figure 6b,c. In Figure 7e, it is shown that the Tsallis entropic algorithm over segments the original image and the detail of the baboon's face is lost. However, the Otsu, Otsu-Kapur and Shannon 2D thresholds are also not appropriate. As shown in Figure7b-d, the baboon's eyes are blurred by too many black pixels. In contrast, the proposed algorithm has a moderate result, as shown in Figure 7f.   In order to show the advantages of the proposed algorithm more convincingly, we choose 50 test images from VOC-2012, BSD300, and Ref. [45] to compare the performance of these five algorithms. These images have totally different gray-level histograms. Accordingly, their nonextensive parameters are also very different from each other, as shown in Table 1.

Experimental Results
First, we applied the proposed algorithm to segment several well-known testing images. The results of the four other algorithms mentioned above are also listed, as shown in Figures 5-7.
In Figure 5, compared to the results of the four other algorithms, i.e., Figure 5b-e, the result of the proposed algorithm has more details and edge contours. In Figure 6, we can see that both the 2D histogram algorithm and the Tsallis entropic algorithm failed to extract the objects from the image. However, the result of the proposed algorithm, i.e., Figure 6f is quite acceptable. We can see more detail information in it, in comparison with Figure 6b,c. In Figure 7e, it is shown that the Tsallis entropic algorithm over segments the original image and the detail of the baboon's face is lost. However, the Otsu, Otsu-Kapur and Shannon 2D thresholds are also not appropriate. As shown in Figure7b-d, the baboon's eyes are blurred by too many black pixels. In contrast, the proposed algorithm has a moderate result, as shown in Figure 7f.   In order to show the advantages of the proposed algorithm more convincingly, we choose 50 test images from VOC-2012, BSD300, and Ref. [45] to compare the performance of these five algorithms. These images have totally different gray-level histograms. Accordingly, their nonextensive parameters are also very different from each other, as shown in Table 1.  In Figure 5, compared to the results of the four other algorithms, i.e., Figure 5b-e, the result of the proposed algorithm has more details and edge contours. In Figure 6, we can see that both the 2D histogram algorithm and the Tsallis entropic algorithm failed to extract the objects from the image. However, the result of the proposed algorithm, i.e., Figure 6f is quite acceptable. We can see more detail information in it, in comparison with Figure 6b,c. In Figure 7e, it is shown that the Tsallis entropic algorithm over segments the original image and the detail of the baboon's face is lost. However, the Otsu, Otsu-Kapur and Shannon 2D thresholds are also not appropriate. As shown in Figure 7b-d, the baboon's eyes are blurred by too many black pixels. In contrast, the proposed algorithm has a moderate result, as shown in Figure 7f.
In order to show the advantages of the proposed algorithm more convincingly, we choose 50 test images from VOC-2012, BSD300, and Ref. [45] to compare the performance of these five algorithms. These images have totally different gray-level histograms. Accordingly, their nonextensive parameters are also very different from each other, as shown in Table 1. In order to further illustrate the segmentation results visually, we chose pictures 1-5 of Table 1 as examples, as shown in Figures 8-12.
In Figure 8, the ground-truth image shows that the number of pixels in the foreground is comparable to that of background. Therefore, both the Otsu algorithm and the proposed algorithm achieve acceptable results. However, the entropy-based algorithms cannot yield good results, as shown in Figure 8e,f. In Figure 9, the infrared object is tiny in comparison with the full image size. The Otsu-based algorithm failed to determine the correct results as expected, as shown in Figure 9c,d. By comparison, the infrared image may have a long-range correlation among the pixels, so the Shannon entropy-based algorithm also failed, as shown in Figure 9e. The results of Figure 9f,g are very close to the ground-truth image, which indicates that the value of the nonextensive parameter q can correctly evaluate the long-range correlation in an image. In addition, the value of q is automatically generated by maximizing Equation (27), so the new algorithm is self-adaptive. The results of Figures 10 and 12 are quite similar to that of Figure 8, since there is a large amount of noise in the background and the entropy-based algorithms are very unstable to perturbation, in spite of the increasing dimension of the histogram. However, the new algorithm can still correctly segment the images, which shows the potential application in a more general scope, including tiny object recognition (Figures 9 and 11), background noise suppression (Figures 10 and 12), and detection of long-range correlation.    In order to further illustrate the segmentation results visually, we chose pictures 1-5 of Table 1 as examples, as shown in Figures 8-12.
In Figure 8, the ground-truth image shows that the number of pixels in the foreground is comparable to that of background. Therefore, both the Otsu algorithm and the proposed algorithm achieve acceptable results. However, the entropy-based algorithms cannot yield good results, as shown in Figure 8e,f. In Figure 9, the infrared object is tiny in comparison with the full image size. The Otsu-based algorithm failed to determine the correct results as expected, as shown in Figure 9c,d. By comparison, the infrared image may have a long-range correlation among the pixels, so the Shannon entropy-based algorithm also failed, as shown in Figure 9e. The results of Figure 9f,g are very close to the ground-truth image, which indicates that the value of the nonextensive parameter q can correctly evaluate the long-range correlation in an image. In addition, the value of q is automatically generated by maximizing Equation (27), so the new algorithm is self-adaptive. The results of Figures 10 and 12 are quite similar to that of Figure 8, since there is a large amount of noise in the background and the entropy-based algorithms are very unstable to perturbation, in spite of the increasing dimension of the histogram. However, the new algorithm can still correctly segment the images, which shows the potential application in a more general scope, including tiny object recognition (Figures 9 and 11), background noise suppression (Figures 10 and 12), and detection of long-range correlation.       From Figure 8e to Figure 12e, we can see that the 2-D Shannon algorithm, as a wellknown entropic thresholding procedure, does not have stable outputs. However, the idea of extending the dimension of the histogram using the correlation of the neighboring pixels is still heuristic. It is of great interest to extend Equation (29) into two, or even higher, dimensions of the histogram because the development of optimization algorithms [15], [19,20] can effectively reduce the computational cost.
For each image from the testing set, it should be mentioned that the new algorithm and the Tsallis entropy algorithm share the same value of q, which is determined by maximizing the information redundancy. However, the Tsallis entropy algorithm is very unstable if the image is subject to noise interference, even with a proper value of q. In comparison, the new algorithm is always stable. By comparison, Otsu algorithm is robust but cannot effectively recognize tiny objects. The new algorithm extracts the advantages of both the Otsu and entropy-based algorithms in a proper manner, and this point can be further shown using the detailed quality indices.
For 50 images in the testing set, Tables 2-5 list the above-mentioned four quality indices of the results generated by the five different algorithms, respectively. Due to the variety in the testing set, the new algorithm cannot always ensure the best performance for all images, but its results are still acceptable. Furthermore, the statistical results of Tables 2-5 clearly show the universality of the proposed algorithm for different kinds of images.   From Figure 8e to Figure 12e, we can see that the 2-D Shannon algorithm, as a wellknown entropic thresholding procedure, does not have stable outputs. However, the idea of extending the dimension of the histogram using the correlation of the neighboring pixels is still heuristic. It is of great interest to extend Equation (29) into two, or even higher, dimensions of the histogram because the development of optimization algorithms [15], [19,20] can effectively reduce the computational cost.
For each image from the testing set, it should be mentioned that the new algorithm and the Tsallis entropy algorithm share the same value of q, which is determined by maximizing the information redundancy. However, the Tsallis entropy algorithm is very unstable if the image is subject to noise interference, even with a proper value of q. In comparison, the new algorithm is always stable. By comparison, Otsu algorithm is robust but cannot effectively recognize tiny objects. The new algorithm extracts the advantages of both the Otsu and entropy-based algorithms in a proper manner, and this point can be further shown using the detailed quality indices.
For 50 images in the testing set, Tables 2-5 list the above-mentioned four quality indices of the results generated by the five different algorithms, respectively. Due to the variety in the testing set, the new algorithm cannot always ensure the best performance for all images, but its results are still acceptable. Furthermore, the statistical results of Tables 2-5 clearly show the universality of the proposed algorithm for different kinds of images.  In Figure 8, the ground-truth image shows that the number of pixels in the foreground is comparable to that of background. Therefore, both the Otsu algorithm and the proposed algorithm achieve acceptable results. However, the entropy-based algorithms cannot yield good results, as shown in Figure 8e,f. In Figure 9, the infrared object is tiny in comparison with the full image size. The Otsu-based algorithm failed to determine the correct results as expected, as shown in Figure 9c,d. By comparison, the infrared image may have a long-range correlation among the pixels, so the Shannon entropy-based algorithm also failed, as shown in Figure 9e. The results of Figure 9f,g are very close to the groundtruth image, which indicates that the value of the nonextensive parameter q can correctly evaluate the long-range correlation in an image. In addition, the value of q is automatically generated by maximizing Equation (27), so the new algorithm is self-adaptive. The results of Figures 10 and 12 are quite similar to that of Figure 8, since there is a large amount of noise in the background and the entropy-based algorithms are very unstable to perturbation, in spite of the increasing dimension of the histogram. However, the new algorithm can still correctly segment the images, which shows the potential application in a more general scope, including tiny object recognition (Figures 9 and 11), background noise suppression ( Figures 10 and 12), and detection of long-range correlation.
From Figure 8e to Figure 12e, we can see that the 2-D Shannon algorithm, as a wellknown entropic thresholding procedure, does not have stable outputs. However, the idea of extending the dimension of the histogram using the correlation of the neighboring pixels is still heuristic. It is of great interest to extend Equation (29) into two, or even higher, dimensions of the histogram because the development of optimization algorithms [15], refs. [19,20] can effectively reduce the computational cost.
For each image from the testing set, it should be mentioned that the new algorithm and the Tsallis entropy algorithm share the same value of q, which is determined by maximizing the information redundancy. However, the Tsallis entropy algorithm is very unstable if the image is subject to noise interference, even with a proper value of q. In comparison, the new algorithm is always stable. By comparison, Otsu algorithm is robust but cannot effectively recognize tiny objects. The new algorithm extracts the advantages of both the Otsu and entropy-based algorithms in a proper manner, and this point can be further shown using the detailed quality indices.
For 50 images in the testing set, Tables 2-5 list the above-mentioned four quality indices of the results generated by the five different algorithms, respectively. Due to the variety in the testing set, the new algorithm cannot always ensure the best performance for all images, but its results are still acceptable. Furthermore, the statistical results of Tables 2-5 clearly show the universality of the proposed algorithm for different kinds of images.    For 50 testing images, the segmented results and the corresponding ME of the different thresholding algorithms may be very different. However, the performances of these algorithms can be statistically evaluated. Figure 13 shows the average ME values of the 50 images yielded by the above-mentioned five algorithms, and Figure 14 represents the average values of RAE. As shown, the average ME value of the proposed algorithm is the lowest in comparison with those of the other algorithms. Furthermore, the variance in the ME value of the proposed algorithm is much less than those of the other algorithms. Therefore, both accuracy (lower ME value) and stability (lower variance) of the new algorithm are better than those of the algorithms, which means that this algorithm is suitable and more robust for a more general category of images. By the same analysis, we can see that the average value and variance in RAE of the new algorithm were both the lowest among all the results, which indicates that the new algorithm is better than the others in foreground area detection.  As mentioned above, the values of MHD and PSNR are not normalized. For 50 segmented results of the testing set, the distributions of MHD and PSNR are not at [0,1], but at  (0, ) . Therefore, it is possible that their variances are larger than the averages. Figure  15 shows the comparison of MHD among the five algorithms. As we can see, the average MHD of the new algorithm again achieves the lowest value, and the corresponding variance is less than that of the others. This means that the new algorithm can maintain the shape of the objects in a more correct and stable manner. Figure 16 shows the comparison results of PSNR. Unlike the other three quality indices, the larger PSNR value means a better quality of information transmission. Therefore, we can see that the new algorithm still performs better than the others in this quality index (largest PSNR value), with a bet-  As mentioned above, the values of MHD and PSNR are not normalized. For 50 segmented results of the testing set, the distributions of MHD and PSNR are not at [0,1], but at  (0, ) . Therefore, it is possible that their variances are larger than the averages. Figure  15 shows the comparison of MHD among the five algorithms. As we can see, the average MHD of the new algorithm again achieves the lowest value, and the corresponding variance is less than that of the others. This means that the new algorithm can maintain the shape of the objects in a more correct and stable manner. Figure 16 shows the comparison results of PSNR. Unlike the other three quality indices, the larger PSNR value means a better quality of information transmission. Therefore, we can see that the new algorithm still performs better than the others in this quality index (largest PSNR value), with a bet- As mentioned above, the values of MHD and PSNR are not normalized. For 50 segmented results of the testing set, the distributions of MHD and PSNR are not at [0, 1], but at (0, ∞). Therefore, it is possible that their variances are larger than the averages. Figure 15 shows the comparison of MHD among the five algorithms. As we can see, the average MHD of the new algorithm again achieves the lowest value, and the corresponding variance is less than that of the others. This means that the new algorithm can maintain the shape of the objects in a more correct and stable manner. Figure 16 shows the comparison results of PSNR. Unlike the other three quality indices, the larger PSNR value means a better quality of information transmission. Therefore, we can see that the new algorithm still performs better than the others in this quality index (largest PSNR value), with a better robustness (lowest variance).

Conclusions
In the task of computer vision, it is of great importance to explore algorithms that can correctly recognize the objects from different kinds of backgrounds in a stable way. The Otsu algorithm is based on the variance in the gray-level distribution of an image. It can yield stable thresholding results but has deficiencies in small target recognition. The entropy-based algorithms are suitable for small target extraction and can even detect the long-range correlation among pixels using a nonextensive parameter. However, the entropy-based objective functions can be easily disturbed by noise. In the present paper, based on the rigorous mathematical and numerical results, we combine the advantages of the Otsu algorithm and nonextensive entropy algorithm to develop a new algorithm that

Conclusions
In the task of computer vision, it is of great importance to explore algorithms that can correctly recognize the objects from different kinds of backgrounds in a stable way. The Otsu algorithm is based on the variance in the gray-level distribution of an image. It can yield stable thresholding results but has deficiencies in small target recognition. The entropy-based algorithms are suitable for small target extraction and can even detect the long-range correlation among pixels using a nonextensive parameter. However, the entropy-based objective functions can be easily disturbed by noise. In the present paper, based on the rigorous mathematical and numerical results, we combine the advantages of the Otsu algorithm and nonextensive entropy algorithm to develop a new algorithm that can effectively segment the objects from various kinds of background in a more stable

Conclusions
In the task of computer vision, it is of great importance to explore algorithms that can correctly recognize the objects from different kinds of backgrounds in a stable way. The Otsu algorithm is based on the variance in the gray-level distribution of an image. It can yield stable thresholding results but has deficiencies in small target recognition. The entropy-based algorithms are suitable for small target extraction and can even detect the long-range correlation among pixels using a nonextensive parameter. However, the entropybased objective functions can be easily disturbed by noise. In the present paper, based on the rigorous mathematical and numerical results, we combine the advantages of the Otsu algorithm and nonextensive entropy algorithm to develop a new algorithm that can effectively segment the objects from various kinds of background in a more stable manner. For 50 images chosen from different categories, the quality indices of ME, RAE, MHD, and PSNR were adopted to evaluate the segmentation results. In comparison with the other famous thresholding algorithms, the statistical results show that the proposed algorithm has better performance than the others in each of the four quality indices. In addition, there is no artificial intervention during the whole process. Therefore, the proposed algorithm is an approach to automatic image thresholding that has potential application in self-adaptive object recognition.