Segmentation and Enhancement of Latent Fingerprints: A Coarse to Fine Ridge Structure Dictionary