Many thanks for your time and comments emexes. In answer to your interest - we're a small South African software company and one of our clients is a specialist Courier delivering Bank cards, Mobile phone SimCards and official Id documents etc. that sometimes (by law) need very tight identity verification. The way it is done and what one is allowed to hold etc., are also very strictly legislated. The WSQ format is one of the requirements for those instances where they are required to verify a consignee by fingerprint.I'm thinking that the tsunami of replies indicates: perhaps not.
I did find this Android app, though:
https://play.google.com/store/apps/details?id=com.cognaxon.WSQ_viewer
via that the same company produces a Windows SDK for converting to/from the format, so perhaps they have a Java SDK hidden somewhere too.
My original thinking was that my usual image catalog/view program that I've used for 15 years (ThumbsPlus) does everything I need, but it's so good that I haven't updated for ages, and it looks like the current version doesn't support WSQ anyway, so... nice try, no cigar.
Then I looked at www.irfanview.com (is free) and their website there is a WSQ plugin available "WSQ - (version 2008.12.16): allows IrfanView to WSQ (Wavelet Scaler Quantization) files" and so you might be able to track something down via that.
I also found https://www.xnview.com/en/xnconvert/ that advertises SDKs for Windows, Mac and Linux, and so that guy might be up for creating an Android version too.
But... why do you need it? Are you exchanging files with the FBI, or are you just using it because that's the standard that they use. Because WSQ is just an 8-bit grayscale with (minimally) lossy compression, and given today's larger storage options compared to the 1990's, PNG would be be a much more convenient, flexible and widely-supported format (and lossless to boot, albeit larger).
a paid one for $250 or soso perhaps they have a Java SDK hidden somewhere too.
you may want to check https://github.com/kareez/jnbiswe're a small South African software company and one of our clients
Now, ignoring the typo where the guy writes megabits when he means megabytes, let's take the rest as being gospel. Yeah, three hours would be a heck of a long time to wait for a card to come through online. WSQ compression is about 15:1 (= 12 minutes @ 9600 baud) vs lossless compression at 2:1 (= 90 minutes at 2:1) so, back then, WSQ was the obvious winner. But today... that 5 MB lossless (ie, better and even less likely to contain visual artifacts) PNG file takes me 5 seconds or less to receive on my phone, so... unless there is some massively-behind-the-times legislation stipulating that WSQ MUST BE USED then I will happily argue on your behalf that PNG is better in all respects for the application, if storage space is measured in cents rather than bits. If resistance to alteration is an issue, then stamp it with (say) 512 bit SHA-3, and if you can do undetectable alterations to that where equivalent alterations cannot be done to WSQ, then I will cheerfully agree that I am wrong. Until that happens, though, I'll be sleeping easy at night ;-)"When a typical fingerprint card is scanned at 500 dpi, with 8 bits/pixel, it results in about 10Mb of data. For 200 million cards, the total size of the digitized collection would be more than 2000 terabytes .Finger print images are routinely sent between law enforcement agencies. Overnight delivery of the actual card is too slow and risky, and sending 10 Mb of data through a 9600 baud modem takes about three hours. Compression is, therefore, a must. At first, it seems that fingerprint compression must be lossless because of the small but important details involved. However, lossless compression methods produce typical compression ratios of 0.5. Most lossy image compression methods involve the loss of small details and are therefore unacceptable. This is where wavelets come into the picture."
so if PNG is good enough for our friendly Indian government officials (whom I understand to be the undisputed masters of bureaucracy ;-) then surely it's good enough for the rest of us in the real world where stuff needs to get done.5.4.3.1 For Normal Memory Devices
The fingerprint image captured during the enrolment process should be transmitted in lossless format (RAW, PNG or Lossless JPEG2000 ) from client system to the server for storage / archival in the standardized format for future usage.
Well, here's a curious coincidence - the distraction before was that I had to deliver my teenage son and his new girlfriend back to her home and parents, and they're from... guess where?!?! (just in case your morning caffeine is yet to kick in, the answer is: South Africa)we're a small South African software company
Perhaps it might be worth checking whether your local bureaucrats are keeping up with the Indians. I have plenty of people in my life telling me this, that and the other, like say, can you leave a child alone at home or in a car, and I often find there is mismatch between what I am told the legislation says, and what it actually says.very strictly legislated. The WSQ format is one of the requirements
Based ona paid one for $250 or so
http://www.cognaxon.com/index.php?page=wsqlibrary_forwin64
a short trying from Android.I would start trying with the free lib i posted above.
File.Copy(File.DirAssets,"sample_image.wsq",File.DirInternal,"sample_image.wsq")
nativeMe.InitializeContext
Dim jo As JavaObject
jo.InitializeStatic("org.jnbis.api.Jnbis").RunMethodJO("wsq",Null).RunMethodJO("decode",Array(File.Combine(File.DirInternal,"sample_image.wsq"))).RunMethodJO("toPng",Array()).RunMethodJO("asFile",Array(File.Combine(File.DirInternal,"sample_image.png")))
They do provide the lib in many formats. The price of around $US 250 seems to be ok for such a security Library.Based on
http://www.cognaxon.com/index.php?page=download_wsqlibrary
i can see that they do provide the Lib in many formats. Even one which can be used in Android. For B4A it needs to have a wrapper written for though.
I realise we're somewhat adrift from your original quest for an Android library, but... if the fingerprints are already being shuffled about the internet, what's one more webservice between friends?!The NIST Biometric Image Software ... ; it is freely distributed with no licensing requirements; and it is considered public domain.
The NBIS utilities fall under eight general categories:
A reference implementation of the ANSI/NIST-ITL 1-2007 (AN2K) "Data Format for the Interchange of Fingerprint, Facial, Scar Mark & Tattoo (SMT) Information" standard is included. This reference implementation contains a suite of utilities designed to read, write, edit, and manipulate files formatted according to this interchange standard.
...
Source code is provided for Baseline JPEG, Lossless JPEG, and the FBI's Wavelet Scalar Quantization (WSQ) encoders and decoders.