Open Edza opened 4 years ago
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.
Great! Thanks
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?
I have pushed the initial image header detection stuff in version 0.5.0 (https://github.com/ivosh/node-nist/commit/4fd18c90de194f6c025e683b48d4ada5b1cd4bc4).
I still need to work on integrating this into NistEncodeOptions
and examples.
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?
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
Could you please share the width/height calculating code?
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.
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?