"WSQ image library" for Texas Instruments family microprocessors (embedded systems) (version 1.0)


WSQ image library adds the power of WSQ (FBI's Wavelet Scalar Quantization) file format to your Texas Instruments family microprocessor (embedded system) software projects using only a few lines of code.

Windows 32-bit version of WSQ image library is available here.
Windows 64-bit version of WSQ image library is available here.
Linux 32-bit version of WSQ image library is available here.
Linux 64-bit version of WSQ image library is available here.
Android version of WSQ image library is available here.
Windows CE/Windows Mobile/Pocket PC version of WSQ image library is available here.

Importance of WSQ format

Electronic fingerprints submitted to the FBI either through Integrated Automated Fingerprint Identification System (IAFIS), or Electronic Fingerprint Image Print System (EFIPS) may not be compressed with any technique other than WSQ.

Price of WSQ image library

Ask for price.
Linux 32-bit, Linux 64-bit, Windows 32-bit, Windows 64-bit, Windows CE/Windows Mobile/Pocket PC, and Android versions of WSQ Image Library are considered separate products and each has its own pricing.
To order WSQ image library please click here

WSQ image library specifications

Table 1 Format of WSQ image library

Feature Format
Microprocessor family Texas Instruments TMS320C672x
Library format Library (*.lib)
Format of exported functions C language
Internal engine C
Size of library 2.4 Megabytes

Table 2 Functions available in the library

Function Description
int WSQ_decode_stream(unsigned char *input_data_stream, const int input_stream_length, unsigned char **output_data_stream, int *width, int *height, int *ppi, unsigned char **comment_text)Decodes memory stream (memory block) from WSQ format into uncompressed format. Returns 1 if successful, or error code otherwise.
int WSQ_encode_stream(unsigned char *input_data_stream, const int width, const int height, const double bitrate, const int ppi, char *comment_text, unsigned char **output_data_stream, int *output_stream_length)Encodes memory stream (memory block) from uncompressed format into WSQ format. Returns 1 if successful, or error code otherwise.

Figure 1 Screenshot of Texas Instruments Code Composer Studio 3.3 running simulation of TMS320C67xx microprocessor executing WSQ image decompression.

WSQ format description

In the USA, fingerprints have traditionally been collected on cards, each card containing the inked impressions of all ten fingers. The U.S. Federal Bureau of Investigation's fingerprint database began in 1924 with a cataloged collection of 810,188 cards. By the start of World War II, this collection had grown to over 10 million cards, and by 1946 had reached over 100 million cards.

In 1995 this collection was contained on over 200 million cards stored in filing cabinets occupying one acre of floor space in the J. Edgar Hoover building in Washington D.C. and archive size was increasing at the rate of 30,000 to 50,000 new cards per day. Digitization of fingerprint cards seemed to be the most obvious choice and the project named FBI's Integrated Automated Fingerprint Identification System (IAFIS) was started to cope with the design and implementation of a national standard for collecting, encoding, storing, and retrieving digitized fingerprint images. According to the FBI standard fingerprints are stored as 8-bit grayscale images. Each fingerprint card, when digitized at 500 dpi requires about 10 Mbytes of storage. The FBI's entire collection would therefore consume two petabytes (2,000,000,000 megabytes) of electronic storage space.

The need for an effective compression technique was then very urgent. Unfortunately, neither the well-known lossless methods nor the JPEG methods were found to be satisfactory. Most lossy compression methods, such as JPEG, discard the smallest (highest frequency) details in images, and at higher compression ratios unacceptably distort the image. Contained within fingerprints are tiny details that are considered admissible points of identification in a court of law. To JPEG, these details may be regarded as noise and removed. The JPEG quantization matrix also allows blocking artifacts to occur in the image at compression ratios above about 10:1. Shifting bits to the high frequencies to preserve small details will only make the blocking worse. Lossless compression methods, such as LZW and JBIG, cannot achieve the high compression ratios of WSQ on fingerprint data, with 2:1 typically being the best. A new compression technique (with small acceptable loss), called Wavelet Scalar Quantization (WSQ) was developed and it became the FBI standard for the compression of 500 dpi fingerprint images.

WSQ is a lossy compression method that is well-suited for preserving the very high resolution details of grayscale images while maintaining high compression ratios of typically 12:1 to 15:1 on images that have not undergone "quality enhancements" (such as histogram equalization) to improve the appearance of the image.

Table 3 WSQ file format specifications

Feature Description
Name FBI's Wavelet Scalar Quantization file format.
Also known as: FBI Fingerprint Format or FBI WSQ
Application The standard file format used by the FBI for storage and interchange of grayscale fingerprint images
Originator FBI (U.S. Federal Bureau of Investigation)
Type Bitmap
Colors 8 bit grayscale
Compression Wavelet Scalar Quantization
Maximum image size 64K x 64K
Multiple images per file No

Adding WSQ image library to your software project

Using WSQ image library is very easy. Only 3 steps and a few lines of code are needed. The example is provided below.

Step 1

Add the file “WSQ_library.lib” to your project as show in figures below

Figure 2 Right click on project Libraries and select pop-up menu "Add Files to Project..." Figure 3 Select file “WSQ_library_TI_TMS320C67xx.lib” and press button "Open"

Step 2

Add this line at the beginning of your main program:

#include "wsq_library.h"

Step 3

Call and use WSQ library functions:

WSQ_decode_stream(input_data_stream, input_stream_length, &output_data_stream, &width,
&height, &ppi, &comment_text);
WSQ_encode_stream(input_data_stream2, width, height, bitrate, ppi, comment_text,
&output_data_stream2, &output_stream2_length);

To download Texas Instruments Code Composer Studio 3.3 TMS320C67xx sample project click here

Copyright © 2019 Cognaxon. All rights reserved. Privacy