Class ProcessParam

java.lang.Object
com.regula.documentreader.api.params.ProcessParam

public class ProcessParam extends Object
structure, used to configure the processing workflow will be checked against CORE capabilities
See Also:
  • Field Details

    • multipageProcessing

      public Boolean multipageProcessing
      if set,
    • dateFormat

      public String dateFormat
      format string of displayed dates in the results
    • debugSaveImages

      public Boolean debugSaveImages
      if set, input images will be saved (in case of reading problems)
    • debugSaveLogs

      public Boolean debugSaveLogs
      if set, deep logs will be saved (in case of reading problems)
    • scenario

      public String scenario
      quickly set proper processing parameters, one of Scenario members
    • uvTorchEnabled

      public Boolean uvTorchEnabled
      true when torch is connected and enabled by user
    • documentIDList

      public int[] documentIDList
      List of the document ID's to process. All documents will be processed, if empty.
    • doBarcodes

      public String[] doBarcodes
      Set the types of barcodes to process. Use BarcodeType.BarcodeTypeValues elements
    • debugSaveCroppedImages

      public Boolean debugSaveCroppedImages
      if set, cropped images of the document will be saved (in case of reading problems)
    • sessionLogFolder

      public String sessionLogFolder
      The path to the folder of the current session. Before using this, save logs. Each new session provides a different path
    • disableFocusingCheck

      public Boolean disableFocusingCheck
      if set, images will not be checked
    • captureButtonScenario

      public String captureButtonScenario
      quickly set proper processing parameters when processing single image captured one of Scenario members
    • fieldTypesFilter

      public int[] fieldTypesFilter
      List of field types eVisualFieldType.VisualFieldTypes to extract. All fields will be extracted, if empty.
    • measureSystem

      public Integer measureSystem
      use one of RGLMeasureSystem values
    • returnUncroppedImage

      public Boolean returnUncroppedImage
      This option allows returning input images in output if enabled.
    • returnCroppedBarcode

      public Boolean returnCroppedBarcode
      When enabled, returns cropped barcode images for unknown documents
    • faceMetaData

      public FaceMetaData[] faceMetaData
    • customParams

      public JSONObject customParams
      This option allows to pass custom processing parameters that can be implemented in future without changing API.
    • debugSaveRFIDSession

      public Boolean debugSaveRFIDSession
    • doublePageSpread

      public Boolean doublePageSpread
      This option can be set to true if the image you provide contains double page spread of the passport and you want to process both pages in one go. It makes sense to use it for documents that have meaningful information on both pages, like Russian domestic passport, or some others.
    • manualCrop

      public Boolean manualCrop
      if set, manual setting of document's bounds will be enabled
    • barcodeParserType

      public Integer barcodeParserType
      Use the following property to set up the barcode parser type which should be used during the recognition.
    • documentPosition

      public ElementPosition documentPosition
    • integralImage

      public Boolean integralImage
      Build an integral image taking into account the quality of fixation of each of the individual images
    • minDPI

      public Integer minDPI
      the minimum acceptable DPI value
    • perspectiveAngle

      public Integer perspectiveAngle
      the maximum value of the deviation of the corners of the document from the 90 degrees value
    • timeout

      public Double timeout
      The time limit (in seconds) for the document recognition, beyond which the recognition does not continue regardless of its result. The countdown will start from the moment the scenario starts
    • timeoutFromFirstDetect

      public Double timeoutFromFirstDetect
      The time limit (in seconds) for the document recognition, beyond which the recognition does not continue regardless of its result. The countdown will start from the moment the document is detected
    • timeoutFromFirstDocType

      public Double timeoutFromFirstDocType
      The time limit (in seconds) for the document recognition, beyond which the recognition does not continue regardless of its result. The countdown will start from the moment the document type is recognized
    • timeoutLiveness

      public Double timeoutLiveness
      Start the countdown from the moment the document liveness authenticity check is started (in seconds)
    • checkHologram

      @Deprecated public Boolean checkHologram
      Deprecated.
      Define whether to check the holograms Use authenticityParams instead.
    • checkRequiredTextFields

      public Boolean checkRequiredTextFields
      When enabled, each field in template will be checked for value presence and if the field is marked as required, but has no value, it will have "error" in validity status.
    • depersonalizeLog

      public Boolean depersonalizeLog
      When enabled all personal data will be forcibly removed from the logs.
    • resultTypeOutput

      public int[] resultTypeOutput
      Types of results to return in response. See 'Result' enum for available options
    • generateDoublePageSpreadImage

      public Boolean generateDoublePageSpreadImage
      When enabled together with "doublePageSpread" and there is a passport with two pages spread in the image, pages will be cropped, straightened and aligned together, as if the document was captured on a flatbed scanner.
    • imageDpiOutMax

      public Integer imageDpiOutMax
      This option controls maximum resolution in dpi of output images. Resolution will remain original in case 0 is supplied. By default is set to return images in response with resolution not greater than 300 dpi.
    • imageOutputMaxHeight

      public Integer imageOutputMaxHeight
      This option controls maximum height in pixels of output images.
    • imageOutputMaxWidth

      public Integer imageOutputMaxWidth
      This option controls maximum width in pixels of output images.
    • alreadyCropped

      public Boolean alreadyCropped
      This option can be set to true if you know for sure that the image you provide contains already cropped document by its edges. This was designed to process on the server side images captured and cropped on mobile.
    • forceDocID

      public Integer forceDocID
      Force use of specific template ID and skip document type identification step.
    • matchTextFieldMask

      public Boolean matchTextFieldMask
      When disabled, text field OCR will be done as is and then the recognized value will be matched to the field mask for validity. If enabled, we are trying to read a field value with maximum efforts to match the mask and provide a correctly formatted value, making assumptions based on the provided field mask in the template.
    • fastDocDetect

      @Deprecated public Boolean fastDocDetect
      Deprecated.
      When enabled, shorten the list of candidates to process during document detection in a single image process mode. Reduces processing time for specific backgrounds.
    • updateOCRValidityByGlare

      public Boolean updateOCRValidityByGlare
      When enabled, fail OCR field validity, if there is a glare over the text field on the image.
    • imageQA

      public ImageQA imageQA
    • forceDocFormat

      public Integer forceDocFormat
      Force use of specified document format when locating and recognizing document to reduce the number of candidates.
    • noGraphics

      public Boolean noGraphics
      When enabled no graphic fields will be cropped from document image.
    • documentAreaMin

      public Double documentAreaMin
      Specifies minimal area of the image that document should cover to be treated as candidate when locating. Value should be in range from 0 to 1, where 1 is when document should fully cover the image.
    • multiDocOnImage

      public Boolean multiDocOnImage
      This option allows locating and cropping multiple documents from one image if enabled.
    • shiftExpiryDate

      public Integer shiftExpiryDate
      This option allows shifting the date of expiry into the future or past for number of months specified. This is useful, for example, in some cases when document might be still valid for some period after original expiration date to prevent negative validity status for such documents. Or by shifting the date to the past will set negative validity for the documents that is about to expire in a specified number of months.
    • minimalHolderAge

      public Integer minimalHolderAge
      This options allows specifying the minimal age in years of the document holder for the document to be considered valid.
    • mrzFormatsFilter

      public String[] mrzFormatsFilter
      This option allows limiting MRZ formats to be recognized by specifying them in array.
    • forceReadMrzBeforeLocate

      public Boolean forceReadMrzBeforeLocate
      This option can be set to true to make sure that in series processing MRZ is located fully inside the result document image, if present on the document. Enabling this option may add extra processing time, by disabling optimizations, but allows more stability in output image quality.
    • parseBarcodes

      public Boolean parseBarcodes
      When set to false, the Barcode code parsing will be skipped and the raw information from the code will be returned instead.
    • disablePerforationOCR

      public Boolean disablePerforationOCR
      When enabled, OCR of perforated fields in the document template will not be performed. Disabled by default.
    • documentGroupFilter

      public int[] documentGroupFilter
      List of specific eligible document types from DocumentType enum to recognize from. You may, for example, specify only passports to be recognized by setting this property. Empty by default.
    • respectImageQuality

      public Boolean respectImageQuality
      When enabled, image quality checks status affects document optical and overall status. Disabled by default.
    • splitNames

      public Boolean splitNames
      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. Disabled by default.
    • shouldReturnPackageForReprocess

      public Boolean shouldReturnPackageForReprocess
      When set to `true`, the DocumentReaderResults.rawResult property of the DocumentReaderResults will contain the encrypted containers of scanning results that may be used for later reprocessing.
    • processAuth

      public Integer processAuth
      Accepts sum of eRPRM_Authenticity elements
    • convertCase

      public Integer convertCase
      This option allows output text case transformation. No changes applied by default to original values.
    • useFaceApi

      public Boolean useFaceApi
      Use this property to set up the Face API integration.
    • faceApiParams

      public FaceApiParams faceApiParams
      Set up the Face SDK service parameters,
    • backendProcessingConfig

      public BackendProcessingConfig backendProcessingConfig
      Set up the backend processing service parameters,
    • doDetectCan

      public Boolean doDetectCan
      Enable the CAN (Card Access Number) detection when using scenarios with document location and MRZ reading, such as the MrzAndLocate scenario
    • rfidParams

      public RFIDParams rfidParams
    • lcidIgnoreFilter

      public int[] lcidIgnoreFilter
      The list of LCID types to ignore during the recognition. If empty, values with all LCID types will be extracted. Narrowing down the list can reduce processing time. Null by default. Use LCID.LCID_List elements
    • lcidFilter

      public int[] lcidFilter
      The list of LCID types to recognize. If empty, values with all LCID types will be extracted. Empty by default. Use LCID.LCID_List elements
    • doFlipYAxis

      public Boolean doFlipYAxis
    • useAuthenticityCheck

      public Boolean useAuthenticityCheck
    • authenticityParams

      public AuthenticityParams authenticityParams
    • logLevel

      public LogLevel logLevel
      Sets the level of logs detalization when used together with setLogs(Boolean) parameter.
    • mrzDetectMode

      public Integer mrzDetectMode
      Make better MRZ detection on complex noisy backgrounds, like BW photocopy of some documents. Works only in the single-frame processing.
    • generateNumericCodes

      public Boolean generateNumericCodes
      This parameter is used to generate numeric representation for issuing state and nationality codes
  • Constructor Details

    • ProcessParam

      public ProcessParam()
  • Method Details

    • getCoreJson

      public String getCoreJson()
      Method is returned process params to core for each frame
      Returns:
      json in string format
    • getRfidCoreJson

      public String getRfidCoreJson()
      Method is returned process params to core during rfid reading
      Returns:
      json in string format
    • toJSONObject

      public JSONObject toJSONObject()
      Method converts params object to JSONObject instance
    • toJson

      public String toJson()
      Method converts object to string in json format
      Returns:
      string in json format
    • fromJson

      public ProcessParam fromJson(String json)
      Converts properly formatted JSON string to the params object instance
    • isLogEnable

      public Boolean isLogEnable()
      Indicates if logging to logcat console is enabled
    • setLogs

      public void setLogs(Boolean logs)
      Enables logging to the logcat console
    • setScenario

      public void setScenario(String scenario)
      Use this method to set the document processing scenario.
      Parameters:
      scenario - one of Scenario.Scenarios element
    • getScenario

      public String getScenario()
      Returns the current document processing scenario.
      See Also:
    • isManualCropAvailable

      public boolean isManualCropAvailable()
      Flag, indicates if manual document boundaries setting is available