cloudmersive-image-recognition-api-client 1.3.7 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +24 -5
- data/cloudmersive-image-recognition-api-client.gemspec +1 -1
- data/docs/ColorResult.md +10 -0
- data/docs/DetectedLicensePlate.md +4 -4
- data/docs/DominantColorResult.md +9 -0
- data/docs/EditApi.md +134 -0
- data/docs/FaceApi.md +55 -0
- data/docs/FaceCompareResponse.md +1 -1
- data/docs/FaceLocateWithLandmarksResponse.md +1 -1
- data/docs/FaceWithLandmarks.md +9 -9
- data/docs/FilterApi.md +475 -0
- data/docs/FindSymbolResult.md +12 -0
- data/docs/GenderDetectionResult.md +10 -0
- data/docs/InfoApi.md +63 -0
- data/docs/PersonWithAge.md +1 -0
- data/docs/PersonWithGender.md +10 -0
- data/docs/RecognizeApi.md +68 -4
- data/docs/ResizeApi.md +64 -3
- data/lib/cloudmersive-image-recognition-api-client.rb +8 -1
- data/lib/cloudmersive-image-recognition-api-client/api/artistic_api.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/api/edit_api.rb +161 -1
- data/lib/cloudmersive-image-recognition-api-client/api/face_api.rb +57 -1
- data/lib/cloudmersive-image-recognition-api-client/api/filter_api.rb +524 -0
- data/lib/cloudmersive-image-recognition-api-client/api/info_api.rb +79 -0
- data/lib/cloudmersive-image-recognition-api-client/api/nsfw_api.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/api/recognize_api.rb +76 -4
- data/lib/cloudmersive-image-recognition-api-client/api/resize_api.rb +71 -3
- 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 +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/color_result.rb +209 -0
- data/lib/cloudmersive-image-recognition-api-client/models/detected_license_plate.rb +26 -22
- data/lib/cloudmersive-image-recognition-api-client/models/detected_object.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/dominant_color_result.rb +201 -0
- 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 +15 -14
- 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 +15 -14
- 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 +54 -45
- data/lib/cloudmersive-image-recognition-api-client/models/find_symbol_result.rb +229 -0
- 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 +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/gender_detection_result.rb +211 -0
- data/lib/cloudmersive-image-recognition-api-client/models/image_description_response.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/nsfw_result.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/object_detection_result.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/person_with_age.rb +14 -5
- data/lib/cloudmersive-image-recognition-api-client/models/person_with_gender.rb +209 -0
- 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 +1 -1
- 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/spec/api/artistic_api_spec.rb +1 -1
- data/spec/api/edit_api_spec.rb +33 -1
- data/spec/api/face_api_spec.rb +13 -1
- data/spec/api/filter_api_spec.rb +140 -0
- data/spec/api/info_api_spec.rb +47 -0
- data/spec/api/nsfw_api_spec.rb +1 -1
- data/spec/api/recognize_api_spec.rb +15 -1
- data/spec/api/resize_api_spec.rb +16 -2
- 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 +54 -0
- data/spec/models/detected_license_plate_spec.rb +7 -7
- data/spec/models/detected_object_spec.rb +1 -1
- data/spec/models/dominant_color_result_spec.rb +48 -0
- 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 +5 -5
- data/spec/models/face_locate_response_spec.rb +1 -1
- data/spec/models/face_locate_with_landmarks_response_spec.rb +5 -5
- 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 +14 -14
- data/spec/models/find_symbol_result_spec.rb +66 -0
- data/spec/models/fine_text_detection_result_spec.rb +1 -1
- data/spec/models/fine_text_item_spec.rb +1 -1
- data/spec/models/gender_detection_result_spec.rb +54 -0
- data/spec/models/image_description_response_spec.rb +1 -1
- data/spec/models/nsfw_result_spec.rb +1 -1
- data/spec/models/object_detection_result_spec.rb +1 -1
- data/spec/models/person_with_age_spec.rb +7 -1
- data/spec/models/person_with_gender_spec.rb +54 -0
- 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 +1 -1
- data/spec/models/vehicle_license_plate_detection_result_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- metadata +36 -16
@@ -0,0 +1,12 @@
|
|
1
|
+
# CloudmersiveImageRecognitionApiClient::FindSymbolResult
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**successful** | **BOOLEAN** | True if successful, false otherwise | [optional]
|
7
|
+
**x_left** | **Integer** | X location of the left edge of the found location in pixels | [optional]
|
8
|
+
**y_top** | **Integer** | Y location of the top edge of the found location in pixels | [optional]
|
9
|
+
**width** | **Integer** | Width of the found location in pixels | [optional]
|
10
|
+
**height** | **Integer** | Height of the found location in pixels | [optional]
|
11
|
+
|
12
|
+
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# CloudmersiveImageRecognitionApiClient::GenderDetectionResult
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**successful** | **BOOLEAN** | True if the operation was successful, false otherwise | [optional]
|
7
|
+
**person_with_gender** | [**Array<PersonWithGender>**](PersonWithGender.md) | People in the image annotated with gender information | [optional]
|
8
|
+
**people_identified** | **Integer** | Number of people identified in the image with a gender | [optional]
|
9
|
+
|
10
|
+
|
data/docs/InfoApi.md
ADDED
@@ -0,0 +1,63 @@
|
|
1
|
+
# CloudmersiveImageRecognitionApiClient::InfoApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api.cloudmersive.com*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**info_get_dominant_color**](InfoApi.md#info_get_dominant_color) | **POST** /image/get-info/dominant-color | Returns the dominant colors of the image
|
8
|
+
|
9
|
+
|
10
|
+
# **info_get_dominant_color**
|
11
|
+
> DominantColorResult info_get_dominant_color(image_file)
|
12
|
+
|
13
|
+
Returns the dominant colors of the image
|
14
|
+
|
15
|
+
Uses advanced image processing to extract the top 5 dominant colors in the image, returned in the order of dominance with the most-dominant color first. These are the primary perceptual colors used in the image as perceived by a viewer.
|
16
|
+
|
17
|
+
### Example
|
18
|
+
```ruby
|
19
|
+
# load the gem
|
20
|
+
require 'cloudmersive-image-recognition-api-client'
|
21
|
+
# setup authorization
|
22
|
+
CloudmersiveImageRecognitionApiClient.configure do |config|
|
23
|
+
# Configure API key authorization: Apikey
|
24
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
25
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
26
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
27
|
+
end
|
28
|
+
|
29
|
+
api_instance = CloudmersiveImageRecognitionApiClient::InfoApi.new
|
30
|
+
|
31
|
+
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.
|
32
|
+
|
33
|
+
|
34
|
+
begin
|
35
|
+
#Returns the dominant colors of the image
|
36
|
+
result = api_instance.info_get_dominant_color(image_file)
|
37
|
+
p result
|
38
|
+
rescue CloudmersiveImageRecognitionApiClient::ApiError => e
|
39
|
+
puts "Exception when calling InfoApi->info_get_dominant_color: #{e}"
|
40
|
+
end
|
41
|
+
```
|
42
|
+
|
43
|
+
### Parameters
|
44
|
+
|
45
|
+
Name | Type | Description | Notes
|
46
|
+
------------- | ------------- | ------------- | -------------
|
47
|
+
**image_file** | **File**| Image file to perform the operation on. Common file formats such as PNG, JPEG are supported. |
|
48
|
+
|
49
|
+
### Return type
|
50
|
+
|
51
|
+
[**DominantColorResult**](DominantColorResult.md)
|
52
|
+
|
53
|
+
### Authorization
|
54
|
+
|
55
|
+
[Apikey](../README.md#Apikey)
|
56
|
+
|
57
|
+
### HTTP request headers
|
58
|
+
|
59
|
+
- **Content-Type**: multipart/form-data
|
60
|
+
- **Accept**: application/json, text/json, application/xml, text/xml
|
61
|
+
|
62
|
+
|
63
|
+
|
data/docs/PersonWithAge.md
CHANGED
@@ -6,5 +6,6 @@ Name | Type | Description | Notes
|
|
6
6
|
**face_location** | [**Face**](Face.md) | Location and other information about the person's face corresponding to this age classification | [optional]
|
7
7
|
**age_classification_confidence** | **Float** | Confidence level of age classification; possible values are between 0.0 and 1.0; higher is better, with values &gt; 0.50 being high confidence results | [optional]
|
8
8
|
**age_class** | **String** | The person's age range classification result in years; possible values are \"0-2\", \"4-6\", \"8-13\", \"15-20\", \"25-32\", \"38-43\", \"48-53\", \"60+\" | [optional]
|
9
|
+
**age** | **Float** | | [optional]
|
9
10
|
|
10
11
|
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# CloudmersiveImageRecognitionApiClient::PersonWithGender
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**face_location** | [**Face**](Face.md) | Location and other information about the person's face corresponding to this age classification | [optional]
|
7
|
+
**gender_classification_confidence** | **Float** | Confidence level of gender classification; possible values are between 0.0 and 1.0; higher is better, with values &gt; 0.50 being high confidence results | [optional]
|
8
|
+
**gender_class** | **String** | The person's identified gender; possible values are \"Male\", \"Female\" and \"Unknown\" | [optional]
|
9
|
+
|
10
|
+
|
data/docs/RecognizeApi.md
CHANGED
@@ -11,6 +11,7 @@ Method | HTTP request | Description
|
|
11
11
|
[**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
12
|
[**recognize_detect_text_large**](RecognizeApi.md#recognize_detect_text_large) | **POST** /image/recognize/detect-text/large | Detect large text in a photo
|
13
13
|
[**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
|
+
[**recognize_find_symbol**](RecognizeApi.md#recognize_find_symbol) | **POST** /image/recognize/find/symbol | Find the location of a symbol in an image
|
14
15
|
|
15
16
|
|
16
17
|
# **recognize_describe**
|
@@ -288,7 +289,7 @@ Name | Type | Description | Notes
|
|
288
289
|
|
289
290
|
|
290
291
|
# **recognize_detect_text_large**
|
291
|
-
> TextDetectionResult recognize_detect_text_large
|
292
|
+
> TextDetectionResult recognize_detect_text_large(image_file)
|
292
293
|
|
293
294
|
Detect large text in a photo
|
294
295
|
|
@@ -308,9 +309,12 @@ end
|
|
308
309
|
|
309
310
|
api_instance = CloudmersiveImageRecognitionApiClient::RecognizeApi.new
|
310
311
|
|
312
|
+
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.
|
313
|
+
|
314
|
+
|
311
315
|
begin
|
312
316
|
#Detect large text in a photo
|
313
|
-
result = api_instance.recognize_detect_text_large
|
317
|
+
result = api_instance.recognize_detect_text_large(image_file)
|
314
318
|
p result
|
315
319
|
rescue CloudmersiveImageRecognitionApiClient::ApiError => e
|
316
320
|
puts "Exception when calling RecognizeApi->recognize_detect_text_large: #{e}"
|
@@ -318,7 +322,10 @@ end
|
|
318
322
|
```
|
319
323
|
|
320
324
|
### Parameters
|
321
|
-
|
325
|
+
|
326
|
+
Name | Type | Description | Notes
|
327
|
+
------------- | ------------- | ------------- | -------------
|
328
|
+
**image_file** | **File**| Image file to perform the operation on. Common file formats such as PNG, JPEG are supported. |
|
322
329
|
|
323
330
|
### Return type
|
324
331
|
|
@@ -330,7 +337,7 @@ This endpoint does not need any parameter.
|
|
330
337
|
|
331
338
|
### HTTP request headers
|
332
339
|
|
333
|
-
- **Content-Type**:
|
340
|
+
- **Content-Type**: multipart/form-data
|
334
341
|
- **Accept**: application/json, text/json, application/xml, text/xml
|
335
342
|
|
336
343
|
|
@@ -389,3 +396,60 @@ Name | Type | Description | Notes
|
|
389
396
|
|
390
397
|
|
391
398
|
|
399
|
+
# **recognize_find_symbol**
|
400
|
+
> FindSymbolResult recognize_find_symbol(input_image, target_image)
|
401
|
+
|
402
|
+
Find the location of a symbol in an image
|
403
|
+
|
404
|
+
Determine if an image contains a symbol, and if so, the location of that symbol in the image.
|
405
|
+
|
406
|
+
### Example
|
407
|
+
```ruby
|
408
|
+
# load the gem
|
409
|
+
require 'cloudmersive-image-recognition-api-client'
|
410
|
+
# setup authorization
|
411
|
+
CloudmersiveImageRecognitionApiClient.configure do |config|
|
412
|
+
# Configure API key authorization: Apikey
|
413
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
414
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
415
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
416
|
+
end
|
417
|
+
|
418
|
+
api_instance = CloudmersiveImageRecognitionApiClient::RecognizeApi.new
|
419
|
+
|
420
|
+
input_image = File.new("/path/to/file.txt") # File | Image file to search through for the target image.
|
421
|
+
|
422
|
+
target_image = File.new("/path/to/file.txt") # File | Image to find in the input image.
|
423
|
+
|
424
|
+
|
425
|
+
begin
|
426
|
+
#Find the location of a symbol in an image
|
427
|
+
result = api_instance.recognize_find_symbol(input_image, target_image)
|
428
|
+
p result
|
429
|
+
rescue CloudmersiveImageRecognitionApiClient::ApiError => e
|
430
|
+
puts "Exception when calling RecognizeApi->recognize_find_symbol: #{e}"
|
431
|
+
end
|
432
|
+
```
|
433
|
+
|
434
|
+
### Parameters
|
435
|
+
|
436
|
+
Name | Type | Description | Notes
|
437
|
+
------------- | ------------- | ------------- | -------------
|
438
|
+
**input_image** | **File**| Image file to search through for the target image. |
|
439
|
+
**target_image** | **File**| Image to find in the input image. |
|
440
|
+
|
441
|
+
### Return type
|
442
|
+
|
443
|
+
[**FindSymbolResult**](FindSymbolResult.md)
|
444
|
+
|
445
|
+
### Authorization
|
446
|
+
|
447
|
+
[Apikey](../README.md#Apikey)
|
448
|
+
|
449
|
+
### HTTP request headers
|
450
|
+
|
451
|
+
- **Content-Type**: multipart/form-data
|
452
|
+
- **Accept**: application/json, text/json, application/xml, text/xml
|
453
|
+
|
454
|
+
|
455
|
+
|
data/docs/ResizeApi.md
CHANGED
@@ -4,13 +4,14 @@ All URIs are relative to *https://api.cloudmersive.com*
|
|
4
4
|
|
5
5
|
Method | HTTP request | Description
|
6
6
|
------------- | ------------- | -------------
|
7
|
-
[**resize_post**](ResizeApi.md#resize_post) | **POST** /image/resize/preserveAspectRatio/{maxWidth}/{maxHeight} | Resize an image
|
7
|
+
[**resize_post**](ResizeApi.md#resize_post) | **POST** /image/resize/preserveAspectRatio/{maxWidth}/{maxHeight} | Resize an image while preserving aspect ratio
|
8
|
+
[**resize_resize_simple**](ResizeApi.md#resize_resize_simple) | **POST** /image/resize/target/{width}/{height} | Resize an image
|
8
9
|
|
9
10
|
|
10
11
|
# **resize_post**
|
11
12
|
> String resize_post(max_width, max_height, image_file)
|
12
13
|
|
13
|
-
Resize an image
|
14
|
+
Resize an image while preserving aspect ratio
|
14
15
|
|
15
16
|
Resize an image to a maximum width and maximum height, while preserving the image's original aspect ratio
|
16
17
|
|
@@ -36,7 +37,7 @@ image_file = File.new("/path/to/file.txt") # File | Image file to perform the op
|
|
36
37
|
|
37
38
|
|
38
39
|
begin
|
39
|
-
#Resize an image
|
40
|
+
#Resize an image while preserving aspect ratio
|
40
41
|
result = api_instance.resize_post(max_width, max_height, image_file)
|
41
42
|
p result
|
42
43
|
rescue CloudmersiveImageRecognitionApiClient::ApiError => e
|
@@ -67,3 +68,63 @@ Name | Type | Description | Notes
|
|
67
68
|
|
68
69
|
|
69
70
|
|
71
|
+
# **resize_resize_simple**
|
72
|
+
> String resize_resize_simple(width, height, image_file)
|
73
|
+
|
74
|
+
Resize an image
|
75
|
+
|
76
|
+
Resize an image to a specific width and specific height
|
77
|
+
|
78
|
+
### Example
|
79
|
+
```ruby
|
80
|
+
# load the gem
|
81
|
+
require 'cloudmersive-image-recognition-api-client'
|
82
|
+
# setup authorization
|
83
|
+
CloudmersiveImageRecognitionApiClient.configure do |config|
|
84
|
+
# Configure API key authorization: Apikey
|
85
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
86
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
87
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
88
|
+
end
|
89
|
+
|
90
|
+
api_instance = CloudmersiveImageRecognitionApiClient::ResizeApi.new
|
91
|
+
|
92
|
+
width = 56 # Integer |
|
93
|
+
|
94
|
+
height = 56 # Integer |
|
95
|
+
|
96
|
+
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.
|
97
|
+
|
98
|
+
|
99
|
+
begin
|
100
|
+
#Resize an image
|
101
|
+
result = api_instance.resize_resize_simple(width, height, image_file)
|
102
|
+
p result
|
103
|
+
rescue CloudmersiveImageRecognitionApiClient::ApiError => e
|
104
|
+
puts "Exception when calling ResizeApi->resize_resize_simple: #{e}"
|
105
|
+
end
|
106
|
+
```
|
107
|
+
|
108
|
+
### Parameters
|
109
|
+
|
110
|
+
Name | Type | Description | Notes
|
111
|
+
------------- | ------------- | ------------- | -------------
|
112
|
+
**width** | **Integer**| |
|
113
|
+
**height** | **Integer**| |
|
114
|
+
**image_file** | **File**| Image file to perform the operation on. Common file formats such as PNG, JPEG are supported. |
|
115
|
+
|
116
|
+
### Return type
|
117
|
+
|
118
|
+
**String**
|
119
|
+
|
120
|
+
### Authorization
|
121
|
+
|
122
|
+
[Apikey](../README.md#Apikey)
|
123
|
+
|
124
|
+
### HTTP request headers
|
125
|
+
|
126
|
+
- **Content-Type**: multipart/form-data
|
127
|
+
- **Accept**: image/png
|
128
|
+
|
129
|
+
|
130
|
+
|
@@ -6,7 +6,7 @@
|
|
6
6
|
OpenAPI spec version: v1
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version:
|
9
|
+
Swagger Codegen version: 2.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -18,8 +18,10 @@ require 'cloudmersive-image-recognition-api-client/configuration'
|
|
18
18
|
|
19
19
|
# Models
|
20
20
|
require 'cloudmersive-image-recognition-api-client/models/age_detection_result'
|
21
|
+
require 'cloudmersive-image-recognition-api-client/models/color_result'
|
21
22
|
require 'cloudmersive-image-recognition-api-client/models/detected_license_plate'
|
22
23
|
require 'cloudmersive-image-recognition-api-client/models/detected_object'
|
24
|
+
require 'cloudmersive-image-recognition-api-client/models/dominant_color_result'
|
23
25
|
require 'cloudmersive-image-recognition-api-client/models/draw_polygon_instance'
|
24
26
|
require 'cloudmersive-image-recognition-api-client/models/draw_polygon_request'
|
25
27
|
require 'cloudmersive-image-recognition-api-client/models/draw_rectangle_instance'
|
@@ -33,12 +35,15 @@ require 'cloudmersive-image-recognition-api-client/models/face_locate_with_landm
|
|
33
35
|
require 'cloudmersive-image-recognition-api-client/models/face_match'
|
34
36
|
require 'cloudmersive-image-recognition-api-client/models/face_point'
|
35
37
|
require 'cloudmersive-image-recognition-api-client/models/face_with_landmarks'
|
38
|
+
require 'cloudmersive-image-recognition-api-client/models/find_symbol_result'
|
36
39
|
require 'cloudmersive-image-recognition-api-client/models/fine_text_detection_result'
|
37
40
|
require 'cloudmersive-image-recognition-api-client/models/fine_text_item'
|
41
|
+
require 'cloudmersive-image-recognition-api-client/models/gender_detection_result'
|
38
42
|
require 'cloudmersive-image-recognition-api-client/models/image_description_response'
|
39
43
|
require 'cloudmersive-image-recognition-api-client/models/nsfw_result'
|
40
44
|
require 'cloudmersive-image-recognition-api-client/models/object_detection_result'
|
41
45
|
require 'cloudmersive-image-recognition-api-client/models/person_with_age'
|
46
|
+
require 'cloudmersive-image-recognition-api-client/models/person_with_gender'
|
42
47
|
require 'cloudmersive-image-recognition-api-client/models/polygon_point'
|
43
48
|
require 'cloudmersive-image-recognition-api-client/models/recognition_outcome'
|
44
49
|
require 'cloudmersive-image-recognition-api-client/models/text_detection_result'
|
@@ -49,6 +54,8 @@ require 'cloudmersive-image-recognition-api-client/models/vehicle_license_plate_
|
|
49
54
|
require 'cloudmersive-image-recognition-api-client/api/artistic_api'
|
50
55
|
require 'cloudmersive-image-recognition-api-client/api/edit_api'
|
51
56
|
require 'cloudmersive-image-recognition-api-client/api/face_api'
|
57
|
+
require 'cloudmersive-image-recognition-api-client/api/filter_api'
|
58
|
+
require 'cloudmersive-image-recognition-api-client/api/info_api'
|
52
59
|
require 'cloudmersive-image-recognition-api-client/api/nsfw_api'
|
53
60
|
require 'cloudmersive-image-recognition-api-client/api/recognize_api'
|
54
61
|
require 'cloudmersive-image-recognition-api-client/api/resize_api'
|
@@ -6,7 +6,7 @@
|
|
6
6
|
OpenAPI spec version: v1
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version:
|
9
|
+
Swagger Codegen version: 2.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -207,6 +207,86 @@ module CloudmersiveImageRecognitionApiClient
|
|
207
207
|
return data, status_code, headers
|
208
208
|
end
|
209
209
|
|
210
|
+
# Crop an image to a rectangular area
|
211
|
+
# Crop an image to a target rectangular area
|
212
|
+
# @param left The left edge of the rectangular crop area in pixels (X).
|
213
|
+
# @param top The top edge of the rectangular crop area in pixels (Y).
|
214
|
+
# @param width The width of the rectangular crop area in pixels.
|
215
|
+
# @param height The height of the rectangular crop area in pixels.
|
216
|
+
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
217
|
+
# @param [Hash] opts the optional parameters
|
218
|
+
# @return [String]
|
219
|
+
def edit_crop_rectangle(left, top, width, height, image_file, opts = {})
|
220
|
+
data, _status_code, _headers = edit_crop_rectangle_with_http_info(left, top, width, height, image_file, opts)
|
221
|
+
return data
|
222
|
+
end
|
223
|
+
|
224
|
+
# Crop an image to a rectangular area
|
225
|
+
# Crop an image to a target rectangular area
|
226
|
+
# @param left The left edge of the rectangular crop area in pixels (X).
|
227
|
+
# @param top The top edge of the rectangular crop area in pixels (Y).
|
228
|
+
# @param width The width of the rectangular crop area in pixels.
|
229
|
+
# @param height The height of the rectangular crop area in pixels.
|
230
|
+
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
231
|
+
# @param [Hash] opts the optional parameters
|
232
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
233
|
+
def edit_crop_rectangle_with_http_info(left, top, width, height, image_file, opts = {})
|
234
|
+
if @api_client.config.debugging
|
235
|
+
@api_client.config.logger.debug "Calling API: EditApi.edit_crop_rectangle ..."
|
236
|
+
end
|
237
|
+
# verify the required parameter 'left' is set
|
238
|
+
if @api_client.config.client_side_validation && left.nil?
|
239
|
+
fail ArgumentError, "Missing the required parameter 'left' when calling EditApi.edit_crop_rectangle"
|
240
|
+
end
|
241
|
+
# verify the required parameter 'top' is set
|
242
|
+
if @api_client.config.client_side_validation && top.nil?
|
243
|
+
fail ArgumentError, "Missing the required parameter 'top' when calling EditApi.edit_crop_rectangle"
|
244
|
+
end
|
245
|
+
# verify the required parameter 'width' is set
|
246
|
+
if @api_client.config.client_side_validation && width.nil?
|
247
|
+
fail ArgumentError, "Missing the required parameter 'width' when calling EditApi.edit_crop_rectangle"
|
248
|
+
end
|
249
|
+
# verify the required parameter 'height' is set
|
250
|
+
if @api_client.config.client_side_validation && height.nil?
|
251
|
+
fail ArgumentError, "Missing the required parameter 'height' when calling EditApi.edit_crop_rectangle"
|
252
|
+
end
|
253
|
+
# verify the required parameter 'image_file' is set
|
254
|
+
if @api_client.config.client_side_validation && image_file.nil?
|
255
|
+
fail ArgumentError, "Missing the required parameter 'image_file' when calling EditApi.edit_crop_rectangle"
|
256
|
+
end
|
257
|
+
# resource path
|
258
|
+
local_var_path = "/image/edit/crop/rectangle/{left}/{top}/{width}/{height}".sub('{' + 'left' + '}', left.to_s).sub('{' + 'top' + '}', top.to_s).sub('{' + 'width' + '}', width.to_s).sub('{' + 'height' + '}', height.to_s)
|
259
|
+
|
260
|
+
# query parameters
|
261
|
+
query_params = {}
|
262
|
+
|
263
|
+
# header parameters
|
264
|
+
header_params = {}
|
265
|
+
# HTTP header 'Accept' (if needed)
|
266
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
|
267
|
+
# HTTP header 'Content-Type'
|
268
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
269
|
+
|
270
|
+
# form parameters
|
271
|
+
form_params = {}
|
272
|
+
form_params["imageFile"] = image_file
|
273
|
+
|
274
|
+
# http body (model)
|
275
|
+
post_body = nil
|
276
|
+
auth_names = ['Apikey']
|
277
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
278
|
+
:header_params => header_params,
|
279
|
+
:query_params => query_params,
|
280
|
+
:form_params => form_params,
|
281
|
+
:body => post_body,
|
282
|
+
:auth_names => auth_names,
|
283
|
+
:return_type => 'String')
|
284
|
+
if @api_client.config.debugging
|
285
|
+
@api_client.config.logger.debug "API called: EditApi#edit_crop_rectangle\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
286
|
+
end
|
287
|
+
return data, status_code, headers
|
288
|
+
end
|
289
|
+
|
210
290
|
# Draw a polygon onto an image
|
211
291
|
# Draw one or more polygons, with customized visuals, onto an image
|
212
292
|
# @param request
|
@@ -372,6 +452,86 @@ module CloudmersiveImageRecognitionApiClient
|
|
372
452
|
return data, status_code, headers
|
373
453
|
end
|
374
454
|
|
455
|
+
# Add a customizeable drop shadow to an image
|
456
|
+
# Add a customizeable drop shadow to the image
|
457
|
+
# @param x Horizontal (X) offset of the drop shadow
|
458
|
+
# @param y Vertical (Y) offset of the drop shadow
|
459
|
+
# @param sigma Sigma (blur distance) of the drop shadow
|
460
|
+
# @param opacity Opacity of the drop shadow; 0 is 0% and 100 is 100%
|
461
|
+
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
462
|
+
# @param [Hash] opts the optional parameters
|
463
|
+
# @return [String]
|
464
|
+
def edit_drop_shadow(x, y, sigma, opacity, image_file, opts = {})
|
465
|
+
data, _status_code, _headers = edit_drop_shadow_with_http_info(x, y, sigma, opacity, image_file, opts)
|
466
|
+
return data
|
467
|
+
end
|
468
|
+
|
469
|
+
# Add a customizeable drop shadow to an image
|
470
|
+
# Add a customizeable drop shadow to the image
|
471
|
+
# @param x Horizontal (X) offset of the drop shadow
|
472
|
+
# @param y Vertical (Y) offset of the drop shadow
|
473
|
+
# @param sigma Sigma (blur distance) of the drop shadow
|
474
|
+
# @param opacity Opacity of the drop shadow; 0 is 0% and 100 is 100%
|
475
|
+
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
476
|
+
# @param [Hash] opts the optional parameters
|
477
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
478
|
+
def edit_drop_shadow_with_http_info(x, y, sigma, opacity, image_file, opts = {})
|
479
|
+
if @api_client.config.debugging
|
480
|
+
@api_client.config.logger.debug "Calling API: EditApi.edit_drop_shadow ..."
|
481
|
+
end
|
482
|
+
# verify the required parameter 'x' is set
|
483
|
+
if @api_client.config.client_side_validation && x.nil?
|
484
|
+
fail ArgumentError, "Missing the required parameter 'x' when calling EditApi.edit_drop_shadow"
|
485
|
+
end
|
486
|
+
# verify the required parameter 'y' is set
|
487
|
+
if @api_client.config.client_side_validation && y.nil?
|
488
|
+
fail ArgumentError, "Missing the required parameter 'y' when calling EditApi.edit_drop_shadow"
|
489
|
+
end
|
490
|
+
# verify the required parameter 'sigma' is set
|
491
|
+
if @api_client.config.client_side_validation && sigma.nil?
|
492
|
+
fail ArgumentError, "Missing the required parameter 'sigma' when calling EditApi.edit_drop_shadow"
|
493
|
+
end
|
494
|
+
# verify the required parameter 'opacity' is set
|
495
|
+
if @api_client.config.client_side_validation && opacity.nil?
|
496
|
+
fail ArgumentError, "Missing the required parameter 'opacity' when calling EditApi.edit_drop_shadow"
|
497
|
+
end
|
498
|
+
# verify the required parameter 'image_file' is set
|
499
|
+
if @api_client.config.client_side_validation && image_file.nil?
|
500
|
+
fail ArgumentError, "Missing the required parameter 'image_file' when calling EditApi.edit_drop_shadow"
|
501
|
+
end
|
502
|
+
# resource path
|
503
|
+
local_var_path = "/image/edit/drop-shadow/{x}/{y}/{sigma}/{opacity}".sub('{' + 'x' + '}', x.to_s).sub('{' + 'y' + '}', y.to_s).sub('{' + 'sigma' + '}', sigma.to_s).sub('{' + 'opacity' + '}', opacity.to_s)
|
504
|
+
|
505
|
+
# query parameters
|
506
|
+
query_params = {}
|
507
|
+
|
508
|
+
# header parameters
|
509
|
+
header_params = {}
|
510
|
+
# HTTP header 'Accept' (if needed)
|
511
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
|
512
|
+
# HTTP header 'Content-Type'
|
513
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
514
|
+
|
515
|
+
# form parameters
|
516
|
+
form_params = {}
|
517
|
+
form_params["imageFile"] = image_file
|
518
|
+
|
519
|
+
# http body (model)
|
520
|
+
post_body = nil
|
521
|
+
auth_names = ['Apikey']
|
522
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
523
|
+
:header_params => header_params,
|
524
|
+
:query_params => query_params,
|
525
|
+
:form_params => form_params,
|
526
|
+
:body => post_body,
|
527
|
+
:auth_names => auth_names,
|
528
|
+
:return_type => 'String')
|
529
|
+
if @api_client.config.debugging
|
530
|
+
@api_client.config.logger.debug "API called: EditApi#edit_drop_shadow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
531
|
+
end
|
532
|
+
return data, status_code, headers
|
533
|
+
end
|
534
|
+
|
375
535
|
# Rotate an image any number of degrees
|
376
536
|
# Rotates an image by an arbitrary number of degrees
|
377
537
|
# @param degrees Degrees to rotate the image; values range from 0.0 to 360.0.
|