Comments (13)
Oh I see static final double maxAngleError = Math.toRadians(10); ... Is this the setting I need to better tolerate rotations ?
from sourceafis-java.
SourceAFIS algorithm will match fingerprints with any relative rotation. The parameter you found specifies maximum angle error in local minutia direction, which is completely unrelated to global rotation. There must be something else that is causing the drop in score. Does your sensor have the same DPI in X and Y directions? Is it big enough to produce sufficient overlap between two scans?
from sourceafis-java.
SourceAFIS algorithm will match fingerprints with any relative rotation. The parameter you found specifies maximum angle error in local minutia direction, which is completely unrelated to global rotation. There must be something else that is causing the drop in score. Does your sensor have the same DPI in X and Y directions? Is it big enough to produce sufficient overlap between two scans?
Robert, I'm gonna double-check as the templates are being generated via NIST nbis (xyt) and maybe I screwed something on the angle conversion to your own format. Is there any way to build a debug image with the image and the template set for it (even if I am forcing the template to be the one I calculated with another lib) ?
from sourceafis-java.
It's currently undocumented, but it works:
https://github.com/robertvazan/sourceafis-visualization-java
You likely need TransparencyGallery.shuffledMinutiae()
. Look at TransparencyGalleryTest
.
from sourceafis-java.
I forgot that you have imported templates, so TransparencyGallery
won't do for you.
You need something like this:
Template parsed = Template.parse(fp.toByteArray());
byte[] visualization = new TransparencyImage(parsed.size)
.image(image)
.add(TransparencyMarkers.markTemplate(parsed))
.bytes()
Then save visualization
as an SVG file.
from sourceafis-java.
Robert, I suppose when you create Template, it is a FingerprintTemplate, right ? Because I dont have that class available !
Thanks !
from sourceafis-java.
If you use the maven artifact, you will get all the dependencies:
https://search.maven.org/artifact/com.machinezoo.sourceafis/sourceafis-visualization/0.4.1/jar
from sourceafis-java.
I do already have a FingerprintTemplate object (i.e. a string containing {"version": "3.8.1", "minutiae": [{"x": 58, "y": 241, "direction": 3.9269908169872414, "type": "bifurcation"}, {"x": .....) which I built this way:
def __get_vendor_minutiae(self, rec):
# we must convert our minutia object to SourceAFIS format which is json
print('_get_vendor_minutiae')
obj = {'version':'3.8.1', 'minutiae':[]}
minutiae = rec['minutiae']
for m in minutiae:
minutia = {}
minutia['x'] = m['x']
minutia['y'] = m['y']
minutia['direction'] = (m['a']/360.)*2*math.pi
minutia['type'] = 'bifurcation' if m['t']==0 else 'ending'
obj['minutiae'].append(minutia)
json_obj = json.dumps(obj)
s = gzip.compress(json_obj.encode('utf-8'))
template = FingerprintTemplate(s)
return template
(btw I am using SourceAfis from Python via jpype).
Unfortunately it doesnt have a size attribute. Is Template a similar type as FingerprintTemplate or do I have to create a Template bu doing the same I did for FingerprintTemplate (i.e. append minutia then json.dump then gzip) ?
Thank you !
from sourceafis-java.
Image size is informative. You can leave it zeroed.
from sourceafis-java.
Ok I think I got a result, I got something saved on disk with an svg:
<svg version="1.1" viewBox="-0.0 -0.0 0.0 0.0" xmlns="http://www.w3.org/2000/svg"><image width="0.0" height="0.0" href="data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAAQABAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDA...... ...... ....... LexuYZtFLcRs52Kv0PINezwQR20KRRII40GFUdAKcEAJIzycmgCu+m20t0l08Km4Vdu/HOPQ+tWulNYEgYO3mnUAIBimrHsJIJwT0PQfSnEjIBHJ6cUtADCWLjGAB97I6/Sn0UUAFFJnmloAKarbiRg8HGTTqKACiiigD//2Q=="/><g transform="translate(38.5 294.5) rotate(213.0)"><circle cx="0.0" cy="0.0" r="3.5" fill="none" stroke="green"/><line x1="3.5" y1="0.0" x2="10.0" y2="0.0" stroke="green"/></g><g transform="translate(46.5 273.5) rotate(213.0)"><circle cx="0.0" cy="0.0" r="3.5" fill="none" stroke="green"/><line x1="3.5" y1="0.0" x2="10.0" y2="0.0" stroke="green"/></g> ....... ........ ........ <g transform="translate(266.5 330.5) rotate(304.00000000000006)"><circle cx="0.0" cy="0.0" r="3.5" fill="none" stroke="blue"/><line x1="3.5" y1="0.0" x2="10.0" y2="0.0" stroke="blue"/></g></svg>
I'm trying to view the svg from many tools here with no luck, nor Chrome nor Linux Mint image viewer nor anything does open it. Bizarre !
from sourceafis-java.
Aha. Image size is optional for matching, but it will screw up visualization... Give the template some estimated size if you don't know the real image size.
from sourceafis-java.
Cool I finally could dump it ! It is pretty weird:
https://pasteboard.co/IM7qjTi.png
I dont get why it got so screwed. Maybe some endianness error (like image upside down) ?
from sourceafis-java.
Minutia positions are right. You have got angles wrong. Check your conversion code.
from sourceafis-java.
Related Issues (20)
- erro toByteArray() HOT 1
- Core and Delta detection HOT 2
- Different scores when interchanging probe and candidate for matching (color fingerprint photos) HOT 1
- Do we really need to check pixel buffer size? HOT 1
- very long response time HOT 2
- Segmentation of multi-finger images HOT 2
- When I try and build the code in netbeans I get the following error HOT 10
- Matching Speed HOT 3
- Sample code to enroll and match two fingerprints HOT 4
- Camera input HOT 4
- Java Android - Error during APK Build HOT 4
- Not getting score above 10 by using FingerprintMatcher HOT 3
- Am GEtting my image from a url how possible to match?? HOT 3
- SourceAFIS 3.16.1 Error HOT 1
- What type of algorithm is used? HOT 1
- Compress fingerprint in smartcard HOT 1
- Compare 2 differents fingerprints with different size from different device HOT 5
- Fingerprint deduplication HOT 3
- Android Proguard Rules HOT 1
- Excess ram usages when storing FingerprintTemplate in java hashmap Cache HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sourceafis-java.