-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
eFSA80SC support #1
Comments
For me to help understanding the authentification procedure:
I have read that you need to swipe your finger across the sensor to make it work. In Windows that is not necessary and I am wondering if there might be a way to also achieve this in Linux. |
These sensors don't have any on-chip matching, so I use the libfprint builtin fingerprint matching. The big downside to that is that it's based on code that was designed primarily for much larger images, so the tiny 80x80 ones we get don't really have enough features, so I've been using the slide stitching code to emulate having a larger image. There are a few upstream issues in libfprint about trying to make touch-only sensors work too. |
see here: I took a look at the output and it does not look as satisfying as what we get from your Python script. I guess the width of libprintf is at least 128 pixels. We have only 80, so the rest is white. But vertically, there it is somehow smudged. Need to take a look ... |
Wow, nice! I'm probably not going to end up merging this since I'm planning on rewriting the driver with some upstream additions, but this looks good. The image should have a bit of white padding since I'm doing slide-style stitching, and so it needs some space to account for horizontal deviation. If you're properly swiping your finger along the sensor you should be getting a reasonably sharp (with usually a bit of smudging at the top) tall-but-skinny image. You may have to remove the vertical flip in |
Makes sense. I guess I will have to dig deeper into this. But this will take time, good that I am on holidays. ;) The idea is to generate a full fingerprint for enrolling from a lot of consecutive readings and merging. Maybe even do that manual at first (I mean you usually have to do it only once). Then for verification only read a single frame and fit it to you enrolled finger. If it does not fit it would be a fail and a pass in case of a good fit. |
I mean, that should be what it's doing, at least vertically. In theory every time it takes a single "frame" (from libfprint's point of view) it should be giving a long vertical slice, and then libfprint matches those vertical slices against each other using minutiae. |
Alright, the new driver is theoretically working, update: the upstream nonsense has been resolved, you can now just use the new code on |
I think the "patch" is the driver thinking that image has a finger in it when it clearly doesn't (or at least not the part that gets cropped for stitching). I pushed some new changes that should fix that. When you say "it works", you mean you can enroll/verify, right? |
The image is better now, but still not perfect (see attached image). |
Hmm, well at least now it's picking images that actually have fingers in them. I pushed another change that should normalize partial images better, so the top has the right contrast and gets merged better. Maybe these sensors just need some more debounce though... |
Currently trying your implementation. Some remarks (some of which are also true for the implementation I did based on your previous branch):
|
OK. So it turned out to be my delay was causing the single line "rip". Well, another workaround could be to set max_frames to a higher value (already had it at 50). Guess I would need 100. Maybe there is another spot where I can put the delay... "deactivating image device while it is not idle, this should not happen": might be a conflict with nr_enroll_stages? It always happens after the fifth go. Interestingly, it still successfully enrolles+verifies anyway... Yup: Somehow conflicts with |
|
Thanks for the response. :) Also, I made quite some digging into openCV and made some progess on matching a single read within a full finger as a replacement/extension for the minutiae matching in libfprint. Still not done yet ... |
Cool. If you do make any progress on a better fingerprint matching system you might want to consider contributing it upstream into libfprint as a whole. There's been some prior work on the subject in https://gitlab.freedesktop.org/libfprint/libfprint/-/issues/272 and https://gitlab.freedesktop.org/libfprint/libfprint/-/issues/271 There's also a publicly available fingerprint dataset that was mentioned in https://gitlab.freedesktop.org/libfprint/libfprint/-/merge_requests/198. |
Alright I've pushed some more code that should do some delaying to reduce the number of frames being taken as well as properly get rid of duplicate frames. @Aiiaiiio if you could test it again at some point that'd be great @DupiDachs in theory it should also now be rotating by 90 degrees for your sensor |
No, those images look pretty good as-is (even with the annoying blobs at the top of the image, there's now enough actual finger that the minutiae detector should just discard those bits). Could you attach the output (not the images, just the stdout) of verify-ing with both a finger you enrolled and one you didn't? I'm curious as to how much libfprint thinks they match (and also I want to make sure I won't need to lower the finger match (bz3) threshold for the smaller sensors) |
Thanks for the update, I gave it a go. Code is looking better, but the merge was annoying with all these formatting changes (CLANG?). ;)
I took another look at the code and I think you do not have to do the 180° rotation for each frame. You can use the FPI_IMAGE_V_FLIPPED. Take a look at "fpi-assembling.c", routine "fpi_do_movement_estimation". In there, it stitches the image either bottom up or top down. So in the end, it should be OK to just flip it with the flag. Maybe my reasoning is off? Tried it with both 90° left and right - getting the same working result (but rotated). |
Your logic is sound, but you're forgetting that I'm cropping the full image (which improves stitching since you get less false overlaps too far down the image if the finger is highly selfsimilar) so that still needs to know what way up the sensor is. (also the format stuff is because upstream libfprint wants it that way) |
I was going to give you the outputs you requested, but something happened, now I can't get a match. I pulled your latest commit (elanspi: more agressive fp detect constants).The verify image is a bit messy, but I think a match should be possible regardless. |
Hmm, perhaps I made them too aggressive. The logs would still be useful, though. |
Here's the output of a failed verification. Please tell me if you need anything else! |
The output looks ok, maybe the image it's trying to match against is just bad. You could try removing |
With the new implementation, you scale the image factor two. What is the reason for this? |
Makes the minutiae detector not remove as many potential features |
Hmm, the only reason I can imagine for it being crooked is too much horizontal motion while you were swiping during enroll. |
I finally have a working prototype in python for fingerprint matching based on akaze feature matching in openCV (so no minutiae) and the binarization coming from libprintf. Also, I now set up libprintf (meson) to compile with openCV and at least a stub for a simple openCV test. Next step is to clean up and put it to github. Any suggestions welcome after that. :) |
OK. It is done. celebrate https://github.com/DupiDachs/libfprint/tree/featureMatch |
Looks really nice! Although I doubt it'll be merged in its current state (with the whole manual enroll/merging thing), it looks like an excellent approach for matching. Have you tried testing it with any other datasets to get an idea of the false positive/negative rate? |
Yes, I agree. Without a proper enrolling procedure it is really annoying and does not make sense to merge with master. Took a lot of time just to do that. I guess I could program something for the enrolling based in openCV - but I rather enjoy the current state for now on my machine. :D |
add the new impl from mincrmatt12/elan-spi-fingerprint#2
The text was updated successfully, but these errors were encountered: