Image-Stamp-OCR
Command Description
Use Laiye IDP to recognize stamp information in the specified image. The result will be returned in the form of JSON
Command Prototype
jsonRet = Mage.ImageOCRStamp(filepath,config,time)
Parameter Description
Parameter | Required | Type | Default | Description |
---|---|---|---|---|
filepath | True | path | "" | Path for image recognition; support jpeg, png, bmp, pdf and tiff formats, and the image size must be less than 10M |
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 filepath='''''' // To-be-recognized stamp image path
Dim config={"Pubkey":"","Secret":"","Url":""} // Get from mage
TracePrint "--------------------Image Stamp Recognition--------------------"
// --------------------------------------------------------
// [Remarks] Image stamp recognition
// Input parameter 1:
// filepath--the path to the image of the seal 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.ImageOCRStamp(filepath,config,time)
// --------------------------------------------------------
jsonRet = Mage.ImageOCRStamp(filepath,config,30000)