tencentcloud-sdk-tiia 1.0.200

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: c7b21bb8ba7304d4980a77ed09ba77346f805089
4
+ data.tar.gz: b4acee81b1fdcf506570ccf9e8b530e7eb14089d
5
+ SHA512:
6
+ metadata.gz: d668eda9a45ca3ea397da536a16ab7fadcd7bee3e15012d87fe103a06bfb708ac15271b1ecdf44282f1570f37adb6dbabf5abd4d624802bf94f0998f8cae8caf
7
+ data.tar.gz: a7354a4b9aa7aae4d205a3d608a776876a2c20a5f91904cb3dade9988395bd1f1b652a8bc3415de5f0b0dbb0f2a75073ceea5cf30589d553362d49dbd328c6e8
data/lib/VERSION ADDED
@@ -0,0 +1 @@
1
+ 1.0.200
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'tencentcloud-sdk-common'
4
+
5
+ require_relative 'v20190529/client'
6
+ require_relative 'v20190529/models'
7
+
8
+ module TencentCloud
9
+ module Tiia
10
+ end
11
+ end
@@ -0,0 +1,500 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ require 'json'
18
+
19
+ module TencentCloud
20
+ module Tiia
21
+ module V20190529
22
+ class Client < TencentCloud::Common::AbstractClient
23
+
24
+ def initialize(credential, region, profile = nil)
25
+ api_version = '2019-05-29'
26
+ api_endpoint = 'tiia.tencentcloudapi.com'
27
+ sdk_version = 'TIIA_' + File.read(File.expand_path('../VERSION', __dir__)).strip
28
+ super(credential, region, api_version, api_endpoint, sdk_version, profile)
29
+ end
30
+
31
+
32
+ # 评估输入图片在视觉上的质量,从多个方面评估,并同时给出综合的、客观的清晰度评分,和主观的美观度评分。
33
+ # >
34
+ # - 公共参数中的签名方式必须指定为V3版本,即配置SignatureMethod参数为TC3-HMAC-SHA256。
35
+
36
+ # @param request: Request instance for AssessQuality.
37
+ # @type request: :class:`Tencentcloud::tiia::V20190529::AssessQualityRequest`
38
+ # @rtype: :class:`Tencentcloud::tiia::V20190529::AssessQualityResponse`
39
+ def AssessQuality(request)
40
+ body = send_request('AssessQuality', request.serialize)
41
+ response = JSON.parse(body)
42
+ if response['Response'].key?('Error') == false
43
+ model = AssessQualityResponse.new
44
+ model.deserialize(response['Response'])
45
+ model
46
+ else
47
+ code = response['Response']['Error']['Code']
48
+ message = response['Response']['Error']['Message']
49
+ reqid = response['Response']['RequestId']
50
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
51
+ end
52
+ rescue TencentCloud::Common::TencentCloudSDKException => e
53
+ raise e
54
+ rescue StandardError => e
55
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
56
+ end
57
+
58
+ # 用于创建一个空的图片库,如果图片库已存在则返回错误。
59
+
60
+ # @param request: Request instance for CreateGroup.
61
+ # @type request: :class:`Tencentcloud::tiia::V20190529::CreateGroupRequest`
62
+ # @rtype: :class:`Tencentcloud::tiia::V20190529::CreateGroupResponse`
63
+ def CreateGroup(request)
64
+ body = send_request('CreateGroup', request.serialize)
65
+ response = JSON.parse(body)
66
+ if response['Response'].key?('Error') == false
67
+ model = CreateGroupResponse.new
68
+ model.deserialize(response['Response'])
69
+ model
70
+ else
71
+ code = response['Response']['Error']['Code']
72
+ message = response['Response']['Error']['Message']
73
+ reqid = response['Response']['RequestId']
74
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
75
+ end
76
+ rescue TencentCloud::Common::TencentCloudSDKException => e
77
+ raise e
78
+ rescue StandardError => e
79
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
80
+ end
81
+
82
+ # 创建图片,并添加对应图片的自定义信息。
83
+
84
+ # @param request: Request instance for CreateImage.
85
+ # @type request: :class:`Tencentcloud::tiia::V20190529::CreateImageRequest`
86
+ # @rtype: :class:`Tencentcloud::tiia::V20190529::CreateImageResponse`
87
+ def CreateImage(request)
88
+ body = send_request('CreateImage', request.serialize)
89
+ response = JSON.parse(body)
90
+ if response['Response'].key?('Error') == false
91
+ model = CreateImageResponse.new
92
+ model.deserialize(response['Response'])
93
+ model
94
+ else
95
+ code = response['Response']['Error']['Code']
96
+ message = response['Response']['Error']['Message']
97
+ reqid = response['Response']['RequestId']
98
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
99
+ end
100
+ rescue TencentCloud::Common::TencentCloudSDKException => e
101
+ raise e
102
+ rescue StandardError => e
103
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
104
+ end
105
+
106
+ # 根据输入的裁剪比例,智能判断一张图片的最佳裁剪区域,确保原图的主体区域不受影响。
107
+
108
+ # 可以自动裁剪图片,适应不同平台、设备的展示要求,避免简单拉伸带来的变形。
109
+ # >
110
+ # - 公共参数中的签名方式必须指定为V3版本,即配置SignatureMethod参数为TC3-HMAC-SHA256。
111
+
112
+ # @param request: Request instance for CropImage.
113
+ # @type request: :class:`Tencentcloud::tiia::V20190529::CropImageRequest`
114
+ # @rtype: :class:`Tencentcloud::tiia::V20190529::CropImageResponse`
115
+ def CropImage(request)
116
+ body = send_request('CropImage', request.serialize)
117
+ response = JSON.parse(body)
118
+ if response['Response'].key?('Error') == false
119
+ model = CropImageResponse.new
120
+ model.deserialize(response['Response'])
121
+ model
122
+ else
123
+ code = response['Response']['Error']['Code']
124
+ message = response['Response']['Error']['Message']
125
+ reqid = response['Response']['RequestId']
126
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
127
+ end
128
+ rescue TencentCloud::Common::TencentCloudSDKException => e
129
+ raise e
130
+ rescue StandardError => e
131
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
132
+ end
133
+
134
+ # 删除图片。
135
+
136
+ # @param request: Request instance for DeleteImages.
137
+ # @type request: :class:`Tencentcloud::tiia::V20190529::DeleteImagesRequest`
138
+ # @rtype: :class:`Tencentcloud::tiia::V20190529::DeleteImagesResponse`
139
+ def DeleteImages(request)
140
+ body = send_request('DeleteImages', request.serialize)
141
+ response = JSON.parse(body)
142
+ if response['Response'].key?('Error') == false
143
+ model = DeleteImagesResponse.new
144
+ model.deserialize(response['Response'])
145
+ model
146
+ else
147
+ code = response['Response']['Error']['Code']
148
+ message = response['Response']['Error']['Message']
149
+ reqid = response['Response']['RequestId']
150
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
151
+ end
152
+ rescue TencentCloud::Common::TencentCloudSDKException => e
153
+ raise e
154
+ rescue StandardError => e
155
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
156
+ end
157
+
158
+ # 查询所有的图库信息。
159
+
160
+ # @param request: Request instance for DescribeGroups.
161
+ # @type request: :class:`Tencentcloud::tiia::V20190529::DescribeGroupsRequest`
162
+ # @rtype: :class:`Tencentcloud::tiia::V20190529::DescribeGroupsResponse`
163
+ def DescribeGroups(request)
164
+ body = send_request('DescribeGroups', request.serialize)
165
+ response = JSON.parse(body)
166
+ if response['Response'].key?('Error') == false
167
+ model = DescribeGroupsResponse.new
168
+ model.deserialize(response['Response'])
169
+ model
170
+ else
171
+ code = response['Response']['Error']['Code']
172
+ message = response['Response']['Error']['Message']
173
+ reqid = response['Response']['RequestId']
174
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
175
+ end
176
+ rescue TencentCloud::Common::TencentCloudSDKException => e
177
+ raise e
178
+ rescue StandardError => e
179
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
180
+ end
181
+
182
+ # 获取指定图片库中的图片列表。
183
+
184
+ # @param request: Request instance for DescribeImages.
185
+ # @type request: :class:`Tencentcloud::tiia::V20190529::DescribeImagesRequest`
186
+ # @rtype: :class:`Tencentcloud::tiia::V20190529::DescribeImagesResponse`
187
+ def DescribeImages(request)
188
+ body = send_request('DescribeImages', request.serialize)
189
+ response = JSON.parse(body)
190
+ if response['Response'].key?('Error') == false
191
+ model = DescribeImagesResponse.new
192
+ model.deserialize(response['Response'])
193
+ model
194
+ else
195
+ code = response['Response']['Error']['Code']
196
+ message = response['Response']['Error']['Message']
197
+ reqid = response['Response']['RequestId']
198
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
199
+ end
200
+ rescue TencentCloud::Common::TencentCloudSDKException => e
201
+ raise e
202
+ rescue StandardError => e
203
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
204
+ end
205
+
206
+ # 传入一张图片,可以识别图片中包含的人物是否为公众人物,如果是,输出人物的姓名、基本信息、脸部坐标。
207
+
208
+ # 支持识别一张图片中存在的多个人脸,针对每个人脸,会给出与之最相似的公众人物。
209
+ # >
210
+ # - 公共参数中的签名方式必须指定为V3版本,即配置SignatureMethod参数为TC3-HMAC-SHA256。
211
+
212
+ # @param request: Request instance for DetectCelebrity.
213
+ # @type request: :class:`Tencentcloud::tiia::V20190529::DetectCelebrityRequest`
214
+ # @rtype: :class:`Tencentcloud::tiia::V20190529::DetectCelebrityResponse`
215
+ def DetectCelebrity(request)
216
+ body = send_request('DetectCelebrity', request.serialize)
217
+ response = JSON.parse(body)
218
+ if response['Response'].key?('Error') == false
219
+ model = DetectCelebrityResponse.new
220
+ model.deserialize(response['Response'])
221
+ model
222
+ else
223
+ code = response['Response']['Error']['Code']
224
+ message = response['Response']['Error']['Message']
225
+ reqid = response['Response']['RequestId']
226
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
227
+ end
228
+ rescue TencentCloud::Common::TencentCloudSDKException => e
229
+ raise e
230
+ rescue StandardError => e
231
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
232
+ end
233
+
234
+ # 输入一张图片,返回AI针对一张图片是否是恶心的一系列判断值。
235
+
236
+ # 通过恶心图片识别, 可以判断一张图片是否令人恶心, 同时给出它属于的潜在类别, 让您能够过滤掉使人不愉快的图片。
237
+ # >
238
+ # - 公共参数中的签名方式必须指定为V3版本,即配置SignatureMethod参数为TC3-HMAC-SHA256。
239
+
240
+ # @param request: Request instance for DetectDisgust.
241
+ # @type request: :class:`Tencentcloud::tiia::V20190529::DetectDisgustRequest`
242
+ # @rtype: :class:`Tencentcloud::tiia::V20190529::DetectDisgustResponse`
243
+ def DetectDisgust(request)
244
+ body = send_request('DetectDisgust', request.serialize)
245
+ response = JSON.parse(body)
246
+ if response['Response'].key?('Error') == false
247
+ model = DetectDisgustResponse.new
248
+ model.deserialize(response['Response'])
249
+ model
250
+ else
251
+ code = response['Response']['Error']['Code']
252
+ message = response['Response']['Error']['Message']
253
+ reqid = response['Response']['RequestId']
254
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
255
+ end
256
+ rescue TencentCloud::Common::TencentCloudSDKException => e
257
+ raise e
258
+ rescue StandardError => e
259
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
260
+ end
261
+
262
+ # 图像标签利用深度学习技术、海量训练数据,可以对图片进行智能分类、物体识别等。
263
+
264
+ # 目前支持8个大类、六十多个子类、数千个标签。涵盖各种日常场景、动植物、物品、美食、卡证等。具体分类请见[图像分析常见问题功能与限制相关](https://cloud.tencent.com/document/product/865/39164)。
265
+
266
+ # 图像标签提供四个版本供选择:
267
+
268
+ # • 摄像头版:针对搜索、手机摄像头照片进行优化,涵盖大量卡证、日常物品、二维码条形码。
269
+
270
+ # • 相册版:针对手机相册、网盘进行优化,去除相册和网盘中不常见的标签,针对相册常见图片类型(人像、日常活动、日常物品等)识别效果更好。
271
+
272
+ # • 网络版:针对网络图片进行优化,涵盖标签更多,满足长尾识别需求。
273
+
274
+ # • 新闻版:针对新闻、资讯、广电等行业进行优化,增加定制识别,支持万级图像标签。
275
+
276
+ # 每个产品的图像类型都有独特性,建议在接入初期,对四个版本进行对比评估后选择合适的版本使用。
277
+
278
+ # 为了方便使用、减少图片传输次数,图像标签包装成多合一接口,实际上是多个服务。
279
+
280
+ # 图像标签按照服务的实际使用数量进行收费。例如一张图片同时调用相册版、摄像头版两个服务,那么此次调用按照两次计费。
281
+ # >
282
+ # - 公共参数中的签名方式必须指定为V3版本,即配置SignatureMethod参数为TC3-HMAC-SHA256。
283
+
284
+ # @param request: Request instance for DetectLabel.
285
+ # @type request: :class:`Tencentcloud::tiia::V20190529::DetectLabelRequest`
286
+ # @rtype: :class:`Tencentcloud::tiia::V20190529::DetectLabelResponse`
287
+ def DetectLabel(request)
288
+ body = send_request('DetectLabel', request.serialize)
289
+ response = JSON.parse(body)
290
+ if response['Response'].key?('Error') == false
291
+ model = DetectLabelResponse.new
292
+ model.deserialize(response['Response'])
293
+ model
294
+ else
295
+ code = response['Response']['Error']['Code']
296
+ message = response['Response']['Error']['Message']
297
+ reqid = response['Response']['RequestId']
298
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
299
+ end
300
+ rescue TencentCloud::Common::TencentCloudSDKException => e
301
+ raise e
302
+ rescue StandardError => e
303
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
304
+ end
305
+
306
+ # 图像标签测试接口
307
+
308
+ # >
309
+ # - 公共参数中的签名方式必须指定为V3版本,即配置SignatureMethod参数为TC3-HMAC-SHA256。
310
+
311
+ # @param request: Request instance for DetectLabelBeta.
312
+ # @type request: :class:`Tencentcloud::tiia::V20190529::DetectLabelBetaRequest`
313
+ # @rtype: :class:`Tencentcloud::tiia::V20190529::DetectLabelBetaResponse`
314
+ def DetectLabelBeta(request)
315
+ body = send_request('DetectLabelBeta', request.serialize)
316
+ response = JSON.parse(body)
317
+ if response['Response'].key?('Error') == false
318
+ model = DetectLabelBetaResponse.new
319
+ model.deserialize(response['Response'])
320
+ model
321
+ else
322
+ code = response['Response']['Error']['Code']
323
+ message = response['Response']['Error']['Message']
324
+ reqid = response['Response']['RequestId']
325
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
326
+ end
327
+ rescue TencentCloud::Common::TencentCloudSDKException => e
328
+ raise e
329
+ rescue StandardError => e
330
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
331
+ end
332
+
333
+ # 可以识别输入的图片中是否包含不良行为,例如打架斗殴、赌博、抽烟等,可以应用于广告图、直播截图、短视频截图等审核,减少不良行为对平台内容质量的影响,维护健康向上的互联网环境。
334
+ # >
335
+ # - 公共参数中的签名方式必须指定为V3版本,即配置SignatureMethod参数为TC3-HMAC-SHA256。
336
+
337
+ # @param request: Request instance for DetectMisbehavior.
338
+ # @type request: :class:`Tencentcloud::tiia::V20190529::DetectMisbehaviorRequest`
339
+ # @rtype: :class:`Tencentcloud::tiia::V20190529::DetectMisbehaviorResponse`
340
+ def DetectMisbehavior(request)
341
+ body = send_request('DetectMisbehavior', request.serialize)
342
+ response = JSON.parse(body)
343
+ if response['Response'].key?('Error') == false
344
+ model = DetectMisbehaviorResponse.new
345
+ model.deserialize(response['Response'])
346
+ model
347
+ else
348
+ code = response['Response']['Error']['Code']
349
+ message = response['Response']['Error']['Message']
350
+ reqid = response['Response']['RequestId']
351
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
352
+ end
353
+ rescue TencentCloud::Common::TencentCloudSDKException => e
354
+ raise e
355
+ rescue StandardError => e
356
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
357
+ end
358
+
359
+ # 本接口支持识别图片中包含的商品,能够输出商品的品类名称、类别,还可以输出商品在图片中的位置。支持一张图片多个商品的识别。
360
+ # >
361
+ # - 公共参数中的签名方式必须指定为V3版本,即配置SignatureMethod参数为TC3-HMAC-SHA256。
362
+
363
+ # @param request: Request instance for DetectProduct.
364
+ # @type request: :class:`Tencentcloud::tiia::V20190529::DetectProductRequest`
365
+ # @rtype: :class:`Tencentcloud::tiia::V20190529::DetectProductResponse`
366
+ def DetectProduct(request)
367
+ body = send_request('DetectProduct', request.serialize)
368
+ response = JSON.parse(body)
369
+ if response['Response'].key?('Error') == false
370
+ model = DetectProductResponse.new
371
+ model.deserialize(response['Response'])
372
+ model
373
+ else
374
+ code = response['Response']['Error']['Code']
375
+ message = response['Response']['Error']['Message']
376
+ reqid = response['Response']['RequestId']
377
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
378
+ end
379
+ rescue TencentCloud::Common::TencentCloudSDKException => e
380
+ raise e
381
+ rescue StandardError => e
382
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
383
+ end
384
+
385
+ # 商品识别-微信识物版,基于人工智能技术、海量训练图片、亿级商品库,可以实现全覆盖、细粒度、高准确率的商品识别和商品推荐功能。
386
+ # 本服务可以识别出图片中的主体位置、主体商品类型,覆盖亿级SKU,输出具体商品的价格、型号等详细信息。
387
+ # 客户无需自建商品库,即可快速实现商品识别、拍照搜商品等功能。
388
+
389
+ # 目前“商品识别-微信识物版”为内测服务,需要申请、开通后方可使用。请在[服务开通申请表](https://cloud.tencent.com/apply/p/y1q2mnf0vdl) 中填写详细信息和需求,如果通过审核,我们将会在2个工作日内与您联系,并开通服务。
390
+ # 内测期间,本服务免费提供最高2QPS,收费模式和标准会在正式版上线前通过站内信、短信通知客户。如果需要提升并发,请与我们联系洽谈。
391
+
392
+ # 注意:本文档为内测版本,仅适用于功能体验和测试,正式业务接入请等待正式版。正式版的输入、输出可能会与内测版存在少量差异。
393
+ # >
394
+ # - 公共参数中的签名方式必须指定为V3版本,即配置SignatureMethod参数为TC3-HMAC-SHA256。
395
+
396
+ # @param request: Request instance for DetectProductBeta.
397
+ # @type request: :class:`Tencentcloud::tiia::V20190529::DetectProductBetaRequest`
398
+ # @rtype: :class:`Tencentcloud::tiia::V20190529::DetectProductBetaResponse`
399
+ def DetectProductBeta(request)
400
+ body = send_request('DetectProductBeta', request.serialize)
401
+ response = JSON.parse(body)
402
+ if response['Response'].key?('Error') == false
403
+ model = DetectProductBetaResponse.new
404
+ model.deserialize(response['Response'])
405
+ model
406
+ else
407
+ code = response['Response']['Error']['Code']
408
+ message = response['Response']['Error']['Message']
409
+ reqid = response['Response']['RequestId']
410
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
411
+ end
412
+ rescue TencentCloud::Common::TencentCloudSDKException => e
413
+ raise e
414
+ rescue StandardError => e
415
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
416
+ end
417
+
418
+ # 传入一张图片,输出清晰度提升后的图片。
419
+
420
+ # 可以消除图片有损压缩导致的噪声,和使用滤镜、拍摄失焦导致的模糊。让图片的边缘和细节更加清晰自然。
421
+ # >
422
+ # - 公共参数中的签名方式必须指定为V3版本,即配置SignatureMethod参数为TC3-HMAC-SHA256。
423
+
424
+ # @param request: Request instance for EnhanceImage.
425
+ # @type request: :class:`Tencentcloud::tiia::V20190529::EnhanceImageRequest`
426
+ # @rtype: :class:`Tencentcloud::tiia::V20190529::EnhanceImageResponse`
427
+ def EnhanceImage(request)
428
+ body = send_request('EnhanceImage', request.serialize)
429
+ response = JSON.parse(body)
430
+ if response['Response'].key?('Error') == false
431
+ model = EnhanceImageResponse.new
432
+ model.deserialize(response['Response'])
433
+ model
434
+ else
435
+ code = response['Response']['Error']['Code']
436
+ message = response['Response']['Error']['Message']
437
+ reqid = response['Response']['RequestId']
438
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
439
+ end
440
+ rescue TencentCloud::Common::TencentCloudSDKException => e
441
+ raise e
442
+ rescue StandardError => e
443
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
444
+ end
445
+
446
+ # 腾讯云车辆属性识别可对汽车车身及车辆属性进行检测与识别,目前支持11种车身颜色、20多种车型、300多种品牌、4000多种车系+年款的识别,同时支持对车辆的位置进行检测。如果图片中存在多辆车,会分别输出每辆车的车型和坐标。
447
+ # >
448
+ # - 公共参数中的签名方式必须指定为V3版本,即配置SignatureMethod参数为TC3-HMAC-SHA256。
449
+
450
+ # @param request: Request instance for RecognizeCar.
451
+ # @type request: :class:`Tencentcloud::tiia::V20190529::RecognizeCarRequest`
452
+ # @rtype: :class:`Tencentcloud::tiia::V20190529::RecognizeCarResponse`
453
+ def RecognizeCar(request)
454
+ body = send_request('RecognizeCar', request.serialize)
455
+ response = JSON.parse(body)
456
+ if response['Response'].key?('Error') == false
457
+ model = RecognizeCarResponse.new
458
+ model.deserialize(response['Response'])
459
+ model
460
+ else
461
+ code = response['Response']['Error']['Code']
462
+ message = response['Response']['Error']['Message']
463
+ reqid = response['Response']['RequestId']
464
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
465
+ end
466
+ rescue TencentCloud::Common::TencentCloudSDKException => e
467
+ raise e
468
+ rescue StandardError => e
469
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
470
+ end
471
+
472
+ # 本接口用于对一张待识别的商品图片,在指定图片库中检索出最相似的图片列表。
473
+
474
+ # @param request: Request instance for SearchImage.
475
+ # @type request: :class:`Tencentcloud::tiia::V20190529::SearchImageRequest`
476
+ # @rtype: :class:`Tencentcloud::tiia::V20190529::SearchImageResponse`
477
+ def SearchImage(request)
478
+ body = send_request('SearchImage', request.serialize)
479
+ response = JSON.parse(body)
480
+ if response['Response'].key?('Error') == false
481
+ model = SearchImageResponse.new
482
+ model.deserialize(response['Response'])
483
+ model
484
+ else
485
+ code = response['Response']['Error']['Code']
486
+ message = response['Response']['Error']['Message']
487
+ reqid = response['Response']['RequestId']
488
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
489
+ end
490
+ rescue TencentCloud::Common::TencentCloudSDKException => e
491
+ raise e
492
+ rescue StandardError => e
493
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
494
+ end
495
+
496
+
497
+ end
498
+ end
499
+ end
500
+ end