One of the major issues in verification of fingerprints is the lack of robustness against image-quality degradation. Poor-quality images result in spurious features, thus degrading the performance of the overall system. Due to this, it proposes a fingerprint recognition system with enhancement of image ridges and also optimization of dataset by ANN. The objective of the proposed system is to enhance the biometric recognition frameworks, by adding liveness assessment in a fast and user-friendly manner through the use of image quality assessment. To remedy the ridge areas and enhance the contrast of the local ridges, we first enhance the fingerprint image in the spatial domain. Experimental results show that our proposed algorithm is able to handle various types of input image contexts and achieves better results in terms of BER and PSNR value.