Skip to content

Processing Params

Processing

  • Set the following option to true if you know for sure that the image you provide contains an already cropped by edges document:
{
    "processParam": {
        "alreadyCropped": true
    }
}
  • Use a specific template ID and skip the document type identification step:
{
    "processParam": {
        "forceDocID": 123
    }
}
  • Ignore assumptions based on the field mask in the template:
{
    "processParam": {
        "matchTextFieldMask": true
    }
}
  • Shorten the list of candidates to process during the document detection in a single image process mode. The option reduces the processing time for specific backgrounds:
{
    "processParam": {
        "fastDocDetect": true
    }
}
  • Get the OCR validity failed if there is a glare over the text field on the image:
{
    "processParam": {
        "updateOCRValidityByGlare": true
    }
}
  • In case the required fields are not read, their values are returned as empty:
{
    "processParam": {
        "checkRequiredTextFields": true
    }
}
  • Limit MRZ formats to be recognized by specifying them in array:
{
    "processParam": {
        "mrzFormatsFilter": ["2x44", "3x30"]
    }
}
  • Guarantee that an output image contains the correct MRZ on it in the series process mode:
{
    "processParam": {
        "forceReadMrzBeforeLocate": true
    }
}
  • When set to false, the barcode parsing will be skipped and the raw information will be returned:
{
    "processParam": {
        "parseBarcodes": false
    }
}
  • When enabled, OCR of perforated fields in the document template will not be performed:
{
    "processParam": {
        "disablePerforationOCR": true
    }
}
  • Specify the minimum indent from the corners of the document to the borders of the image. The value reflects the allowed percentage for the indent relative to the width of the document. If it is detected that the corners of the document are closer than the specified value, the status will contain an error in the documentPosition field.
{
    "processParam": {
        "imageQa": {
            "documentPositionIndent": 5
        }
    }
}
  • Enable the CAN (Card Access Number) detection when using scenarios with document location and MRZ reading, such as the MrzAndLocate scenario:
{
    "processParam": {
        "doDetectCan": true
    }
}

Image Quality

  • Specify the minimal area of an image that a document should cover to be treated as a candidate when locating. The value should be in a range from 0 to 1, where 1 is for the document that fully covers the image:
{
    "processParam": {
        "documentAreaMin": 0.7
    }
}
  • Set the threshold for an actual document DPI below which the check fails:
{
    "processParam": {
        "imageQa": {
            "dpiThreshold": 150
        }
    }
}
  • Set the threshold for an actual document perspective angle above which the check fails:
{
    "processParam": {
        "imageQa": {
            "angleThreshold": 5
        }
    }
}
  • Disable / enable the focus check for the image quality validation:
{
    "processParam": {
        "imageQa": {
            "focusCheck": true
        }
    }
}
  • Disable / enable the glares check for the image quality validation:
{
    "processParam": {
        "imageQa": {
            "glaresCheck": true
        }
    }
}
  • Disable / enable the colorness check for the image quality validation:
{
    "processParam": {
        "imageQa": {
            "colornessCheck": true
        }
    }
}
  • Disable / enable the moire patterns check for the image quality validation:
{
    "processParam": {
        "imageQa": {
            "moireCheck": true
        }
    }
}
  • When enabled, the image quality checks status affects the document optical and overall status:
{
    "processParam": {
        "respectImageQuality": true
    }
}

Output Data

{
    "processParam": {
        "resultTypeOutput": [3, 17]
    }
}
  • To process up to two pages of the document (a so-called "double-page spread") in one shot if they are presented on the frame (image), use:
{
    "processParam": {
        "doublePageSpread": true
    }
}
  • Return two aligned and straighten passport pages from an input image as if it was captured from the flatbed scanner:
{
    "processParam": {
        "generateDoublePageSpreadImage": true
    }
}
  • If a document contains Visual zone, you can set the list of field types to extract. In this case, other fields are skipped during the processing, i.e. document recognition becomes faster. If the fieldTypesFilter is empty, all fields are extracted:
{
    "processParam": {
        "fieldTypesFilter": [3]
    }
}
  • You can change the format of dates displayed in the results. The mask examples are "dd/mm/yyyy", "mm/dd/yyyy", "dd-mm-yyyy", "mm-dd-yyyy", "dd/mm/yy":
{
    "processParam": {
        "dateFormat": "dd-mm-yyyy"
    }
}
  • Change the measure system:
{
    "processParam": {
        "measureSystem": 1
    }
}
  • Set the maximum DPI for an output image (if set to zero, the image is not resized):
{
    "processParam": {
        "imageDpiOutMax": 0
    }
}
  • Define the maximum height for the document image. The size of the result image will be reduced according to the indicated maximum height while the aspect ration of the image will be preserved:
{
    "processParam": {
        "imageOutputMaxHeight": 1000
    }
}
  • Define the maximum width for the document image. The size of the result image will be reduced according to the indicated maximum height/width while the aspect ration of the image will be preserved:
{
    "processParam": {
        "imageOutputMaxWidth": 500
    }
}
  • Return an image with a cropped barcode:
{
    "processParam": {
        "returnCroppedBarcode": true
    }
}
  • Do not crop graphic fields from a document image:
{
    "processParam": {
        "noGraphics": true
    }
}
  • Shift the date of expiry into the future or past for the specified number of months:
{
    "processParam": {
        "shiftExpiryDate": 1
    }
}
  • Specify the minimal age of the document holder (in years):
{
    "processParam": {
        "minimalHolderAge": 18
    }
}
  • Set the parameter to send the original (uncropped) image to Core for processing:
{
    "processParam": {
        "returnUncroppedImage": true
    }
}
  • When enabled, the Surname and GivenNames field will be divided into ft_First_Name, ft_Second_Name, ft_Third_Name, ft_Fourth_Name, ft_Last_Name fields:
{
    "processParam": {
        "splitNames": true
    }
}

Logging

  • When enabled, results will contain transaction processing log:
{
    "processParam": {
        "log": true
    }
}
  • When used together with 'log' parameter enabled, sets the level of logs detalization:
{
    "processParam": {
        "logLevel": "INFO"
    }
}
  • Remove personal information from logs:
{
    "processParam": {
        "depersonalizeLog": true
    }
}

Face API Integration

Learn more about Face SDK Integration

  • Add the Face API integration:
{
    "processParam": {
        "useFaceApi": true
    }
}
{
    "processParam": {
        "faceApi": {
            "url": "https://faceapi.regulaforensics.com",
            "mode": "match",
            "threshold": 75,
            "serviceTimeout": 3000
        }
    }
}
  • Use livePortrait to add a live photo of the document owner (selfie) for comparison with the photo from the visual zone of the document:
{
    "processParam":
        {
            "useFaceApi": true
        },
    "List": [],
    "livePortrait": "base64image"
}
  • Use extPortrait to add a photo from an external source, for example, a database:
{
    "processParam":
        {
            "useFaceApi": true
        },
    "List": [],
    "extPortrait": "base64image"
}
  • To crop a selfie from the same frame as the document and send it to Face API as a live portrait, set oneShotIdentification to true:
{
    "processParam":
        {
            "useFaceApi": true,
            "oneShotIdentification": true
        }
}

Parameters

└── faceApi
|   └── url
|   └── mode
|   └── search
|   |   └── limit
|   |   └── threshold
|   |   └── group_ids    
|   └── threshold    
|   └── serviceTimeout
|   └── proxy
|   └── proxy_userpwd
|   └── proxy_type
Parameter Default Description
url https://faceapi.regulaforensics.com The URL of the Regula Face SDK service instance to be used.

Note that the default https://faceapi.regulaforensics.com can be used for demo purposes only. For production use, you should purchase an appropriate license. Please contact us here.
mode match The processing mode: "match" or "match+search".

match is a comparison of persons that are passed in the request, works by default.

match+search performs both matching and searching by image. If only one person is available, match is not performed and only the search is carried out. If no search parameters are specified, the search is conducted over the entire database with the default parameters.

Learn more in OpenAPI documentation
search not set A search filter that can be applied if the "match+search" mode is enabled. May include limit, threshold, group_ids. If the group_ids are specified, the search is performed only in these groups. Find more information in the OpenAPI documentation.
threshold 75 The similarity threshold, 0-100. Above 75 means that the faces' similarity is verified, below 75 is not.
serviceTimeout 3000 The service request timeout, ms.
proxy not set Proxy to use, should be set according to the cURL standard.
proxy_userpwd not set Username and password to use for proxy authentication, should be set according to the cURL standard.
proxy_type not set Proxy protocol type, should be set according to the cURL standard.

Next Steps