@@ -1266,10 +1266,10 @@ func (s *CIService) GetQRcode(ctx context.Context, name string, cover int, opt *
12661266}
12671267
12681268type GetQRcodeResultV2 struct {
1269- XMLName xml.Name `xml:"Response"`
1270- CodeStatus int `xml:"CodeStatus,omitempty"`
1269+ XMLName xml.Name `xml:"Response"`
1270+ CodeStatus int `xml:"CodeStatus,omitempty"`
12711271 QRcodeInfo []QRcodeInfo `xml:"QRcodeInfo,omitempty"`
1272- ResultImage string `xml:"ResultImage,omitempty"`
1272+ ResultImage string `xml:"ResultImage,omitempty"`
12731273}
12741274
12751275// 二维码识别-下载时识别 https://cloud.tencent.com/document/product/436/54070
@@ -1831,6 +1831,37 @@ func (s *CIService) EffectPet(ctx context.Context, obj string) (*PetEffectResult
18311831 return & res , resp , err
18321832}
18331833
1834+ type PetDetectOption struct {
1835+ DetectUrl string `url:"detect-url,omitempty"`
1836+ }
1837+
1838+ type PetDetectResult struct {
1839+ XMLName xml.Name `xml:"Response"`
1840+ ResultInfo []struct {
1841+ Score int `xml:"Score,omitempty"`
1842+ Name string `xml:"Name,omitempty"`
1843+ Location struct {
1844+ X int `xml:"X,omitempty"`
1845+ Y int `xml:"Y,omitempty"`
1846+ Height int `xml:"Height,omitempty"`
1847+ Width int `xml:"Width,omitempty"`
1848+ } `xml:"Location,omitempty"`
1849+ } `xml:"ResultInfo,omitempty"`
1850+ }
1851+
1852+ func (s * CIService ) DetectPet (ctx context.Context , obj string , opt * PetDetectOption ) (* PetDetectResult , * Response , error ) {
1853+ var res PetDetectResult
1854+ sendOpt := & sendOptions {
1855+ baseURL : s .client .BaseURL .BucketURL ,
1856+ method : http .MethodGet ,
1857+ uri : "/" + encodeURIComponent (obj ) + "?ci-process=detect-pet" ,
1858+ result : & res ,
1859+ optQuery : opt ,
1860+ }
1861+ resp , err := s .client .send (ctx , sendOpt )
1862+ return & res , resp , err
1863+ }
1864+
18341865type AILicenseRecOptions struct {
18351866 DetectUrl string `url:"detect-url,omitempty"`
18361867 CardType string `url:"CardType,omitempty"`
@@ -2296,6 +2327,23 @@ func (s *CIService) GetAIImageColoring(ctx context.Context, name string) (*Respo
22962327 return resp , err
22972328}
22982329
2330+ // AIImageColoringOptions TODO
2331+ type AIImageColoringOptions struct {
2332+ DetectUrl string `url:"detect-url,omitempty"`
2333+ }
2334+
2335+ func (s * CIService ) GetAIImageColoringV2 (ctx context.Context , name string , opt * AIImageColoringOptions ) (* Response , error ) {
2336+ sendOpt := sendOptions {
2337+ baseURL : s .client .BaseURL .BucketURL ,
2338+ uri : "/" + encodeURIComponent (name ) + "?ci-process=AIImageColoring" ,
2339+ method : http .MethodGet ,
2340+ optQuery : opt ,
2341+ disableCloseBody : true ,
2342+ }
2343+ resp , err := s .client .send (ctx , & sendOpt )
2344+ return resp , err
2345+ }
2346+
22992347// GetAISuperResolution https://cloud.tencent.com/document/product/460/83793
23002348func (s * CIService ) GetAISuperResolution (ctx context.Context , name string ) (* Response , error ) {
23012349 sendOpt := sendOptions {
@@ -2308,6 +2356,24 @@ func (s *CIService) GetAISuperResolution(ctx context.Context, name string) (*Res
23082356 return resp , err
23092357}
23102358
2359+ // AIImageColoringOptions TODO
2360+ type AISuperResolutionOptions struct {
2361+ DetectUrl string `url:"detect-url,omitempty"`
2362+ }
2363+
2364+ // GetAISuperResolution https://cloud.tencent.com/document/product/460/83793
2365+ func (s * CIService ) GetAISuperResolutionV2 (ctx context.Context , name string , opt * AISuperResolutionOptions ) (* Response , error ) {
2366+ sendOpt := sendOptions {
2367+ baseURL : s .client .BaseURL .BucketURL ,
2368+ uri : "/" + encodeURIComponent (name ) + "?ci-process=AISuperResolution" ,
2369+ method : http .MethodGet ,
2370+ optQuery : opt ,
2371+ disableCloseBody : true ,
2372+ }
2373+ resp , err := s .client .send (ctx , & sendOpt )
2374+ return resp , err
2375+ }
2376+
23112377// GetAIEnhanceImage https://cloud.tencent.com/document/product/460/83792
23122378func (s * CIService ) GetAIEnhanceImage (ctx context.Context , name string ) (* Response , error ) {
23132379 sendOpt := sendOptions {
@@ -2320,6 +2386,27 @@ func (s *CIService) GetAIEnhanceImage(ctx context.Context, name string) (*Respon
23202386 return resp , err
23212387}
23222388
2389+ // AIEnhanceImageOptions 图像增强选项
2390+ type AIEnhanceImageOptions struct {
2391+ DetectUrl string `url:"detect-url,omitempty"`
2392+ Senoise int `url:"denoise,omitempty"`
2393+ Sharpen int `url:"sharpen,omitempty"`
2394+ IgnoreError int `url:"ignore-error,omitempty"`
2395+ }
2396+
2397+ // GetAIEnhanceImage https://cloud.tencent.com/document/product/460/83792
2398+ func (s * CIService ) GetAIEnhanceImageV2 (ctx context.Context , name string , opt * AIEnhanceImageOptions ) (* Response , error ) {
2399+ sendOpt := sendOptions {
2400+ baseURL : s .client .BaseURL .BucketURL ,
2401+ uri : "/" + encodeURIComponent (name ) + "?ci-process=AIEnhanceImage" ,
2402+ method : http .MethodGet ,
2403+ optQuery : opt ,
2404+ disableCloseBody : true ,
2405+ }
2406+ resp , err := s .client .send (ctx , & sendOpt )
2407+ return resp , err
2408+ }
2409+
23232410// AIImageCropOptions 图像智能裁剪选项
23242411type AIImageCropOptions struct {
23252412 DetectUrl string `url:"detect-url,omitempty"`
@@ -2374,8 +2461,9 @@ func (s *CIService) GetAutoTranslationBlock(ctx context.Context, opt *AutoTransl
23742461
23752462// ImageRepairOptions 图像修复选项
23762463type ImageRepairOptions struct {
2377- MaskPic string `url:"MaskPic,omitempty"`
2378- MaskPoly string `url:"MaskPoly,omitempty"`
2464+ DetectUrl string `url:"detect-url,omitempty"`
2465+ MaskPic string `url:"MaskPic,omitempty"`
2466+ MaskPoly string `url:"MaskPoly,omitempty"`
23792467}
23802468
23812469// GetImageRepair https://cloud.tencent.com/document/product/460/79042
@@ -2462,3 +2550,30 @@ func (s *CIService) TDCRefresh(ctx context.Context, name string) (*Response, err
24622550 resp , err := s .client .send (ctx , & sendOpt )
24632551 return resp , err
24642552}
2553+
2554+ type AIGameRecOptions struct {
2555+ DetectUrl string `url:"detect-url,omitempty"`
2556+ }
2557+
2558+ type AIGameRecResult struct {
2559+ XMLName xml.Name `xml:"RecognitionResult"`
2560+ GameLabels * struct {
2561+ Confidence int `xml:"Confidence,omitempty"`
2562+ FirstCategory string `xml:"FirstCategory,omitempty"`
2563+ SecondCategory string `xml:"SecondCategory,omitempty"`
2564+ GameName string `xml:"GameName,omitempty"`
2565+ } `xml:"GameLabels,omitempty"`
2566+ }
2567+
2568+ func (s * CIService ) AIGameRec (ctx context.Context , obj string , opt * AIGameRecOptions ) (* AIGameRecResult , * Response , error ) {
2569+ var res AIGameRecResult
2570+ sendOpt := & sendOptions {
2571+ baseURL : s .client .BaseURL .BucketURL ,
2572+ method : http .MethodGet ,
2573+ uri : "/" + encodeURIComponent (obj ) + "?ci-process=AIGameRec" ,
2574+ optQuery : opt ,
2575+ result : & res ,
2576+ }
2577+ resp , err := s .client .send (ctx , sendOpt )
2578+ return & res , resp , err
2579+ }
0 commit comments