v20200304

package
v3.0.233+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const APIVersion = "2020-03-04"

Variables

This section is empty.

Functions

This section is empty.

Types

type AgeInfo

type AgeInfo struct {

	// 变化到的人脸年龄 [10,80]。
	Age *int64 `json:"Age,omitempty" name:"Age"`

	// 人脸框位置。若不输入则选择 Image 或 Url 中面积最大的人脸。
	// 您可以通过 [人脸检测与分析](https://cloud.tencent.com/document/api/867/32800)  接口获取人脸框位置信息。
	FaceRect *FaceRect `json:"FaceRect,omitempty" name:"FaceRect"`
}

type ChangeAgePicRequest

type ChangeAgePicRequest struct {
	*tchttp.BaseRequest

	// 人脸变老变年轻信息。
	// 您可以输入最多3个 AgeInfo 来实现给一张图中的最多3张人脸变老变年轻。
	AgeInfos []*AgeInfo `json:"AgeInfos,omitempty" name:"AgeInfos" list`

	// 图片 base64 数据,base64 编码后大小不可超过5M。
	// 支持PNG、JPG、JPEG、BMP,不支持 GIF 图片。
	Image *string `json:"Image,omitempty" name:"Image"`

	// 图片的 Url ,对应图片 base64 编码后大小不可超过5M。
	// 图片的 Url、Image必须提供一个,如果都提供,只使用 Url。
	// 图片存储于腾讯云的 Url 可保障更高下载速度和稳定性,建议图片存储于腾讯云。
	// 非腾讯云存储的Url速度和稳定性可能受一定影响。
	// 支持PNG、JPG、JPEG、BMP,不支持 GIF 图片。
	Url *string `json:"Url,omitempty" name:"Url"`

	// 返回图像方式(base64 或 url ) ,二选一。url有效期为1天。
	RspImgType *string `json:"RspImgType,omitempty" name:"RspImgType"`
}

func NewChangeAgePicRequest

func NewChangeAgePicRequest() (request *ChangeAgePicRequest)

func (*ChangeAgePicRequest) FromJsonString

func (r *ChangeAgePicRequest) FromJsonString(s string) error

func (*ChangeAgePicRequest) ToJsonString

func (r *ChangeAgePicRequest) ToJsonString() string

type ChangeAgePicResponse

type ChangeAgePicResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// RspImgType 为 base64 时,返回处理后的图片 base64 数据。默认返回base64
		ResultImage *string `json:"ResultImage,omitempty" name:"ResultImage"`

		// RspImgType 为 url 时,返回处理后的图片 url 数据。
		ResultUrl *string `json:"ResultUrl,omitempty" name:"ResultUrl"`

		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewChangeAgePicResponse

func NewChangeAgePicResponse() (response *ChangeAgePicResponse)

func (*ChangeAgePicResponse) FromJsonString

func (r *ChangeAgePicResponse) FromJsonString(s string) error

func (*ChangeAgePicResponse) ToJsonString

func (r *ChangeAgePicResponse) ToJsonString() string

type Client

type Client struct {
	common.Client
}

func NewClient

func NewClient(credential *common.Credential, region string, clientProfile *profile.ClientProfile) (client *Client, err error)

func NewClientWithSecretId

func NewClientWithSecretId(secretId, secretKey, region string) (client *Client, err error)

Deprecated

func (*Client) ChangeAgePic

func (c *Client) ChangeAgePic(request *ChangeAgePicRequest) (response *ChangeAgePicResponse, err error)

用户上传一张人脸图片,基于人脸编辑与生成算法,输出一张人脸变老或变年轻的图片,支持实现人脸不同年龄的变化。

func (*Client) SwapGenderPic

func (c *Client) SwapGenderPic(request *SwapGenderPicRequest) (response *SwapGenderPicResponse, err error)

用户上传一张人脸图片,基于人脸编辑与生成算法,输出一张人脸性别转换的图片。男变女可实现美颜、淡妆、加刘海和长发的效果;女变男可实现加胡须、变短发的效果。

type FaceRect

type FaceRect struct {

	// 人脸框左上角横坐标。
	X *int64 `json:"X,omitempty" name:"X"`

	// 人脸框左上角纵坐标。
	Y *int64 `json:"Y,omitempty" name:"Y"`

	// 人脸框宽度。
	Width *int64 `json:"Width,omitempty" name:"Width"`

	// 人脸框高度。
	Height *int64 `json:"Height,omitempty" name:"Height"`
}

type GenderInfo

type GenderInfo struct {

	// 选择转换方向,0:男变女,1:女变男。
	Gender *int64 `json:"Gender,omitempty" name:"Gender"`

	// 人脸框位置。若不输入则选择 Image 或 Url 中面积最大的人脸。
	// 您可以通过 [人脸检测与分析](https://cloud.tencent.com/document/api/867/32800)  接口获取人脸框位置信息。
	FaceRect *FaceRect `json:"FaceRect,omitempty" name:"FaceRect"`
}

type SwapGenderPicRequest

type SwapGenderPicRequest struct {
	*tchttp.BaseRequest

	// 人脸转化性别信息。
	// 您可以输入最多3个 GenderInfo 来实现给一张图中的最多3张人脸转换性别。
	GenderInfos []*GenderInfo `json:"GenderInfos,omitempty" name:"GenderInfos" list`

	// 图片 base64 数据,base64 编码后大小不可超过5M。
	// 支持PNG、JPG、JPEG、BMP,不支持 GIF 图片。
	Image *string `json:"Image,omitempty" name:"Image"`

	// 图片的 Url ,对应图片 base64 编码后大小不可超过5M。
	// 图片的 Url、Image必须提供一个,如果都提供,只使用 Url。
	// 图片存储于腾讯云的 Url 可保障更高下载速度和稳定性,建议图片存储于腾讯云。
	// 非腾讯云存储的Url速度和稳定性可能受一定影响。
	// 支持PNG、JPG、JPEG、BMP,不支持 GIF 图片。
	Url *string `json:"Url,omitempty" name:"Url"`

	// 返回图像方式(base64 或 url ) ,二选一。url有效期为1天。
	RspImgType *string `json:"RspImgType,omitempty" name:"RspImgType"`
}

func NewSwapGenderPicRequest

func NewSwapGenderPicRequest() (request *SwapGenderPicRequest)

func (*SwapGenderPicRequest) FromJsonString

func (r *SwapGenderPicRequest) FromJsonString(s string) error

func (*SwapGenderPicRequest) ToJsonString

func (r *SwapGenderPicRequest) ToJsonString() string

type SwapGenderPicResponse

type SwapGenderPicResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// RspImgType 为 base64 时,返回处理后的图片 base64 数据。默认返回base64
		ResultImage *string `json:"ResultImage,omitempty" name:"ResultImage"`

		// RspImgType 为 url 时,返回处理后的图片 url 数据。
		ResultUrl *string `json:"ResultUrl,omitempty" name:"ResultUrl"`

		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewSwapGenderPicResponse

func NewSwapGenderPicResponse() (response *SwapGenderPicResponse)

func (*SwapGenderPicResponse) FromJsonString

func (r *SwapGenderPicResponse) FromJsonString(s string) error

func (*SwapGenderPicResponse) ToJsonString

func (r *SwapGenderPicResponse) ToJsonString() string

Jump to

Keyboard shortcuts

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