# SVD_FINGERPRINT SVD Compression of Fingerprint Images

SVD_FINGERPRINT, a MATLAB program which reads a file containing a fingerprint image and uses the singular value decomposition (SVD) to compute and display a series of low rank approximations to the image.

In MATLAB, images can be thought of as numeric arrays (although you do have to convert them from the uint8 numeric format used for images to the double format used for numeric arrays.)

Therefore, an MxN image A has an SVD decomposition A = U*S*V'.

For any 1 <= R <= min(M,N), a low rank approximation to A is formed by

```        Ar = U(1:m,1:r) * S(1:r,1:r) * V(1:n,1:r)';
```
Properties of the SVD guarantee that Ar is the best possible rank R approximation to the data in A. This means it is often possible to get a good approximation to A using much less data.

Regarding a fingerprint image as collection of column vectors, we can apply this technique. Fingerprints can be difficult to compress, since they have a great deal of fine variation and detail.

### Licensing:

The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.

### Languages:

SVD_FINGERPRINT is available in a MATLAB version.

### Related Data and Programs:

FINGERPRINTS, a dataset directory which contains some images of fingerprints.

SVD_BASIS, a MATLAB program which applies the singular value decomposition (SVD) to a collection of data vectors, extracting dominant modes;

SVD_DEMO, a MATLAB program which demonstrates the singular value decomposition (SVD) for a simple example.

svd_fingerprint, a MATLAB program which reads a file containing a fingerprint image and uses the Singular Value Decomposition (SVD) to compute and display a series of low rank approximations to the image.

SVD_GRAY, a MATLAB program which reads a gray scale image, computes the Singular Value Decomposition (SVD), and constructs a series of low rank approximations to the image.

SVD_SNOWFALL, a MATLAB program which reads a file containing historical snowfall data and analyzes the data with the Singular Value Decomposition (SVD).

SVD_TRUNCATED, a MATLAB program which demonstrates the computation of the reduced or truncated Singular Value Decomposition (SVD) that is useful for cases when one dimension of the matrix is much smaller than the other.

### Reference:

1. Harry Andrews, Claude Patterson,
Outer Product Expansions and Their Uses in Digital Image Processing,
American Mathematical Monthly,
Volume 82, Number 1, January 1975, pages 1-13.
2. David Kahaner, Cleve Moler, Steven Nash,
Numerical Methods and Software,
Prentice Hall, 1989,
ISBN: 0-13-627258-4,
LC: TA345.K34.

### Source Code:

• svd_bw.m, creates a low rank SVD approximation of a black and white image.
• svd_fingerprint.m, compares a fingerprint to low rank SVD compressed versions.
• timestamp.m, prints the YMDHMS date as a timestamp.

### Examples and Tests:

FINGERPRINT_01 analyzes the data in the file "fingerprint_01.png". Note that the PNG format can include a hidden form of compression, which we are ignoring for this exercise. (Take a look at the size, in bytes, of the original PNG file and the sequence of compressed versions.) We are concerned about compressed representation of the image once it has been read into memory and stored as an array of MxN black/white values.

Last modified on 25 January 2019.