Skip to main content
Version: v6.5.0

Image OCR recognition

Command Description

OCR identification of the specified image requires access to the Internet when calling

Command Prototype

sText = GoogleOCR.ImageOCR(sFileName, sApiKey)

Command parameter

parametermandatorytypedefault valueInstructions
sFileNameTruepathC:\UsersThe recognized image path supports JPEG, PNG, GIF, BMP, WebP, Raw, and ICO formats, and the image size must be less than 20M
sApiKeyTruestringempty stringPlease copy the API Key from Credentials on Google Cloud Platform

Return result

SText, Assign the result of running the command to this variable

Run instance

/**************************Image OCR Recognition**************************
Command prototype:
sText = GoogleOCR.ImageOCR(sFileName, sApiKey)
Input parameters:
sFileName -- Image to be recognized. Note: The path of the image to be recognized supports jpeg, png, gif, bmp, webp, raw, ico formats, and the image size must be less than 2M.
sApiKey -- API Key. Note: Please copy the API Key from Credentials on Google Cloud Platform.
Output parameters:
--> None
Notes:
None
******************************************************************/


sText = GoogleOCR.ImageOCR(sFileName, sApiKey)