Skip to content
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

Issue with image decoding #35

Closed
gytis-ivaskevicius opened this issue Mar 11, 2022 · 2 comments
Closed

Issue with image decoding #35

gytis-ivaskevicius opened this issue Mar 11, 2022 · 2 comments

Comments

@gytis-ivaskevicius
Copy link

When decoding some of the NIST files it crashes with exception as such:

java.lang.RuntimeException: ERROR : getCMarkerWSQ : No SOI marker : 0
	at org.jnbis.internal.WsqDecoder.getCMarkerWSQ(WsqDecoder.java:85)
	at org.jnbis.internal.WsqDecoder.decode(WsqDecoder.java:19)
	at org.jnbis.api.handler.WsqHandler.decode(WsqHandler.java:71)
	...

Flow is something along the lines of this:

for (VariableResolutionLatentImage fingerprintImage : nist.getVariableResLatentImages()) {
      var xyz = Jnbis.wsq()
           .decode(fingerprintImage.getImageData())  // Throws an exception
           .toJpg()
           .asByteArray();
}

This viewer seems to be able to parse them just fine, not sure if it helps but it says Record Type 13 next to the image

Tested with versions 2.1.2 and 1.2.1

@ThanasisMpogatinis
Copy link

A bit late, but this is probably because some of your .nist files are not compressed with WSQ. (maybe JP2?) I thing the library does not support JP2 compressed files. Correct me if I'm wrong.

@gytis-ivaskevicius
Copy link
Author

might be the case, i dont remember how I ended up working around it and I'm no longer working on that project thus I'm I'm closing this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants