baidu

package
v0.5.30 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 28, 2022 License: Zlib Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const ApiPrefixUrl = "https://aip.baidubce.com"

Variables

This section is empty.

Functions

func GetAccessToken

func GetAccessToken(tk token.Token, d data.D) (access.Token, error)

func NewToken

func NewToken(app app.App) token.Token

Types

type AccessToken

type AccessToken struct {
	AcsToken    string `json:"access_token"`
	RefToken    string `json:"refresh_token"`
	AcsExpireIn int64  `json:"expires_in"`
}

func (AccessToken) GetAccessToken

func (a AccessToken) GetAccessToken() access.Value

func (AccessToken) GetRefAccessToken

func (a AccessToken) GetRefAccessToken() access.Value

type PersonInfo

type PersonInfo struct {
	Height float64 `json:"height"`
	Width  float64 `json:"width"`
	Left   float64 `json:"left"`
	Top    float64 `json:"top"`
	Score  float64 `json:"score"`
}

type PersonResult

type PersonResult struct {
	LabelMap   string       `json:"labelmap"`
	ScoreMap   string       `json:"scoremap"`
	ForeGround string       `json:"foreground"`
	PersonNum  int          `json:"person_num"`
	PersonInfo []PersonInfo `json:"person_info"`
}

type Response

type Response struct {
	Code int32  `json:"error"`
	Msg  string `json:"error_description"`
}

func (Response) ReturnIf

func (r Response) ReturnIf(api *api.Api) error

type Response2

type Response2 struct {
	Code int32  `json:"error_code"`
	Msg  string `json:"error_msg"`
}

func (Response2) ReturnIf

func (r Response2) ReturnIf(api *api.Api) error

type Words

type Words struct {
	Words string `json:"words"`
}

type WordsResult

type WordsResult struct {
	Words    []Words `json:"words_result"`
	WordsLen int     `json:"words_result_num"`
}

func AccurateBasic

func AccurateBasic(api *api.Api, d data.D) (*WordsResult, error)

AccurateBasic 通用文字识别(高精度版) https://ai.baidu.com/ai-doc/OCR/1k3h7y3db

func GeneralBasic

func GeneralBasic(api *api.Api, d data.D) (*WordsResult, error)

GeneralBasic 通用文字识别(标准版) https://ai.baidu.com/ai-doc/OCR/zk3h7xz52

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL