Image-Card-OCR
Command Description
Use Laiye IDP to recognize cards and certificates in the specified image, and return results in JSON format
Command Prototype
jsonRet = Mage.ImageOCRCard(path,config,time)
Parameter Description
Parameter | Required | Type | Default | Description |
---|---|---|---|---|
path | True | path | '''C:\Users''' | Paths of images in jpeg, jpg, png, bmp, tif, tiff and other formats are supported to be identified. Only homepage recognition is supported for PDF files |
config | True | expression | {} | Call configuration of Laiye IDP |
time | True | number | 30000 | Specify the waiting time in milliseconds. If exceeded, an exception will be thrown. Default: 30,000 milliseconds (30 seconds) |
return
jsonRet,The variable used to save the output of the command.
Demo
Dim config={"Pubkey":"","Secret":"","Url":""} // Get from mage
Dim path='''''' // To-be-recognized image card path
TracePrint "--------------------Image Card Identification--------------------"
// --------------------------------------------------------
// [Remarks] Image card identification
// Input parameter 1:
// path--the path of the image card to be recognized
// Input parameter 2:
// config--mage configuration, need to configure Pubkey and Secret.Type:Dict
// Input parameter 3:
// time--timeout time. Default unit: milliseconds. Type: Int
// Output parameters:
// jsonRet--The variable to which the output of the function call is saved
// Command prototype: jsonRet = Mage.ImageOCRCard(path,config,time)
// --------------------------------------------------------
jsonRet = Mage.ImageOCRCard(path,config,30000)