<div dir="ltr">Hi Timo,<div><br></div><div>I'll only be able to test closer to the end of next week... Although I'm not sure I understand what you mean by "same region" here. Will it work if the images have , say, 70% overlap? Because we can't expect users to scan the very same area all the time. </div></div><br><div class="gmail_quote"><div dir="ltr">On Sat, Feb 10, 2018 at 11:12 PM TeEmZe <<a href="mailto:timo@teemze.de">timo@teemze.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="en-DE" link="blue" vlink="purple"><div class="m_-9223002876562354767WordSection1"><p class="MsoNormal"><span lang="EN-GB">Hi,<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-GB">I fixed the issue with differently sized images and managed to test it with another fingerprint, which shouldn’t match, and got 48%. This is good, as it means that it didn’t match. <u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-GB">I think the algorithm is at a state, at which testing is required – all that’s left to do is some parameter optimizing, and those might already be optimized enough for the real world.<br>Ok, that might not be 100%  true, as the image still has to be from the same region of the fingerprint, but this could be solved by taking multiple images at the enrol process and check all enrolled images for a match.<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-GB">So I’d be happy if some people could test it so that we can soon implement the algorithm into the actual tool.<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-GB">Kind regards<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-GB">Timo<u></u><u></u></span></p><p class="MsoNormal"><span lang="en-DE"><u></u> <u></u></span></p><div><div style="border:none;border-top:solid #e1e1e1 1.0pt;padding:3.0pt 0cm 0cm 0cm"><p class="MsoNormal"><b><span lang="EN-US">From:</span></b><span lang="EN-US"> fprint [mailto:<a href="mailto:fprint-bounces@lists.freedesktop.org" target="_blank">fprint-bounces@lists.freedesktop.org</a>] <b>On Behalf Of </b>TeEmZe<br><b>Sent:</b> Friday, 9 February 2018 23:48<br><b>To:</b> 'Igor Filatov' <<a href="mailto:ia.filatov@gmail.com" target="_blank">ia.filatov@gmail.com</a>>; <a href="mailto:fprint@lists.freedesktop.org" target="_blank">fprint@lists.freedesktop.org</a></span></p></div></div></div></div><div lang="en-DE" link="blue" vlink="purple"><div class="m_-9223002876562354767WordSection1"><div><div style="border:none;border-top:solid #e1e1e1 1.0pt;padding:3.0pt 0cm 0cm 0cm"><p class="MsoNormal"><span lang="EN-US"><br><b>Subject:</b> Re: [fprint] elan patch + poc 0x903 and 0x0C03<u></u><u></u></span></p></div></div></div></div><div lang="en-DE" link="blue" vlink="purple"><div class="m_-9223002876562354767WordSection1"><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><span lang="EN-GB">Hi Igor,<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-GB">I implemented the basis of an algorithm – you can take a look at it <a href="https://github.com/MetaColon/Libfprint/tree/master/Algorithm" target="_blank">here</a>.<br>It is however far from finished or even optimised and is in need of some testing.<br>I however don’t currently have the possibility to test it, so I’m asking you whether you could test it and maybe take a look at the todos written as comments in the source code.<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-GB">I had one image to test it with, and the result was 75%, which is good, as the paper I used as a reference said that it’s a match as soon as the percentage is above 70%.<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-GB">Kind regards<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-GB">Timo<u></u><u></u></span></p><p class="MsoNormal"><span lang="en-DE"><u></u> <u></u></span></p><p class="MsoNormal"><b><span lang="EN-US">From:</span></b><span lang="EN-US"> fprint [<a href="mailto:fprint-bounces@lists.freedesktop.org" target="_blank">mailto:fprint-bounces@lists.freedesktop.org</a>] <b>On Behalf Of </b>Igor Filatov<br><b>Sent:</b> Friday, 9 February 2018 20:43<br><b>To:</b> <a href="mailto:fprint@lists.freedesktop.org" target="_blank">fprint@lists.freedesktop.org</a><br><b>Subject:</b> Re: [fprint] elan patch + poc 0x903 and 0x0C03<u></u><u></u></span></p><p class="MsoNormal"><span lang="en-DE"><u></u> <u></u></span></p><div><p class="MsoNormal"><span lang="en-DE">Hi Timo,<u></u><u></u></span></p><div><p class="MsoNormal"><span lang="en-DE"><u></u> <u></u></span></p></div><div><p class="MsoNormal"><span lang="en-DE">I've noticed this when working on the initial implementation - that rows at bottom and top are bad (and I've seen a number of scans sent by different people - it's never on the sides for some reason). That's why there was the frame_margin param which means "cut this many px from top and bottom". Actually, in recent commits this has changed and it just crops the frame to max 50px by height. Since assembly doesn't really work for frames higher than that.<u></u><u></u></span></p></div><div><p class="MsoNormal"><span lang="en-DE"><u></u> <u></u></span></p></div><div><p class="MsoNormal"><span lang="en-DE">But ultimately libfprint needs a different algo for small sensors. No getting around it. Telling people they need to swipe even though they see have a touch sensor isn't feasible and seems to already be failing in practice. I've trained myself to swipe reliably but still... don't want to spoil my karma with a driver that pretends to work but is hardly usable.<u></u><u></u></span></p></div><div><div><p class="MsoNormal"><span lang="en-DE"><u></u> <u></u></span></p></div><div><p class="MsoNormal"><span lang="en-DE"> <u></u><u></u></span></p></div><blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt"><div><blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt"><div><div><p class="MsoNormal"><span lang="EN-GB">Hi,</span><span lang="en-DE"><u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-GB"> </span><span lang="en-DE"><u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-GB"> </span><span lang="en-DE"><u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-GB">I might actually have another solution. </span><span lang="en-DE"><u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-GB">The fingerprint images, that are created by the swiping, are assembled out of multiple images, the reader got, right?<br>I now realized that each of those images seems to have about one or two rows of pixels at the top and at the bottom, which are simply black.<br>Those rows alter the image, so that similar fingers aren’t matching, as the rows are at different positions in the image if the finger was moved with a different speed – which is always the case.<br>So I think we should try changing the way we generate the image with the swipe movement by cropping each image, of which the final image is assembled, by two pixels at the top and the bottom.<br>I don’t know whether this solves all problems, but I can at imagine that it’d at least improve it.<br>I am however still working on an alternative algorithm, which uses cross correlation of field orientation, but I can imagine that this won’t be necessary anymore.</span><span lang="en-DE"><u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-GB"> </span><span lang="en-DE"><u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-GB">I don’t know the way you’re currently assembling the joined fingerprint image, so maybe someone who does could give this a try?<br>I’ll be happy to test it afterwards.</span><span lang="en-DE"><u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-GB"> </span><span lang="en-DE"><u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-GB"> </span><span lang="en-DE"><u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-GB">Kind regards</span><span lang="en-DE"><u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-GB"> </span><span lang="en-DE"><u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-GB">Timo</span><span lang="en-DE"><u></u><u></u></span></p><p class="MsoNormal"><span lang="en-DE"> <u></u><u></u></span></p><div><div style="border:none;border-top:solid #e1e1e1 1.0pt;padding:3.0pt 0cm 0cm 0cm"><p class="MsoNormal"><b><span lang="EN-US">From:</span></b><span lang="EN-US"> fprint [mailto:<a href="mailto:fprint-bounces@lists.freedesktop.org" target="_blank">fprint-bounces@lists.freedesktop.org</a>] <b>On Behalf Of </b>wp12880529-timo wp12880529-timo<br><b>Sent:</b> Friday, 9 February 2018 03:30<br><b>To:</b> Hans de Goede <<a href="mailto:hdegoede@redhat.com" target="_blank">hdegoede@redhat.com</a>>; Sebastien Bechet <<a href="mailto:sebastien.bechet@osinix.com" target="_blank">sebastien.bechet@osinix.com</a>>; Igor Filatov <<a href="mailto:ia.filatov@gmail.com" target="_blank">ia.filatov@gmail.com</a>><br><b>Cc:</b> <a href="mailto:fprint@lists.freedesktop.org" target="_blank">fprint@lists.freedesktop.org</a></span><span lang="en-DE"><u></u><u></u></span></p></div></div></div></div><div><div><div><div style="border:none;border-top:solid #e1e1e1 1.0pt;padding:3.0pt 0cm 0cm 0cm"><p class="MsoNormal"><span lang="EN-US"><br><b>Subject:</b> Re: [fprint] elan patch + poc 0x903 and 0x0C03</span><span lang="en-DE"><u></u><u></u></span></p></div></div></div></div><div><div><p class="MsoNormal"><span lang="en-DE"> <u></u><u></u></span></p><p><span lang="en-DE">Hi Igor,<u></u><u></u></span></p><p><span lang="en-DE"> <u></u><u></u></span></p><p><span lang="en-DE">I tried the new version, which doesn't seem to work significantly better - it detects about 50% of the tries. I think the best solution will be another algorithm, which I'm currently working on.<u></u><u></u></span></p><p><span lang="en-DE"> <u></u><u></u></span></p><p><span lang="en-DE">Kind regards<u></u><u></u></span></p><p><span lang="en-DE"> <u></u><u></u></span></p><p><span lang="en-DE">Timo<u></u><u></u></span></p><blockquote style="margin-top:5.0pt;margin-bottom:5.0pt"><p class="MsoNormal" style="margin-bottom:12.0pt"><span lang="en-DE">Igor Filatov <<a href="mailto:ia.filatov@gmail.com" target="_blank">ia.filatov@gmail.com</a>> hat am 4. Februar 2018 um 16:07 geschrieben: <u></u><u></u></span></p><div><p class="MsoNormal"><span lang="en-DE">Hi everybody,<u></u><u></u></span></p><div><p class="MsoNormal"><span lang="en-DE"> <u></u><u></u></span></p></div><div><p class="MsoNormal"><span lang="en-DE">Base on the new info I got I've updated the driver in a few places:<u></u><u></u></span></p></div><div><p class="MsoNormal"><span lang="en-DE"> <u></u><u></u></span></p></div><div><p class="MsoNormal"><span lang="en-DE">1. Frames are cropped to 30px by height. I've received some examples of images from 96px readers and it seems that the assembling procedure just doesn't work for frames of greater height. I _think_ this is largely because the skin stretches and deforms in a non-uniform way when you swipe. E.g. the same part of the print is slightly different when it's near the bottom of the frame than when it's near the top. Plus, there often seem to be sensor artifacts near the edges, so.<u></u><u></u></span></p></div><div><p class="MsoNormal"><span lang="en-DE"> <u></u><u></u></span></p></div><div><p class="MsoNormal"><span lang="en-DE">2. Sensor reset is out. Devices do it when they power up. I'm not entirely sure that it's absolutely not needed, though. I'm thinking about suspend & resume, for one. But anyway, I've used my reader for long without any reset and I'm suspending all the time and I haven't had any problems because of it.<u></u><u></u></span></p></div><div><p class="MsoNormal"><span lang="en-DE"> <u></u><u></u></span></p></div><div><p class="MsoNormal"><span lang="en-DE">3. Some changes around calibration. You can get a calibration status of 0x01 (ongoing) and 0x03 (completed) from the device. But I've noticed that very often the first response I get is 0x03, which later (~100 ms) changes to 0x01, then back to 0x03. So now to make sure it actually completes, the driver first wants to see 0x01 at least once and then it waits for 0x03.<u></u><u></u></span></p></div><div><p class="MsoNormal"><span lang="en-DE"> <u></u><u></u></span></p></div><div><p class="MsoNormal"><span lang="en-DE">4. KT has recommended a different frame extraction algo. First we subtract the background which we got during calibration. This helps quite significantly. Then we split values into 3 groups and apply a different transformation to each group (see comments for detail). And this seems to give slightly worse results on my reader than simple linear scaling like there was before. So I've left both methods and it's possible to configure the method for each device. YMMV.<u></u><u></u></span></p></div><div><p class="MsoNormal"><span lang="en-DE"> <u></u><u></u></span></p></div><div><p class="MsoNormal"><span lang="en-DE">Please see if it now works better/same/worse for you. I think verification is now slightly better on my device but I need to use it for a couple of days to know.<u></u><u></u></span></p></div><p class="MsoNormal"><span lang="en-DE"><u></u> <u></u></span></p></div></blockquote></div></div></blockquote></div></blockquote></div></div></div></div></blockquote></div>