Class Image

Represents metadata about an individual image as part of a document. The following example provides some metadata for each image for each document in a specific application.

var api = new TVS.Api();
api.login('admin', 'password').then(function() {
    // get container results...
    return api.retrieveDocumentContainer(containerId);
}).then(function(application) {
    // list of documents
    console.log('Application:', application.getApplicationDisplayName());
    console.log('Documents:');
    for (var i = 0; i < application.Documents.length; i++) {
        var doc = application.Documents[i];
        console.log('- document:', doc.getDocumentTypeDisplay(), doc.getFullname());

        // document images
        console.log('  Images:');
        for (var i = 0; i < doc.Images.length; i++) {
            var img = doc.Images[i];
            console.log('  - image:', img.getImageTypeDisplay(), img.Id);
        }
    }
});

See also

Class Document: an image is part of a document, which is represented by this class.

Uploading Document Image Data for more information on how to create new images and how to upload binary image data.

class Image(json)

Represents metadata of a single document image of a specific type. A document may store metadata of multiple document images.

Arguments
  • json (object()) – The original JSON data object on which basis this image representation is created.

Constant Properties

Image.IMAGE_TYPE_FACE

Image of the face - historically 3M scanner provided a cropped region of the document that may or may not include the face.

Image.IMAGE_TYPE_DETECTEDFACE

Face image detected by scanner SDK.

Image.IMAGE_TYPE_DOCUMENT

White-light entire document. This is one of the two types normally used.

Image.IMAGE_TYPE_INFRARED

Infrared entire document.

Image.IMAGE_TYPE_ULTRAVIOLET

Ultraviolet entire document.

Image.IMAGE_TYPE_RFID

Image of the face as stored on the RFID chip.

Image.IMAGE_TYPE_BARCODE

Image of the barcode area on the document.

Image.IMAGE_TYPE_MRZ

Ultraviolet image of the MRZ part of the document.

Image.IMAGE_TYPE_FINGERPRINT

Image of the fingerprint(s) as stored on the RFID chip.

Image.IMAGE_TYPE_OCR

The image version that has been prepared to be used as the source image for optical character recognition (OCR).

Image.IMAGE_TYPE_DOCUMENTBACK

White light entire document (backside, Non-MRZ). This is one of the two types normally used.

Image.IMAGE_TYPE_INFRAREDBACK

Infrared entire document (backside, Non-MRZ).

Image.IMAGE_TYPE_ULTRAVIOLETBACK

Ultraviolet entire document (backside, Non-MRZ).

Image.IMAGE_TYPE_ORIGINALDOCUMENT

The original full document image as it was originally obtained or uploaded. Older documents may not have this image type, in which case Image.IMAGE_TYPE_DOCUMENT is the preferred image type.

Image.IMAGE_TYPE_ORIGINALDOCUMENTBACK

The original full rear document image, as it was originally obtained or uploaded.

Image.IMAGE_TYPE_DOCUMENTSIDE3

White light entire document (side 3).

Image.IMAGE_TYPE_INFRAREDSIDE3

Infrared entire document (side 3).

Image.IMAGE_TYPE_ULTRAVIOLETSIDE3

Ultraviolet entire document (side 3).

Image.IMAGE_TYPE_DOCUMENTSIDE4

White light entire document (side 4).

Image.IMAGE_TYPE_INFRAREDSIDE4

Infrared entire document (side 4).

Image.IMAGE_TYPE_ULTRAVIOLETSIDE4

Ultraviolet entire document (side 4).

Image.IMAGE_TYPE_UNKNOWN

Unknown image type.

Image.Id

The unqiue identifier of the image.

Image.DocumentId

The unqiue identifier of the document this image belongs to.

Image.ImageSourceId

If this image is describing a cropped image, then this field is the unique Id of the original image this cropped image is based on.

Image.ImageType

Declares the type of the image.