v20191213

package
v3.0.181+incompatible Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const APIVersion = "2019-12-13"

Variables

This section is empty.

Functions

This section is empty.

Types

type BeautifyPicRequest

type BeautifyPicRequest struct {
	*tchttp.BaseRequest

	// 图片 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"`

	// 美白程度,取值范围[0,100]。0不美白,100代表最高程度。默认值30。
	Whitening *uint64 `json:"Whitening,omitempty" name:"Whitening"`

	// 磨皮程度,取值范围[0,100]。0不磨皮,100代表最高程度。默认值10。
	Smoothing *uint64 `json:"Smoothing,omitempty" name:"Smoothing"`

	// 瘦脸程度,取值范围[0,100]。0不瘦脸,100代表最高程度。默认值70。
	FaceLifting *uint64 `json:"FaceLifting,omitempty" name:"FaceLifting"`

	// 大眼程度,取值范围[0,100]。0不大眼,100代表最高程度。默认值70。
	EyeEnlarging *uint64 `json:"EyeEnlarging,omitempty" name:"EyeEnlarging"`
}

func NewBeautifyPicRequest

func NewBeautifyPicRequest() (request *BeautifyPicRequest)

func (*BeautifyPicRequest) FromJsonString

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

func (*BeautifyPicRequest) ToJsonString

func (r *BeautifyPicRequest) ToJsonString() string

type BeautifyPicResponse

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

		// 处理后的图片 base64 数据。
		ResultImage *string `json:"ResultImage,omitempty" name:"ResultImage"`

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

func NewBeautifyPicResponse

func NewBeautifyPicResponse() (response *BeautifyPicResponse)

func (*BeautifyPicResponse) FromJsonString

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

func (*BeautifyPicResponse) ToJsonString

func (r *BeautifyPicResponse) 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) BeautifyPic

func (c *Client) BeautifyPic(request *BeautifyPicRequest) (response *BeautifyPicResponse, err error)

用户上传一张人脸图片,精准定位五官,实现美肤、亮肤、祛痘等美颜功能。

func (*Client) CreateModel

func (c *Client) CreateModel(request *CreateModelRequest) (response *CreateModelResponse, err error)

在使用LUT素材的modelid实现试唇色前,您需要先上传 LUT 格式的cube文件注册唇色ID。查看 [LUT文件的使用说明](https://cloud.tencent.com/document/product/1172/41701)。

注:您也可以直接使用 [试唇色接口](https://cloud.tencent.com/document/product/1172/40706),通过输入RGBA模型数值的方式指定唇色,更简单易用。

func (*Client) DeleteModel

func (c *Client) DeleteModel(request *DeleteModelRequest) (response *DeleteModelResponse, err error)

删除已注册的唇色素材。

func (*Client) GetModelList

func (c *Client) GetModelList(request *GetModelListRequest) (response *GetModelListResponse, err error)

查询已注册的唇色素材。

func (*Client) TryLipstickPic

func (c *Client) TryLipstickPic(request *TryLipstickPicRequest) (response *TryLipstickPicResponse, err error)

对图片中的人脸嘴唇进行着色,最多支持同时对一张图中的3张人脸进行试唇色。

您可以通过事先注册在腾讯云的唇色素材(LUT文件)改变图片中的人脸唇色,也可以输入RGBA模型数值。

为了更好的效果,建议您使用事先注册在腾讯云的唇色素材(LUT文件)。

> - 公共参数中的签名方式请使用V3版本,即配置SignatureMethod参数为TC3-HMAC-SHA256。

type CreateModelRequest

type CreateModelRequest struct {
	*tchttp.BaseRequest

	// 用于试唇色,要求必须是LUT 格式的cube文件转换成512*512的PNG图片。查看 [LUT文件的使用说明](https://cloud.tencent.com/document/product/1172/41701)。了解 [cube文件转png图片小工具](http://yyb.gtimg.com/aiplat/static/qcloud-cube-to-png.html)。
	LUTFile *string `json:"LUTFile,omitempty" name:"LUTFile"`

	// 文件描述信息,可用于备注。
	Description *string `json:"Description,omitempty" name:"Description"`
}

func NewCreateModelRequest

func NewCreateModelRequest() (request *CreateModelRequest)

func (*CreateModelRequest) FromJsonString

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

func (*CreateModelRequest) ToJsonString

func (r *CreateModelRequest) ToJsonString() string

type CreateModelResponse

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

		// 唇色素材ID。
		ModelId *string `json:"ModelId,omitempty" name:"ModelId"`

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

func NewCreateModelResponse

func NewCreateModelResponse() (response *CreateModelResponse)

func (*CreateModelResponse) FromJsonString

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

func (*CreateModelResponse) ToJsonString

func (r *CreateModelResponse) ToJsonString() string

type DeleteModelRequest

type DeleteModelRequest struct {
	*tchttp.BaseRequest

	// 素材ID。
	ModelId *string `json:"ModelId,omitempty" name:"ModelId"`
}

func NewDeleteModelRequest

func NewDeleteModelRequest() (request *DeleteModelRequest)

func (*DeleteModelRequest) FromJsonString

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

func (*DeleteModelRequest) ToJsonString

func (r *DeleteModelRequest) ToJsonString() string

type DeleteModelResponse

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

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

func NewDeleteModelResponse

func NewDeleteModelResponse() (response *DeleteModelResponse)

func (*DeleteModelResponse) FromJsonString

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

func (*DeleteModelResponse) ToJsonString

func (r *DeleteModelResponse) ToJsonString() string

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 GetModelListRequest

type GetModelListRequest struct {
	*tchttp.BaseRequest

	// 起始序号,默认值为0。
	Offset *int64 `json:"Offset,omitempty" name:"Offset"`

	// 返回数量,默认值为10,最大值为100。
	Limit *int64 `json:"Limit,omitempty" name:"Limit"`
}

func NewGetModelListRequest

func NewGetModelListRequest() (request *GetModelListRequest)

func (*GetModelListRequest) FromJsonString

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

func (*GetModelListRequest) ToJsonString

func (r *GetModelListRequest) ToJsonString() string

type GetModelListResponse

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

		// 唇色素材总数量。
		ModelIdNum *int64 `json:"ModelIdNum,omitempty" name:"ModelIdNum"`

		// 素材数据
		// 注意:此字段可能返回 null,表示取不到有效值。
		ModelInfos []*ModelInfo `json:"ModelInfos,omitempty" name:"ModelInfos" list`

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

func NewGetModelListResponse

func NewGetModelListResponse() (response *GetModelListResponse)

func (*GetModelListResponse) FromJsonString

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

func (*GetModelListResponse) ToJsonString

func (r *GetModelListResponse) ToJsonString() string

type LipColorInfo

type LipColorInfo struct {

	// 使用RGBA模型试唇色。
	RGBA *RGBAInfo `json:"RGBA,omitempty" name:"RGBA"`

	// 使用已注册的 LUT 文件试唇色。
	// ModelId 和 RGBA 两个参数只需提供一个,若都提供只使用 ModelId。
	ModelId *string `json:"ModelId,omitempty" name:"ModelId"`

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

	// 涂妆浓淡[0,100]。建议取值50。本参数仅控制ModelId对应的涂妆浓淡。
	ModelAlpha *int64 `json:"ModelAlpha,omitempty" name:"ModelAlpha"`
}

type ModelInfo

type ModelInfo struct {

	// 唇色素材ID
	ModelId *string `json:"ModelId,omitempty" name:"ModelId"`

	// 唇色素材 url 。 LUT 文件 url 5分钟有效。
	LUTFileUrl *string `json:"LUTFileUrl,omitempty" name:"LUTFileUrl"`

	// 文件描述信息。
	Description *string `json:"Description,omitempty" name:"Description"`
}

type RGBAInfo

type RGBAInfo struct {

	// R通道数值。[0,255]。
	R *int64 `json:"R,omitempty" name:"R"`

	// G通道数值。[0,255]。
	G *int64 `json:"G,omitempty" name:"G"`

	// B通道数值。[0,255]。
	B *int64 `json:"B,omitempty" name:"B"`

	// A通道数值。[0,100]。建议取值50。
	A *int64 `json:"A,omitempty" name:"A"`
}

type TryLipstickPicRequest

type TryLipstickPicRequest struct {
	*tchttp.BaseRequest

	// 唇色信息。
	// 您可以输入最多3个 LipColorInfo 来实现给一张图中的最多3张人脸试唇色。
	LipColorInfos []*LipColorInfo `json:"LipColorInfos,omitempty" name:"LipColorInfos" list`

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

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

func NewTryLipstickPicRequest

func NewTryLipstickPicRequest() (request *TryLipstickPicRequest)

func (*TryLipstickPicRequest) FromJsonString

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

func (*TryLipstickPicRequest) ToJsonString

func (r *TryLipstickPicRequest) ToJsonString() string

type TryLipstickPicResponse

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

		// 结果图片Base64信息。
		ResultImage *string `json:"ResultImage,omitempty" name:"ResultImage"`

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

func NewTryLipstickPicResponse

func NewTryLipstickPicResponse() (response *TryLipstickPicResponse)

func (*TryLipstickPicResponse) FromJsonString

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

func (*TryLipstickPicResponse) ToJsonString

func (r *TryLipstickPicResponse) ToJsonString() string

Jump to

Keyboard shortcuts

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