cloudmersive-image-recognition-api-client 2.0.4 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +26 -19
- data/cloudmersive-image-recognition-api-client.gemspec +1 -1
- data/docs/AgeDetectionResult.md +1 -1
- data/docs/AiImageDetectionApi.md +63 -0
- data/docs/ConvertApi.md +58 -3
- data/docs/FaceApi.md +4 -4
- data/docs/FineTextItem.md +1 -0
- data/docs/ImageAiDetectionResult.md +10 -0
- data/docs/ImageSimilarityComparisonResponse.md +10 -0
- data/docs/ImageSimilarityHashDistanceRequest.md +9 -0
- data/docs/ImageSimilarityHashDistanceResponse.md +9 -0
- data/docs/ImageSimilarityHashResponse.md +9 -0
- data/docs/NsfwAdvancedResult.md +19 -0
- data/docs/NsfwApi.md +169 -4
- data/docs/PersonWithAge.md +4 -1
- data/docs/RecognizeApi.md +124 -58
- data/docs/ResizeApi.md +55 -0
- data/docs/TextItem.md +1 -0
- data/lib/cloudmersive-image-recognition-api-client/api/ai_image_detection_api.rb +78 -0
- data/lib/cloudmersive-image-recognition-api-client/api/artistic_api.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/api/convert_api.rb +58 -3
- data/lib/cloudmersive-image-recognition-api-client/api/edit_api.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/api/face_api.rb +8 -8
- data/lib/cloudmersive-image-recognition-api-client/api/filter_api.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/api/info_api.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/api/nsfw_api.rb +170 -5
- data/lib/cloudmersive-image-recognition-api-client/api/recognize_api.rb +171 -104
- data/lib/cloudmersive-image-recognition-api-client/api/resize_api.rb +56 -1
- data/lib/cloudmersive-image-recognition-api-client/api/text_generation_api.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/api_client.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/api_error.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/configuration.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/age_detection_result.rb +3 -3
- data/lib/cloudmersive-image-recognition-api-client/models/color_result.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/create_handwriting_request.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/detected_license_plate.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/dominant_color_result.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/draw_polygon_instance.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/draw_polygon_request.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/draw_rectangle_instance.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/draw_rectangle_request.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/draw_text_instance.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/draw_text_request.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/face.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/face_compare_response.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/face_locate_response.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/face_locate_with_landmarks_response.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/face_match.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/face_point.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/face_with_landmarks.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/find_symbol_result.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/fine_text_detection_result.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/fine_text_item.rb +12 -2
- data/lib/cloudmersive-image-recognition-api-client/models/{person_with_gender.rb → image_ai_detection_result.rb} +25 -25
- data/lib/cloudmersive-image-recognition-api-client/models/image_description_response.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/image_metadata.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/image_metadata_exif_value.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/{detected_object.rb → image_similarity_comparison_response.rb} +25 -55
- data/lib/cloudmersive-image-recognition-api-client/models/image_similarity_hash_distance_request.rb +196 -0
- data/lib/cloudmersive-image-recognition-api-client/models/{object_detection_result.rb → image_similarity_hash_distance_response.rb} +12 -24
- data/lib/cloudmersive-image-recognition-api-client/models/{gender_detection_result.rb → image_similarity_hash_response.rb} +12 -24
- data/lib/cloudmersive-image-recognition-api-client/models/nsfw_advanced_result.rb +296 -0
- data/lib/cloudmersive-image-recognition-api-client/models/nsfw_result.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/person_with_age.rb +36 -5
- data/lib/cloudmersive-image-recognition-api-client/models/polygon_point.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/recognition_outcome.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/text_detection_result.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/text_item.rb +12 -2
- data/lib/cloudmersive-image-recognition-api-client/models/vehicle_license_plate_detection_result.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/version.rb +2 -2
- data/lib/cloudmersive-image-recognition-api-client.rb +8 -5
- data/spec/api/ai_image_detection_api_spec.rb +47 -0
- data/spec/api/artistic_api_spec.rb +1 -1
- data/spec/api/convert_api_spec.rb +14 -2
- data/spec/api/edit_api_spec.rb +1 -1
- data/spec/api/face_api_spec.rb +4 -4
- data/spec/api/filter_api_spec.rb +1 -1
- data/spec/api/info_api_spec.rb +1 -1
- data/spec/api/nsfw_api_spec.rb +39 -3
- data/spec/api/recognize_api_spec.rb +40 -25
- data/spec/api/resize_api_spec.rb +13 -1
- data/spec/api/text_generation_api_spec.rb +1 -1
- data/spec/api_client_spec.rb +1 -1
- data/spec/configuration_spec.rb +1 -1
- data/spec/models/age_detection_result_spec.rb +1 -1
- data/spec/models/color_result_spec.rb +1 -1
- data/spec/models/create_handwriting_request_spec.rb +1 -1
- data/spec/models/detected_license_plate_spec.rb +1 -1
- data/spec/models/dominant_color_result_spec.rb +1 -1
- data/spec/models/draw_polygon_instance_spec.rb +1 -1
- data/spec/models/draw_polygon_request_spec.rb +1 -1
- data/spec/models/draw_rectangle_instance_spec.rb +1 -1
- data/spec/models/draw_rectangle_request_spec.rb +1 -1
- data/spec/models/draw_text_instance_spec.rb +1 -1
- data/spec/models/draw_text_request_spec.rb +1 -1
- data/spec/models/face_compare_response_spec.rb +1 -1
- data/spec/models/face_locate_response_spec.rb +1 -1
- data/spec/models/face_locate_with_landmarks_response_spec.rb +1 -1
- data/spec/models/face_match_spec.rb +1 -1
- data/spec/models/face_point_spec.rb +1 -1
- data/spec/models/face_spec.rb +1 -1
- data/spec/models/face_with_landmarks_spec.rb +1 -1
- data/spec/models/find_symbol_result_spec.rb +1 -1
- data/spec/models/fine_text_detection_result_spec.rb +1 -1
- data/spec/models/fine_text_item_spec.rb +7 -1
- data/spec/models/{person_with_gender_spec.rb → image_ai_detection_result_spec.rb} +10 -10
- data/spec/models/image_description_response_spec.rb +1 -1
- data/spec/models/image_metadata_exif_value_spec.rb +1 -1
- data/spec/models/image_metadata_spec.rb +1 -1
- data/spec/models/{gender_detection_result_spec.rb → image_similarity_comparison_response_spec.rb} +9 -9
- data/spec/models/image_similarity_hash_distance_request_spec.rb +47 -0
- data/spec/models/{object_detection_result_spec.rb → image_similarity_hash_distance_response_spec.rb} +8 -14
- data/spec/models/image_similarity_hash_response_spec.rb +47 -0
- data/spec/models/nsfw_advanced_result_spec.rb +107 -0
- data/spec/models/nsfw_result_spec.rb +1 -1
- data/spec/models/person_with_age_spec.rb +19 -1
- data/spec/models/polygon_point_spec.rb +1 -1
- data/spec/models/recognition_outcome_spec.rb +1 -1
- data/spec/models/text_detection_result_spec.rb +1 -1
- data/spec/models/text_item_spec.rb +7 -1
- data/spec/models/vehicle_license_plate_detection_result_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- metadata +39 -30
- data/docs/DetectedObject.md +0 -13
- data/docs/GenderDetectionResult.md +0 -10
- data/docs/ObjectDetectionResult.md +0 -10
- data/docs/PersonWithGender.md +0 -10
- data/spec/models/detected_object_spec.rb +0 -71
data/docs/RecognizeApi.md
CHANGED
|
@@ -6,12 +6,13 @@ Method | HTTP request | Description
|
|
|
6
6
|
------------- | ------------- | -------------
|
|
7
7
|
[**recognize_describe**](RecognizeApi.md#recognize_describe) | **POST** /image/recognize/describe | Describe an image in natural language
|
|
8
8
|
[**recognize_detect_and_unskew_document**](RecognizeApi.md#recognize_detect_and_unskew_document) | **POST** /image/recognize/detect-document/unskew | Detect and unskew a photo of a document
|
|
9
|
-
[**recognize_detect_objects**](RecognizeApi.md#recognize_detect_objects) | **POST** /image/recognize/detect-objects | Detect objects including types and locations in an image
|
|
10
|
-
[**recognize_detect_people**](RecognizeApi.md#recognize_detect_people) | **POST** /image/recognize/detect-people | Detect people including locations in an image
|
|
11
9
|
[**recognize_detect_text_fine**](RecognizeApi.md#recognize_detect_text_fine) | **POST** /image/recognize/detect-text/fine | Detect fine text in a photo of a document
|
|
12
10
|
[**recognize_detect_text_large**](RecognizeApi.md#recognize_detect_text_large) | **POST** /image/recognize/detect-text/large | Detect large text in a photo
|
|
13
11
|
[**recognize_detect_vehicle_license_plates**](RecognizeApi.md#recognize_detect_vehicle_license_plates) | **POST** /image/recognize/detect-vehicle-license-plates | Detect vehicle license plates in an image
|
|
14
12
|
[**recognize_find_symbol**](RecognizeApi.md#recognize_find_symbol) | **POST** /image/recognize/find/symbol | Find the location of a symbol in an image
|
|
13
|
+
[**recognize_similarity_compare**](RecognizeApi.md#recognize_similarity_compare) | **POST** /image/recognize/similarity/compare | Compare two images for similarity
|
|
14
|
+
[**recognize_similarity_hash**](RecognizeApi.md#recognize_similarity_hash) | **POST** /image/recognize/similarity/hash | Generate a perceptual image hash
|
|
15
|
+
[**recognize_similarity_hash_distance**](RecognizeApi.md#recognize_similarity_hash_distance) | **POST** /image/recognize/similarity/hash/distance | Calculates the similarity between two perceptual image hashes
|
|
15
16
|
|
|
16
17
|
|
|
17
18
|
# **recognize_describe**
|
|
@@ -126,12 +127,12 @@ Name | Type | Description | Notes
|
|
|
126
127
|
|
|
127
128
|
|
|
128
129
|
|
|
129
|
-
# **
|
|
130
|
-
>
|
|
130
|
+
# **recognize_detect_text_fine**
|
|
131
|
+
> FineTextDetectionResult recognize_detect_text_fine(image_file)
|
|
131
132
|
|
|
132
|
-
Detect
|
|
133
|
+
Detect fine text in a photo of a document
|
|
133
134
|
|
|
134
|
-
Identify the position, size
|
|
135
|
+
Identify the position, and size of small/fine text within a photograph of a document. Identify the location of small text in a photo - such as words and other forms of high density text. Can be used on a scan of a document or a photograph (e.g. smartphone camera) of a document, page or receipt. For OCR purposes - please see our Deep Learning OCR APIs.
|
|
135
136
|
|
|
136
137
|
### Example
|
|
137
138
|
```ruby
|
|
@@ -151,11 +152,11 @@ image_file = File.new('/path/to/file.txt') # File | Image file to perform the op
|
|
|
151
152
|
|
|
152
153
|
|
|
153
154
|
begin
|
|
154
|
-
#Detect
|
|
155
|
-
result = api_instance.
|
|
155
|
+
#Detect fine text in a photo of a document
|
|
156
|
+
result = api_instance.recognize_detect_text_fine(image_file)
|
|
156
157
|
p result
|
|
157
158
|
rescue CloudmersiveImageRecognitionApiClient::ApiError => e
|
|
158
|
-
puts "Exception when calling RecognizeApi->
|
|
159
|
+
puts "Exception when calling RecognizeApi->recognize_detect_text_fine: #{e}"
|
|
159
160
|
end
|
|
160
161
|
```
|
|
161
162
|
|
|
@@ -167,7 +168,7 @@ Name | Type | Description | Notes
|
|
|
167
168
|
|
|
168
169
|
### Return type
|
|
169
170
|
|
|
170
|
-
[**
|
|
171
|
+
[**FineTextDetectionResult**](FineTextDetectionResult.md)
|
|
171
172
|
|
|
172
173
|
### Authorization
|
|
173
174
|
|
|
@@ -180,12 +181,12 @@ Name | Type | Description | Notes
|
|
|
180
181
|
|
|
181
182
|
|
|
182
183
|
|
|
183
|
-
# **
|
|
184
|
-
>
|
|
184
|
+
# **recognize_detect_text_large**
|
|
185
|
+
> TextDetectionResult recognize_detect_text_large(image_file)
|
|
185
186
|
|
|
186
|
-
Detect
|
|
187
|
+
Detect large text in a photo
|
|
187
188
|
|
|
188
|
-
Identify the position, and size of
|
|
189
|
+
Identify the position, and size of large text within a photograph. Identify the location of large text in a photo - such as signs, titles, etc. and other forms of large, low-density text. Not suitable for high-density text (e.g. scans of documents, receipts, etc.) for OCR purposes - for OCR, please see our Deep Learning OCR APIs.
|
|
189
190
|
|
|
190
191
|
### Example
|
|
191
192
|
```ruby
|
|
@@ -205,11 +206,11 @@ image_file = File.new('/path/to/file.txt') # File | Image file to perform the op
|
|
|
205
206
|
|
|
206
207
|
|
|
207
208
|
begin
|
|
208
|
-
#Detect
|
|
209
|
-
result = api_instance.
|
|
209
|
+
#Detect large text in a photo
|
|
210
|
+
result = api_instance.recognize_detect_text_large(image_file)
|
|
210
211
|
p result
|
|
211
212
|
rescue CloudmersiveImageRecognitionApiClient::ApiError => e
|
|
212
|
-
puts "Exception when calling RecognizeApi->
|
|
213
|
+
puts "Exception when calling RecognizeApi->recognize_detect_text_large: #{e}"
|
|
213
214
|
end
|
|
214
215
|
```
|
|
215
216
|
|
|
@@ -221,7 +222,7 @@ Name | Type | Description | Notes
|
|
|
221
222
|
|
|
222
223
|
### Return type
|
|
223
224
|
|
|
224
|
-
[**
|
|
225
|
+
[**TextDetectionResult**](TextDetectionResult.md)
|
|
225
226
|
|
|
226
227
|
### Authorization
|
|
227
228
|
|
|
@@ -234,12 +235,12 @@ Name | Type | Description | Notes
|
|
|
234
235
|
|
|
235
236
|
|
|
236
237
|
|
|
237
|
-
# **
|
|
238
|
-
>
|
|
238
|
+
# **recognize_detect_vehicle_license_plates**
|
|
239
|
+
> VehicleLicensePlateDetectionResult recognize_detect_vehicle_license_plates(image_file)
|
|
239
240
|
|
|
240
|
-
Detect
|
|
241
|
+
Detect vehicle license plates in an image
|
|
241
242
|
|
|
242
|
-
Identify the position, and size
|
|
243
|
+
Identify the position, and size, and content of vehicle license plates in an image. License plates should be within 15-20 degrees on-axis to the camera. Supported image formats are JPG, PNG and BMP.
|
|
243
244
|
|
|
244
245
|
### Example
|
|
245
246
|
```ruby
|
|
@@ -259,11 +260,11 @@ image_file = File.new('/path/to/file.txt') # File | Image file to perform the op
|
|
|
259
260
|
|
|
260
261
|
|
|
261
262
|
begin
|
|
262
|
-
#Detect
|
|
263
|
-
result = api_instance.
|
|
263
|
+
#Detect vehicle license plates in an image
|
|
264
|
+
result = api_instance.recognize_detect_vehicle_license_plates(image_file)
|
|
264
265
|
p result
|
|
265
266
|
rescue CloudmersiveImageRecognitionApiClient::ApiError => e
|
|
266
|
-
puts "Exception when calling RecognizeApi->
|
|
267
|
+
puts "Exception when calling RecognizeApi->recognize_detect_vehicle_license_plates: #{e}"
|
|
267
268
|
end
|
|
268
269
|
```
|
|
269
270
|
|
|
@@ -275,7 +276,7 @@ Name | Type | Description | Notes
|
|
|
275
276
|
|
|
276
277
|
### Return type
|
|
277
278
|
|
|
278
|
-
[**
|
|
279
|
+
[**VehicleLicensePlateDetectionResult**](VehicleLicensePlateDetectionResult.md)
|
|
279
280
|
|
|
280
281
|
### Authorization
|
|
281
282
|
|
|
@@ -288,12 +289,12 @@ Name | Type | Description | Notes
|
|
|
288
289
|
|
|
289
290
|
|
|
290
291
|
|
|
291
|
-
# **
|
|
292
|
-
>
|
|
292
|
+
# **recognize_find_symbol**
|
|
293
|
+
> FindSymbolResult recognize_find_symbol(input_image, target_image)
|
|
293
294
|
|
|
294
|
-
|
|
295
|
+
Find the location of a symbol in an image
|
|
295
296
|
|
|
296
|
-
|
|
297
|
+
Determine if an image contains a symbol, and if so, the location of that symbol in the image.
|
|
297
298
|
|
|
298
299
|
### Example
|
|
299
300
|
```ruby
|
|
@@ -309,15 +310,17 @@ end
|
|
|
309
310
|
|
|
310
311
|
api_instance = CloudmersiveImageRecognitionApiClient::RecognizeApi.new
|
|
311
312
|
|
|
312
|
-
|
|
313
|
+
input_image = File.new('/path/to/file.txt') # File | Image file to search through for the target image.
|
|
314
|
+
|
|
315
|
+
target_image = File.new('/path/to/file.txt') # File | Image to find in the input image.
|
|
313
316
|
|
|
314
317
|
|
|
315
318
|
begin
|
|
316
|
-
#
|
|
317
|
-
result = api_instance.
|
|
319
|
+
#Find the location of a symbol in an image
|
|
320
|
+
result = api_instance.recognize_find_symbol(input_image, target_image)
|
|
318
321
|
p result
|
|
319
322
|
rescue CloudmersiveImageRecognitionApiClient::ApiError => e
|
|
320
|
-
puts "Exception when calling RecognizeApi->
|
|
323
|
+
puts "Exception when calling RecognizeApi->recognize_find_symbol: #{e}"
|
|
321
324
|
end
|
|
322
325
|
```
|
|
323
326
|
|
|
@@ -325,11 +328,12 @@ end
|
|
|
325
328
|
|
|
326
329
|
Name | Type | Description | Notes
|
|
327
330
|
------------- | ------------- | ------------- | -------------
|
|
328
|
-
**
|
|
331
|
+
**input_image** | **File**| Image file to search through for the target image. |
|
|
332
|
+
**target_image** | **File**| Image to find in the input image. |
|
|
329
333
|
|
|
330
334
|
### Return type
|
|
331
335
|
|
|
332
|
-
[**
|
|
336
|
+
[**FindSymbolResult**](FindSymbolResult.md)
|
|
333
337
|
|
|
334
338
|
### Authorization
|
|
335
339
|
|
|
@@ -342,12 +346,73 @@ Name | Type | Description | Notes
|
|
|
342
346
|
|
|
343
347
|
|
|
344
348
|
|
|
345
|
-
# **
|
|
346
|
-
>
|
|
349
|
+
# **recognize_similarity_compare**
|
|
350
|
+
> String recognize_similarity_compare(base_image, comparison_image, opts)
|
|
347
351
|
|
|
348
|
-
|
|
352
|
+
Compare two images for similarity
|
|
349
353
|
|
|
350
|
-
|
|
354
|
+
Generates an image similarity score using Deep Learning between 0.0 and 1.0, values closer to 1.0 indicate greater similarity
|
|
355
|
+
|
|
356
|
+
### Example
|
|
357
|
+
```ruby
|
|
358
|
+
# load the gem
|
|
359
|
+
require 'cloudmersive-image-recognition-api-client'
|
|
360
|
+
# setup authorization
|
|
361
|
+
CloudmersiveImageRecognitionApiClient.configure do |config|
|
|
362
|
+
# Configure API key authorization: Apikey
|
|
363
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
|
364
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
365
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
|
366
|
+
end
|
|
367
|
+
|
|
368
|
+
api_instance = CloudmersiveImageRecognitionApiClient::RecognizeApi.new
|
|
369
|
+
|
|
370
|
+
base_image = File.new('/path/to/file.txt') # File | Image file to compare against. Common file formats such as PNG, JPEG are supported.
|
|
371
|
+
|
|
372
|
+
comparison_image = File.new('/path/to/file.txt') # File | Image to compare to the base image.
|
|
373
|
+
|
|
374
|
+
opts = {
|
|
375
|
+
recognition_mode: 'recognition_mode_example' # String | Optional, specify the recognition mode; possible values are Normal, Basic and Advanced. Default is Normal.
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
begin
|
|
379
|
+
#Compare two images for similarity
|
|
380
|
+
result = api_instance.recognize_similarity_compare(base_image, comparison_image, opts)
|
|
381
|
+
p result
|
|
382
|
+
rescue CloudmersiveImageRecognitionApiClient::ApiError => e
|
|
383
|
+
puts "Exception when calling RecognizeApi->recognize_similarity_compare: #{e}"
|
|
384
|
+
end
|
|
385
|
+
```
|
|
386
|
+
|
|
387
|
+
### Parameters
|
|
388
|
+
|
|
389
|
+
Name | Type | Description | Notes
|
|
390
|
+
------------- | ------------- | ------------- | -------------
|
|
391
|
+
**base_image** | **File**| Image file to compare against. Common file formats such as PNG, JPEG are supported. |
|
|
392
|
+
**comparison_image** | **File**| Image to compare to the base image. |
|
|
393
|
+
**recognition_mode** | **String**| Optional, specify the recognition mode; possible values are Normal, Basic and Advanced. Default is Normal. | [optional]
|
|
394
|
+
|
|
395
|
+
### Return type
|
|
396
|
+
|
|
397
|
+
**String**
|
|
398
|
+
|
|
399
|
+
### Authorization
|
|
400
|
+
|
|
401
|
+
[Apikey](../README.md#Apikey)
|
|
402
|
+
|
|
403
|
+
### HTTP request headers
|
|
404
|
+
|
|
405
|
+
- **Content-Type**: multipart/form-data
|
|
406
|
+
- **Accept**: application/json, text/json, application/xml, text/xml
|
|
407
|
+
|
|
408
|
+
|
|
409
|
+
|
|
410
|
+
# **recognize_similarity_hash**
|
|
411
|
+
> ImageSimilarityHashResponse recognize_similarity_hash(image_file, opts)
|
|
412
|
+
|
|
413
|
+
Generate a perceptual image hash
|
|
414
|
+
|
|
415
|
+
Generates a hash value for the image; hash values that are closer together in terms of Hamming Distance are more similar.
|
|
351
416
|
|
|
352
417
|
### Example
|
|
353
418
|
```ruby
|
|
@@ -365,13 +430,16 @@ api_instance = CloudmersiveImageRecognitionApiClient::RecognizeApi.new
|
|
|
365
430
|
|
|
366
431
|
image_file = File.new('/path/to/file.txt') # File | Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
|
367
432
|
|
|
433
|
+
opts = {
|
|
434
|
+
recognition_mode: 'recognition_mode_example' # String | Optional, specify the recognition mode; possible values are Normal, Basic and Advanced. Default is Normal.
|
|
435
|
+
}
|
|
368
436
|
|
|
369
437
|
begin
|
|
370
|
-
#
|
|
371
|
-
result = api_instance.
|
|
438
|
+
#Generate a perceptual image hash
|
|
439
|
+
result = api_instance.recognize_similarity_hash(image_file, opts)
|
|
372
440
|
p result
|
|
373
441
|
rescue CloudmersiveImageRecognitionApiClient::ApiError => e
|
|
374
|
-
puts "Exception when calling RecognizeApi->
|
|
442
|
+
puts "Exception when calling RecognizeApi->recognize_similarity_hash: #{e}"
|
|
375
443
|
end
|
|
376
444
|
```
|
|
377
445
|
|
|
@@ -380,10 +448,11 @@ end
|
|
|
380
448
|
Name | Type | Description | Notes
|
|
381
449
|
------------- | ------------- | ------------- | -------------
|
|
382
450
|
**image_file** | **File**| Image file to perform the operation on. Common file formats such as PNG, JPEG are supported. |
|
|
451
|
+
**recognition_mode** | **String**| Optional, specify the recognition mode; possible values are Normal, Basic and Advanced. Default is Normal. | [optional]
|
|
383
452
|
|
|
384
453
|
### Return type
|
|
385
454
|
|
|
386
|
-
[**
|
|
455
|
+
[**ImageSimilarityHashResponse**](ImageSimilarityHashResponse.md)
|
|
387
456
|
|
|
388
457
|
### Authorization
|
|
389
458
|
|
|
@@ -396,12 +465,12 @@ Name | Type | Description | Notes
|
|
|
396
465
|
|
|
397
466
|
|
|
398
467
|
|
|
399
|
-
# **
|
|
400
|
-
>
|
|
468
|
+
# **recognize_similarity_hash_distance**
|
|
469
|
+
> ImageSimilarityHashDistanceResponse recognize_similarity_hash_distance(request)
|
|
401
470
|
|
|
402
|
-
|
|
471
|
+
Calculates the similarity between two perceptual image hashes
|
|
403
472
|
|
|
404
|
-
|
|
473
|
+
Calculates the similarity between two perceptual image hashes by computing the Hamming Distance between them.
|
|
405
474
|
|
|
406
475
|
### Example
|
|
407
476
|
```ruby
|
|
@@ -417,17 +486,15 @@ end
|
|
|
417
486
|
|
|
418
487
|
api_instance = CloudmersiveImageRecognitionApiClient::RecognizeApi.new
|
|
419
488
|
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
target_image = File.new('/path/to/file.txt') # File | Image to find in the input image.
|
|
489
|
+
request = CloudmersiveImageRecognitionApiClient::ImageSimilarityHashDistanceRequest.new # ImageSimilarityHashDistanceRequest |
|
|
423
490
|
|
|
424
491
|
|
|
425
492
|
begin
|
|
426
|
-
#
|
|
427
|
-
result = api_instance.
|
|
493
|
+
#Calculates the similarity between two perceptual image hashes
|
|
494
|
+
result = api_instance.recognize_similarity_hash_distance(request)
|
|
428
495
|
p result
|
|
429
496
|
rescue CloudmersiveImageRecognitionApiClient::ApiError => e
|
|
430
|
-
puts "Exception when calling RecognizeApi->
|
|
497
|
+
puts "Exception when calling RecognizeApi->recognize_similarity_hash_distance: #{e}"
|
|
431
498
|
end
|
|
432
499
|
```
|
|
433
500
|
|
|
@@ -435,12 +502,11 @@ end
|
|
|
435
502
|
|
|
436
503
|
Name | Type | Description | Notes
|
|
437
504
|
------------- | ------------- | ------------- | -------------
|
|
438
|
-
**
|
|
439
|
-
**target_image** | **File**| Image to find in the input image. |
|
|
505
|
+
**request** | [**ImageSimilarityHashDistanceRequest**](ImageSimilarityHashDistanceRequest.md)| |
|
|
440
506
|
|
|
441
507
|
### Return type
|
|
442
508
|
|
|
443
|
-
[**
|
|
509
|
+
[**ImageSimilarityHashDistanceResponse**](ImageSimilarityHashDistanceResponse.md)
|
|
444
510
|
|
|
445
511
|
### Authorization
|
|
446
512
|
|
|
@@ -448,7 +514,7 @@ Name | Type | Description | Notes
|
|
|
448
514
|
|
|
449
515
|
### HTTP request headers
|
|
450
516
|
|
|
451
|
-
- **Content-Type**:
|
|
517
|
+
- **Content-Type**: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
|
|
452
518
|
- **Accept**: application/json, text/json, application/xml, text/xml
|
|
453
519
|
|
|
454
520
|
|
data/docs/ResizeApi.md
CHANGED
|
@@ -5,6 +5,7 @@ All URIs are relative to *https://api.cloudmersive.com*
|
|
|
5
5
|
Method | HTTP request | Description
|
|
6
6
|
------------- | ------------- | -------------
|
|
7
7
|
[**resize_post**](ResizeApi.md#resize_post) | **POST** /image/resize/preserveAspectRatio/{maxWidth}/{maxHeight} | Resize an image while preserving aspect ratio
|
|
8
|
+
[**resize_resize_ai_super_sampling**](ResizeApi.md#resize_resize_ai_super_sampling) | **POST** /image/resize/ai/target | Resize an image with AI super sampling
|
|
8
9
|
[**resize_resize_simple**](ResizeApi.md#resize_resize_simple) | **POST** /image/resize/target/{width}/{height} | Resize an image
|
|
9
10
|
|
|
10
11
|
|
|
@@ -68,6 +69,60 @@ Name | Type | Description | Notes
|
|
|
68
69
|
|
|
69
70
|
|
|
70
71
|
|
|
72
|
+
# **resize_resize_ai_super_sampling**
|
|
73
|
+
> String resize_resize_ai_super_sampling(image_file)
|
|
74
|
+
|
|
75
|
+
Resize an image with AI super sampling
|
|
76
|
+
|
|
77
|
+
Use AI super sampling to resize a small or low resolution image to twice the size. Input image should be PNG or JPG, and smaller than 200 x 200 pixels (larger images will be resized down). Consumes 20 API calls.
|
|
78
|
+
|
|
79
|
+
### Example
|
|
80
|
+
```ruby
|
|
81
|
+
# load the gem
|
|
82
|
+
require 'cloudmersive-image-recognition-api-client'
|
|
83
|
+
# setup authorization
|
|
84
|
+
CloudmersiveImageRecognitionApiClient.configure do |config|
|
|
85
|
+
# Configure API key authorization: Apikey
|
|
86
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
|
87
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
88
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
api_instance = CloudmersiveImageRecognitionApiClient::ResizeApi.new
|
|
92
|
+
|
|
93
|
+
image_file = File.new('/path/to/file.txt') # File | Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
begin
|
|
97
|
+
#Resize an image with AI super sampling
|
|
98
|
+
result = api_instance.resize_resize_ai_super_sampling(image_file)
|
|
99
|
+
p result
|
|
100
|
+
rescue CloudmersiveImageRecognitionApiClient::ApiError => e
|
|
101
|
+
puts "Exception when calling ResizeApi->resize_resize_ai_super_sampling: #{e}"
|
|
102
|
+
end
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### Parameters
|
|
106
|
+
|
|
107
|
+
Name | Type | Description | Notes
|
|
108
|
+
------------- | ------------- | ------------- | -------------
|
|
109
|
+
**image_file** | **File**| Image file to perform the operation on. Common file formats such as PNG, JPEG are supported. |
|
|
110
|
+
|
|
111
|
+
### Return type
|
|
112
|
+
|
|
113
|
+
**String**
|
|
114
|
+
|
|
115
|
+
### Authorization
|
|
116
|
+
|
|
117
|
+
[Apikey](../README.md#Apikey)
|
|
118
|
+
|
|
119
|
+
### HTTP request headers
|
|
120
|
+
|
|
121
|
+
- **Content-Type**: multipart/form-data
|
|
122
|
+
- **Accept**: application/octet-stream
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
71
126
|
# **resize_resize_simple**
|
|
72
127
|
> String resize_resize_simple(width, height, image_file)
|
|
73
128
|
|
data/docs/TextItem.md
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
## Properties
|
|
4
4
|
Name | Type | Description | Notes
|
|
5
5
|
------------ | ------------- | ------------- | -------------
|
|
6
|
+
**detected_text** | **String** | Text detected in the image | [optional]
|
|
6
7
|
**left_x** | **Integer** | Left X coordinate of the text location; 0 represents the left edge of the input image | [optional]
|
|
7
8
|
**top_y** | **Integer** | Top Y coordinate of the text location; 0 represents the top edge of the input image | [optional]
|
|
8
9
|
**width** | **Integer** | Width in pixels of the text item | [optional]
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#imageapi
|
|
3
|
+
|
|
4
|
+
#Image Recognition and Processing APIs let you use Artificial Intelligence and Machine Learning to recognize and process images, and also perform useful image modification operations.
|
|
5
|
+
|
|
6
|
+
OpenAPI spec version: v1
|
|
7
|
+
|
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
+
Swagger Codegen version: 2.4.14
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'uri'
|
|
14
|
+
|
|
15
|
+
module CloudmersiveImageRecognitionApiClient
|
|
16
|
+
class AiImageDetectionApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Detect if an input image was generated using AI
|
|
23
|
+
# Detects if the input image was generated using AI tools.
|
|
24
|
+
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @return [ImageAiDetectionResult]
|
|
27
|
+
def ai_image_detection_detect_file(image_file, opts = {})
|
|
28
|
+
data, _status_code, _headers = ai_image_detection_detect_file_with_http_info(image_file, opts)
|
|
29
|
+
data
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Detect if an input image was generated using AI
|
|
33
|
+
# Detects if the input image was generated using AI tools.
|
|
34
|
+
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
|
35
|
+
# @param [Hash] opts the optional parameters
|
|
36
|
+
# @return [Array<(ImageAiDetectionResult, Fixnum, Hash)>] ImageAiDetectionResult data, response status code and response headers
|
|
37
|
+
def ai_image_detection_detect_file_with_http_info(image_file, opts = {})
|
|
38
|
+
if @api_client.config.debugging
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: AiImageDetectionApi.ai_image_detection_detect_file ...'
|
|
40
|
+
end
|
|
41
|
+
# verify the required parameter 'image_file' is set
|
|
42
|
+
if @api_client.config.client_side_validation && image_file.nil?
|
|
43
|
+
fail ArgumentError, "Missing the required parameter 'image_file' when calling AiImageDetectionApi.ai_image_detection_detect_file"
|
|
44
|
+
end
|
|
45
|
+
# resource path
|
|
46
|
+
local_var_path = '/image/ai-detection/file'
|
|
47
|
+
|
|
48
|
+
# query parameters
|
|
49
|
+
query_params = {}
|
|
50
|
+
|
|
51
|
+
# header parameters
|
|
52
|
+
header_params = {}
|
|
53
|
+
# HTTP header 'Accept' (if needed)
|
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
|
|
55
|
+
# HTTP header 'Content-Type'
|
|
56
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
|
57
|
+
|
|
58
|
+
# form parameters
|
|
59
|
+
form_params = {}
|
|
60
|
+
form_params['imageFile'] = image_file
|
|
61
|
+
|
|
62
|
+
# http body (model)
|
|
63
|
+
post_body = nil
|
|
64
|
+
auth_names = ['Apikey']
|
|
65
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
66
|
+
:header_params => header_params,
|
|
67
|
+
:query_params => query_params,
|
|
68
|
+
:form_params => form_params,
|
|
69
|
+
:body => post_body,
|
|
70
|
+
:auth_names => auth_names,
|
|
71
|
+
:return_type => 'ImageAiDetectionResult')
|
|
72
|
+
if @api_client.config.debugging
|
|
73
|
+
@api_client.config.logger.debug "API called: AiImageDetectionApi#ai_image_detection_detect_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
74
|
+
end
|
|
75
|
+
return data, status_code, headers
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
end
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#imageapi
|
|
3
3
|
|
|
4
|
-
#Image Recognition and Processing APIs let you use Machine Learning to recognize and process images, and also perform useful image modification operations.
|
|
4
|
+
#Image Recognition and Processing APIs let you use Artificial Intelligence and Machine Learning to recognize and process images, and also perform useful image modification operations.
|
|
5
5
|
|
|
6
6
|
OpenAPI spec version: v1
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#imageapi
|
|
3
3
|
|
|
4
|
-
#Image Recognition and Processing APIs let you use Machine Learning to recognize and process images, and also perform useful image modification operations.
|
|
4
|
+
#Image Recognition and Processing APIs let you use Artificial Intelligence and Machine Learning to recognize and process images, and also perform useful image modification operations.
|
|
5
5
|
|
|
6
6
|
OpenAPI spec version: v1
|
|
7
7
|
|
|
@@ -129,7 +129,7 @@ module CloudmersiveImageRecognitionApiClient
|
|
|
129
129
|
end
|
|
130
130
|
return data, status_code, headers
|
|
131
131
|
end
|
|
132
|
-
# Convert input image to JPG, JPEG format
|
|
132
|
+
# Convert input image to JPG, JPEG format at specific quality
|
|
133
133
|
# Converts the input image into JPEG/JPG format. Customize encoding parameters. Supported input file formats include AAI, ART, ARW, AVS, BPG, BMP, BMP2, BMP3, BRF, CALS, CGM, CIN, CMYK, CMYKA, CR2, CRW, CUR, CUT, DCM, DCR, DCX, DDS, DIB, DJVU, DNG, DOT, DPX, EMF, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EXR, FAX, FIG, FITS, FPX, GIF, GPLT, GRAY, HDR, HEIC, HPGL, HRZ, ICO, ISOBRL, ISBRL6, JBIG, JNG, JP2, JPT, J2C, J2K, JPEG/JPG, JXR, MAT, MONO, MNG, M2V, MRW, MTV, NEF, ORF, OTB, P7, PALM, PAM, PBM, PCD, PCDS, PCL, PCX, PDF, PEF, PES, PFA, PFB, PFM, PGM, PICON, PICT, PIX, PNG, PNG8, PNG00, PNG24, PNG32, PNG48, PNG64, PNM, PPM, PSB, PSD, PTIF, PWB, RAD, RAF, RGB, RGBA, RGF, RLA, RLE, SCT, SFW, SGI, SID, SUN, SVG, TGA, TIFF, TIM, UIL, VIFF, VICAR, VBMP, WDP, WEBP, WPG, X, XBM, XCF, XPM, XWD, X3F, YCbCr, YCbCrA, YUV.
|
|
134
134
|
# @param quality Set the JPEG quality level; lowest quality is 1 (highest compression), highest quality (lowest compression) is 100; recommended value is 75
|
|
135
135
|
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
|
@@ -140,7 +140,7 @@ module CloudmersiveImageRecognitionApiClient
|
|
|
140
140
|
data
|
|
141
141
|
end
|
|
142
142
|
|
|
143
|
-
# Convert input image to JPG, JPEG format
|
|
143
|
+
# Convert input image to JPG, JPEG format at specific quality
|
|
144
144
|
# Converts the input image into JPEG/JPG format. Customize encoding parameters. Supported input file formats include AAI, ART, ARW, AVS, BPG, BMP, BMP2, BMP3, BRF, CALS, CGM, CIN, CMYK, CMYKA, CR2, CRW, CUR, CUT, DCM, DCR, DCX, DDS, DIB, DJVU, DNG, DOT, DPX, EMF, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EXR, FAX, FIG, FITS, FPX, GIF, GPLT, GRAY, HDR, HEIC, HPGL, HRZ, ICO, ISOBRL, ISBRL6, JBIG, JNG, JP2, JPT, J2C, J2K, JPEG/JPG, JXR, MAT, MONO, MNG, M2V, MRW, MTV, NEF, ORF, OTB, P7, PALM, PAM, PBM, PCD, PCDS, PCL, PCX, PDF, PEF, PES, PFA, PFB, PFM, PGM, PICON, PICT, PIX, PNG, PNG8, PNG00, PNG24, PNG32, PNG48, PNG64, PNM, PPM, PSB, PSD, PTIF, PWB, RAD, RAF, RGB, RGBA, RGF, RLA, RLE, SCT, SFW, SGI, SID, SUN, SVG, TGA, TIFF, TIM, UIL, VIFF, VICAR, VBMP, WDP, WEBP, WPG, X, XBM, XCF, XPM, XWD, X3F, YCbCr, YCbCrA, YUV.
|
|
145
145
|
# @param quality Set the JPEG quality level; lowest quality is 1 (highest compression), highest quality (lowest compression) is 100; recommended value is 75
|
|
146
146
|
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
|
@@ -190,6 +190,61 @@ module CloudmersiveImageRecognitionApiClient
|
|
|
190
190
|
end
|
|
191
191
|
return data, status_code, headers
|
|
192
192
|
end
|
|
193
|
+
# Convert input image to JPG, JPEG format
|
|
194
|
+
# Converts the input image into JPEG/JPG format. Customize encoding parameters. Supported input file formats include AAI, ART, ARW, AVS, BPG, BMP, BMP2, BMP3, BRF, CALS, CGM, CIN, CMYK, CMYKA, CR2, CRW, CUR, CUT, DCM, DCR, DCX, DDS, DIB, DJVU, DNG, DOT, DPX, EMF, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EXR, FAX, FIG, FITS, FPX, GIF, GPLT, GRAY, HDR, HEIC, HPGL, HRZ, ICO, ISOBRL, ISBRL6, JBIG, JNG, JP2, JPT, J2C, J2K, JPEG/JPG, JXR, MAT, MONO, MNG, M2V, MRW, MTV, NEF, ORF, OTB, P7, PALM, PAM, PBM, PCD, PCDS, PCL, PCX, PDF, PEF, PES, PFA, PFB, PFM, PGM, PICON, PICT, PIX, PNG, PNG8, PNG00, PNG24, PNG32, PNG48, PNG64, PNM, PPM, PSB, PSD, PTIF, PWB, RAD, RAF, RGB, RGBA, RGF, RLA, RLE, SCT, SFW, SGI, SID, SUN, SVG, TGA, TIFF, TIM, UIL, VIFF, VICAR, VBMP, WDP, WEBP, WPG, X, XBM, XCF, XPM, XWD, X3F, YCbCr, YCbCrA, YUV.
|
|
195
|
+
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
|
196
|
+
# @param [Hash] opts the optional parameters
|
|
197
|
+
# @return [Object]
|
|
198
|
+
def convert_to_jpg_default_quality(image_file, opts = {})
|
|
199
|
+
data, _status_code, _headers = convert_to_jpg_default_quality_with_http_info(image_file, opts)
|
|
200
|
+
data
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
# Convert input image to JPG, JPEG format
|
|
204
|
+
# Converts the input image into JPEG/JPG format. Customize encoding parameters. Supported input file formats include AAI, ART, ARW, AVS, BPG, BMP, BMP2, BMP3, BRF, CALS, CGM, CIN, CMYK, CMYKA, CR2, CRW, CUR, CUT, DCM, DCR, DCX, DDS, DIB, DJVU, DNG, DOT, DPX, EMF, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EXR, FAX, FIG, FITS, FPX, GIF, GPLT, GRAY, HDR, HEIC, HPGL, HRZ, ICO, ISOBRL, ISBRL6, JBIG, JNG, JP2, JPT, J2C, J2K, JPEG/JPG, JXR, MAT, MONO, MNG, M2V, MRW, MTV, NEF, ORF, OTB, P7, PALM, PAM, PBM, PCD, PCDS, PCL, PCX, PDF, PEF, PES, PFA, PFB, PFM, PGM, PICON, PICT, PIX, PNG, PNG8, PNG00, PNG24, PNG32, PNG48, PNG64, PNM, PPM, PSB, PSD, PTIF, PWB, RAD, RAF, RGB, RGBA, RGF, RLA, RLE, SCT, SFW, SGI, SID, SUN, SVG, TGA, TIFF, TIM, UIL, VIFF, VICAR, VBMP, WDP, WEBP, WPG, X, XBM, XCF, XPM, XWD, X3F, YCbCr, YCbCrA, YUV.
|
|
205
|
+
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
|
206
|
+
# @param [Hash] opts the optional parameters
|
|
207
|
+
# @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers
|
|
208
|
+
def convert_to_jpg_default_quality_with_http_info(image_file, opts = {})
|
|
209
|
+
if @api_client.config.debugging
|
|
210
|
+
@api_client.config.logger.debug 'Calling API: ConvertApi.convert_to_jpg_default_quality ...'
|
|
211
|
+
end
|
|
212
|
+
# verify the required parameter 'image_file' is set
|
|
213
|
+
if @api_client.config.client_side_validation && image_file.nil?
|
|
214
|
+
fail ArgumentError, "Missing the required parameter 'image_file' when calling ConvertApi.convert_to_jpg_default_quality"
|
|
215
|
+
end
|
|
216
|
+
# resource path
|
|
217
|
+
local_var_path = '/image/convert/to/jpg'
|
|
218
|
+
|
|
219
|
+
# query parameters
|
|
220
|
+
query_params = {}
|
|
221
|
+
|
|
222
|
+
# header parameters
|
|
223
|
+
header_params = {}
|
|
224
|
+
# HTTP header 'Accept' (if needed)
|
|
225
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
|
|
226
|
+
# HTTP header 'Content-Type'
|
|
227
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
|
228
|
+
|
|
229
|
+
# form parameters
|
|
230
|
+
form_params = {}
|
|
231
|
+
form_params['imageFile'] = image_file
|
|
232
|
+
|
|
233
|
+
# http body (model)
|
|
234
|
+
post_body = nil
|
|
235
|
+
auth_names = ['Apikey']
|
|
236
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
237
|
+
:header_params => header_params,
|
|
238
|
+
:query_params => query_params,
|
|
239
|
+
:form_params => form_params,
|
|
240
|
+
:body => post_body,
|
|
241
|
+
:auth_names => auth_names,
|
|
242
|
+
:return_type => 'Object')
|
|
243
|
+
if @api_client.config.debugging
|
|
244
|
+
@api_client.config.logger.debug "API called: ConvertApi#convert_to_jpg_default_quality\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
245
|
+
end
|
|
246
|
+
return data, status_code, headers
|
|
247
|
+
end
|
|
193
248
|
# Convert input image to Photoshop PSD format
|
|
194
249
|
# Converts the input image into PSD format. Supported input file formats include AAI, ART, ARW, AVS, BPG, BMP, BMP2, BMP3, BRF, CALS, CGM, CIN, CMYK, CMYKA, CR2, CRW, CUR, CUT, DCM, DCR, DCX, DDS, DIB, DJVU, DNG, DOT, DPX, EMF, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EXR, FAX, FIG, FITS, FPX, GIF, GPLT, GRAY, HDR, HEIC, HPGL, HRZ, ICO, ISOBRL, ISBRL6, JBIG, JNG, JP2, JPT, J2C, J2K, JPEG/JPG, JXR, MAT, MONO, MNG, M2V, MRW, MTV, NEF, ORF, OTB, P7, PALM, PAM, PBM, PCD, PCDS, PCL, PCX, PDF, PEF, PES, PFA, PFB, PFM, PGM, PICON, PICT, PIX, PNG, PNG8, PNG00, PNG24, PNG32, PNG48, PNG64, PNM, PPM, PSB, PSD, PTIF, PWB, RAD, RAF, RGB, RGBA, RGF, RLA, RLE, SCT, SFW, SGI, SID, SUN, SVG, TGA, TIFF, TIM, UIL, VIFF, VICAR, VBMP, WDP, WEBP, WPG, X, XBM, XCF, XPM, XWD, X3F, YCbCr, YCbCrA, YUV.
|
|
195
250
|
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#imageapi
|
|
3
3
|
|
|
4
|
-
#Image Recognition and Processing APIs let you use Machine Learning to recognize and process images, and also perform useful image modification operations.
|
|
4
|
+
#Image Recognition and Processing APIs let you use Artificial Intelligence and Machine Learning to recognize and process images, and also perform useful image modification operations.
|
|
5
5
|
|
|
6
6
|
OpenAPI spec version: v1
|
|
7
7
|
|