Skip to content

WSQ image dimensions #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

Open
Edza opened this issue Feb 19, 2020 · 8 comments
Open

WSQ image dimensions #1

Edza opened this issue Feb 19, 2020 · 8 comments
Assignees
Labels
enhancement New feature or request

Comments

@Edza
Copy link

Edza commented Feb 19, 2020

Hi,

Noticed this comment:
// :TODO: should be determined automatically from WSQ image
const getHorizontalScanningLine = (): string => '500';
// :TODO: should be determined automatically from WSQ image
const getVerticalScanningLine = (): string => '750';

What way would you recommend to implement this?

@ivosh ivosh changed the title Horizontal, vertical fingerprint lines WSQ image dimensions Feb 19, 2020
@ivosh
Copy link
Owner

ivosh commented Feb 19, 2020

I have a solution for this somewhere. Let me dig it out in the next couple of days.
Feel free to ping if there is no response in 2 weeks.

@ivosh ivosh added the enhancement New feature or request label Feb 19, 2020
@ivosh ivosh self-assigned this Feb 19, 2020
@Edza
Copy link
Author

Edza commented Feb 20, 2020

Great! Thanks

@Edza
Copy link
Author

Edza commented Feb 25, 2020

Looks like .wsq files have dimensions encoded in them:

PIX_WIDTH 320
PIX_HEIGHT 480
PIX_DEPTH 8
PPI 500
LOSSY 1
COLORSPACE GRAY
COMPRESSION WSQ

Maybe a simple extraction would be with regex?

@ivosh
Copy link
Owner

ivosh commented Feb 27, 2020

I have pushed the initial image header detection stuff in version 0.5.0 (4fd18c9).

I still need to work on integrating this into NistEncodeOptions and examples.

@Edza
Copy link
Author

Edza commented Mar 2, 2020

I tried to search for the WSQ spec and did not find if PIX_WIDTH and HEIGHT are mandatory in WSQ files. There was a mention of a WSQ meta file... is there any specification that you are using?

@ivosh
Copy link
Owner

ivosh commented Mar 2, 2020

WSQ specification goes under the following name WSQ GRAY-SCALE FINGERPRINT IMAGE COMPRESSION SPECIFICATION. Googling it up leads for example here: https://www.fbibiospecs.cjis.gov/Document/Get?fileName=WSQ_Gray-scale_Specification_Version_3_1_Final.pdf

However PIX_WIDTH and others you were referring to form a part of specially formatted comment block called NISTCOM. I don't have any authoritative source for it, but have a look for example here: https://nvlpubs.nist.gov/nistpubs/Legacy/IR/nistir6813.pdf

@Edza
Copy link
Author

Edza commented Mar 26, 2020

Could you please share the width/height calculating code?

@ivosh
Copy link
Owner

ivosh commented Apr 2, 2020

The code is already here: https://github.com/ivosh/node-nist/blob/master/src/imageHeader.ts

Unfortunately I did not have time to update tests, examples and README to use it.

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

No branches or pull requests

2 participants