Set Up aComputer Vision Automation Processor
1 Create a processor settings group
The Computer Vision automation processor must be hosted inside a generic processor settings group. A generic processor settings group can include multiple automation processors and is typically used as a container for the automation processors called by a specific digital journey.
If you already have a generic processor settings group you wish to host your Computer Vision automation processor, skip to 2 Add the Computer Vision automation processor to a generic processor settings group. Otherwise, follow the instructions below to create a new generic processor settings group:
-
In FintechOS Studio, navigate to Digital Experience > Digital Flow Processing. The Flow Settings list page displays.
-
Click Insert. The Add Flow Settings page displays.
- Select your Digital Journey and enter a Name.
- Click Save and Reload. The Processor Settings section displays.
- Click Insert to create a new processor settings group.
2 Add the Computer Vision automation processor to a generic processor settings group
- In FintechOS Studio, navigate to Digital Experience > Digital Flow Processing > Flow Settings list.
- In the Processor Settings section, select
- Click Generic Processor Settings.
- In the Generic Processor Settings List, double click the generic processor settings group you wish to host your automation processor.
- In the Edit Generic Processor Setting window, under the Processor Settings region, click the Insert button to add a new automation processor.
3 Configure the automation processor's settings
- 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.
- Click the Save and Close button at the top right corner to save your automation processor.
Call the RotateImage option
Create the following request:
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.
......
"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
},
....