 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- Constants
- type BeautifyPicRequest
- type BeautifyPicResponse
- type Client
- func (c *Client) BeautifyPic(request *BeautifyPicRequest) (response *BeautifyPicResponse, err error)
- func (c *Client) CreateModel(request *CreateModelRequest) (response *CreateModelResponse, err error)
- func (c *Client) DeleteModel(request *DeleteModelRequest) (response *DeleteModelResponse, err error)
- func (c *Client) GetModelList(request *GetModelListRequest) (response *GetModelListResponse, err error)
- func (c *Client) TryLipstickPic(request *TryLipstickPicRequest) (response *TryLipstickPicResponse, err error)
 
- type CreateModelRequest
- type CreateModelResponse
- type DeleteModelRequest
- type DeleteModelResponse
- type FaceRect
- type GetModelListRequest
- type GetModelListResponse
- type LipColorInfo
- type ModelInfo
- type RGBAInfo
- type TryLipstickPicRequest
- type TryLipstickPicResponse
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 ¶
func NewClient ¶
func NewClient(credential *common.Credential, region string, clientProfile *profile.ClientProfile) (client *Client, err error)
func NewClientWithSecretId ¶
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 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"`
}
    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
 Click to show internal directories. 
   Click to hide internal directories.