Set Up a Computer Vision Automation Processor

1 Create a flow settings group

The Computer Vision automation processor must be hosted inside a flow settings group. A flow settings group can include multiple processor settings and is typically used as a container for the automation processors called by a specific digital journey, e.g.: an OCR flow settings group with three processor settings (for scanning passports, identity cards, or driver's licenses).

  1. In FintechOS Studio, navigate to Digital Experience > Digital Flow Processing. The Flow Settings list page displays.
  2. Click Insert. The Add Flow Settings page displays.

  3. Select your Digital Journey and enter a Name.
  4. Click Save and Reload. The Processor Settings section displays.

2 Create the automation processor settings

  1. In the flow settings page, click Insert to create a new processor settings entry.
  2. In the Add Processor Settings screen, fill in the following fields:
    • Name – Enter a name for your automation processor
    • Digital Processor Type – Select OCR.
    • Settings – JSON code for the automation processor's settings. For details, see Computer Vision Settings.
    • Mapping – JSON code for the automation processor's mappings. For details, see Computer Vision Mappings.
  3. Click the Save and Close button at the top right corner to save your automation processor.
  4. Repeat for the remaining processor settings.

Call the RotateImage option

Create the following request:

Copy
POST /dcs/ocr2/ocrdocument HTTP/1.1
Host: dcs.fintechos.com
Content-Type: application/json
Ocp-Apim-Subscription-Key: to be obtained from subscription portal
OCRValidations: V01,V10 // the validations separated by ','

{
    "DocumentType":"3", //mandatory - documentype:  MRZ = 1, Passport = 2, IdentityCard = 3, DrivingLicence = 4
    "Base64File" :"/9j..", //mandatory - the base64 file
    "RotateImage": true // optional - true/false if you want to receive the image rotated based on the text orientation
}
 

Response:

The image will be rotated with an angle that is a multiple of 90° (180°, 270°, etc.), based on the orientation of the text. If the text in the image has an angle smaller than 45°, the image is not be rotated and the Base64File field from the RotatedImage object is null.

Copy
    ......
    "PersonalNumber": "1111111111",
    "GivenName": "asd",
    "LastName": "fgh",
    "ImageProperties": {
        "Angle": 89.1171 //the angle of the text from the image
    },
    "RotatedImage": {
        "Base64File":"iVBORw0", //the base64 of the rotated image
        "IsSuccess": true, //true/false if the rotation is ok
        "ErrorMessage": null
    },
    ....