Registry /
cloud / tencentcloud-tencentcloud-sdk-go-tencentcloud-ocr
Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
ocr
✓ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/ocr
Initialize OCR client and perform basic OCR
package main
import (
"fmt"
"github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common"
"github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/ocr"
)
func main() {
credential := common.NewCredential("yourSecretId", "yourSecretKey")
client, _ := ocr.NewClient(credential, "ap-guangzhou")
request := ocr.NewGeneralBasicOCRRequest()
request.ImageBase64 = "base64encodedimage"
response, _ := client.GeneralBasicOCR(request)
fmt.Println(response.ToJsonString())
}
Debug
Known issues
No known issues recorded.
Upgrade
Version history
1.3.59latest on pkg.go.dev
Audit
Dependencies
No dependency data recorded yet.