ecloud

package
v0.0.0-...-be72d05 Latest Latest
Warning

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

Go to latest
Published: May 7, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileFromUrl

func FileFromUrl(url string) io.Reader

Types

type AiOptions

type AiOptions struct {
	AccessKey string
	SecretKey string
	Client    *http.Client
}

type AiService

type AiService struct {
	// contains filtered or unexported fields
}

func NewAi

func NewAi(opt *AiOptions) (*AiService, error)

func (*AiService) CreateFaceSet

func (as *AiService) CreateFaceSet()

func (*AiService) FaceDetect

func (as *AiService) FaceDetect(file io.Reader) (*FaceDetectResponse, error)

func (*AiService) RefreshAccessToken

func (as *AiService) RefreshAccessToken() error

type FaceDetectDetail

type FaceDetectDetail struct {
	FaceId             string              `json:"faceId"`
	FaceRectangleArea  *RectangleAreaInfo  `json:"faceDectectRectangleArea"`
	LandmarkAreas      []*LandmarkAreaInfo `json:"faceDetectLandmarkAreaList"`
	FaceScore          float64             `json:"faceScore"`
	Roll               float64             `json:"roll"`
	Pitch              float64             `json:"pitch"`
	Raw                float64             `json:"raw"`
	FaceLandMarkNumber int32               `json:"faceLandmarkNumber"`
}

type FaceDetectResponse

type FaceDetectResponse struct {
	ImageId   int64               `json:"imageId"`
	Cost      int64               `json:"cost"`
	FaceCount int32               `json:"faceNum"`
	Details   []*FaceDetectDetail `json:"faceDetectDetailList"`
}

type LandmarkAreaInfo

type LandmarkAreaInfo struct {
	X float64 `json:"pointX"`
	Y float64 `json:"pointY"`
}

type RectangleAreaInfo

type RectangleAreaInfo struct {
	UpperLeftX  float64 `json:"upperLeftX"`
	UpperLeftY  float64 `json:"upperLeftY"`
	LowerRightX float64 `json:"lowerRightX"`
	LowerRightY float64 `json:"lowerRightY"`
}

Jump to

Keyboard shortcuts

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