0

I've been trying to implement the local ridge orientation for fingerprints in python. I've used the Gradient method, and using sobel operator to get the gradients I need. However it turned out that this method has quite a lot of flaws, especially around 90 degrees. I could include the code that I've done so far, but as it does not work as I want, I don't know if it's needed. I've also looked at the line segment method, however, I'm working with latent fingerprints so it is hard to know if one should look for maximum of black or white in the line segments. I've also tried to implement an algorithm to detect the area of maximum concentration of continous lines, but I couldn't get this to work. Any suggestion for other algorithms to use?

EDIT:

I'm using a function to apply my function to blocks, but that is hardly relevant

def lro(im_np):

    orientsmoothsigma = 3

    Gxx = cv2.Sobel(im_np,-1,2,0)
    Gxy = cv2.Sobel(im_np,-1,1,1)
    Gyy = cv2.Sobel(im_np,-1,0,2)


    Gxx = scipy.ndimage.filters.gaussian_filter(Gxx, orientsmoothsigma)
    Gxy = numpy.multiply(scipy.ndimage.filters.gaussian_filter(Gxy, orientsmoothsigma), 2.0)
    Gyy = scipy.ndimage.filters.gaussian_filter(Gyy, orientsmoothsigma)

    denom = numpy.sqrt(numpy.add(numpy.power(Gxy,2), (numpy.power(numpy.subtract(Gxx,Gyy),2))))# + eps;
    sin2theta = numpy.divide(Gxy,denom)            # Sine and cosine of doubled angles
    cos2theta = numpy.divide(numpy.subtract(Gxx,Gyy),denom)

    sze = math.floor(6*orientsmoothsigma);
    if not sze%2: sze = sze+1       
    cos2theta = scipy.ndimage.filters.gaussian_filter(cos2theta, orientsmoothsigma)  # Smoothed sine and cosine of
    sin2theta = scipy.ndimage.filters.gaussian_filter(sin2theta, orientsmoothsigma)#filter2(f, sin2theta); # doubled angles



    orientim = math.pi/2. + numpy.divide(numpy.arctan2(sin2theta,cos2theta),2.)

    return orientim
larstoc
  • 55
  • 1
  • 9

2 Answers2

1

I worked on this a long time ago, and wrote a paper on it. As I remember, look for both black and white ridges (invert the image and repeat the analysis) to give more results. I do remember some sensitivity at some angles. You probably need something with more extent than a pure Sobel. Try to reach out as many pixels as practical.

Jiminion
  • 5,080
  • 1
  • 31
  • 54
  • What do you do with the seperate images for black and white? superimpose on the original? Do you have any suggestions to what I could use instead of Sobel? I have only seen Sobel used for the purpose of getting the gradients, so I'm at a loss as to other methods. – larstoc Jul 23 '13 at 06:57
  • Find the directions (in black and white) and superimpose the directions together, to give a denser presentation. I can't remember the exact gradient finder. Mark an extent, keep only the foreground region that is touching the center (remove other ridges) and find angle using mini Hough or some other technique. – Jiminion Jul 23 '13 at 14:51
  • I haven't created that flow chart before. Do you know a way to plot it when I have the directions? Do I draw the lines, or can python plot the direction map for me? Sorry if this is off topic – larstoc Jul 24 '13 at 13:35
  • I would make an image of directions. Color code it, making sure the transition from 360->0 is smooth. – Jiminion Jul 24 '13 at 13:47
0

You may want to have a look at the work of Raymond Thai (Fingerprint Image Enhancement and Minutiae Extraction), if you haven't already.

Eran
  • 387,369
  • 54
  • 702
  • 768
daniel
  • 85
  • 4
  • Yeah, I based my first algorithm on his work, however, I couldn't get it to work right. Might be I was implementing it totally wrong though :S since it seems almost everyone is implmenting this method. I can add my code, if you would be so kind to give me some pointers. – larstoc Jul 22 '13 at 14:02