Skip to main content

Image-Invoice-OCR

Command Description

Use Laiye IDP to identify multiple bills of the specified image, and return results in an array

Command Prototype

arrayRet = Mage.ImageOCRInvoice(path,config,time)

Parameter Description

ParameterRequiredTypeDefaultDescription
pathTruepath'''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
configTrueexpression{}Call configuration of Laiye IDP
timeTruenumber30000Specify the waiting time in milliseconds. If exceeded, an exception will be thrown. Default: 30,000 milliseconds (30 seconds)

return

arrayRet,The variable used to save the output of the command.

Demo

Dim config={"Pubkey":"","Secret":"","Url":""}  // Get from mage 
Dim path='''C:\Users\Laiye Technology\Desktop\123.jpg''' // The path of the ticket to be recognized

TracePrint "--------------------Image Multi-Bill Recognition--------------------"
// --------------------------------------------------------
// [Remarks] Image multi-note recognition
// Input parameter 1:
// path--The path of the ticket 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:
// arrayRet--The variable to which the output of the function call is saved

// Command prototype: arrayRet = Mage.ImageOCRInvoice(path,config,time)
// --------------------------------------------------------

arrayRet = Mage.ImageOCRInvoice(path,config,30000)
Traceprint(arrayRet)