The document presents a novel multilevel global thresholding algorithm called ECH for fingerprint recognition, which addresses issues related to uneven illumination and enhances the accuracy of segmentation. The method utilizes hat transformation and entropy-based calculations to identify optimal threshold values, significantly improving performance metrics such as false acceptance and rejection ratios. Experimental results demonstrate the algorithm's effectiveness on grayscale fingerprint images compared to traditional methods.