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