This paper presents a dictionary-based algorithm for automatic segmentation and enhancement of latent fingerprints to improve identification accuracy, particularly in challenging scenarios with background noise and poor ridge quality. The proposed method utilizes a coarse to fine strategy with total variation decomposition to enhance latent images, yielding significant improvements over existing algorithms and boosting performance in comparison to state-of-the-art fingerprint matchers. The ultimate aim is to achieve a 'lights-out' identification system that reduces manual intervention in latent fingerprint examination.