• 大陆身份证正反面识别


    package main
    
    import (
    	"fmt"
    
    	"github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common"
    	"github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors"
    	"github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile"
    	ocr "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/ocr/v20181119"
    )
    
    func main() {
    
    	credential := common.NewCredential(
    		"sid",
    		"skey",
    	)
    	cpf := profile.NewClientProfile()
    	cpf.HttpProfile.Endpoint = "ocr.tencentcloudapi.com"
    	client, _ := ocr.NewClient(credential, "ap-guangzhou", cpf)
    
    	request := ocr.NewIDCardOCRRequest()
    
    	//request.ImageUrl = common.StringPtr("http://n.sinaimg.cn/front20200924ac/443/w1184h859/20200924/888d-izrvxmf1170471.png")
    	//request.CardSide = common.StringPtr("FRONT")
    
    	request.ImageUrl = common.StringPtr("https://ss1.baidu.com/-4o3dSag_xI4khGko9WTAnF6hhy/baike/pic/item/e1fe9925bc315c6018cf3d0481b1cb1348547786.jpg")
    	request.CardSide = common.StringPtr("BACK")
    
    	response, err := client.IDCardOCR(request)
    	if _, ok := err.(*errors.TencentCloudSDKError); ok {
    		fmt.Printf("An API error has returned: %s", err)
    		return
    	}
    	if err != nil {
    		panic(err)
    	}
    	fmt.Printf("%s", response.ToJsonString())
    }
    

      

    https://cloud.tencent.com/document/product/866/33524

  • 相关阅读:
    ORM中的事务和锁
    双下划线跨表查询 聚集查询 分组查询 FQ查询
    cookie和session
    多表查询
    单表查询
    ORM
    Djangon之模板
    Django之视图函数
    Django之URL路由系统
    web框架的本质及自定义web框架
  • 原文地址:https://www.cnblogs.com/brady-wang/p/15341386.html
Copyright © 2020-2023  润新知