cloudmersive-image-recognition-api-client 1.2.9

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.
Files changed (78) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +7 -0
  3. data/README.md +132 -0
  4. data/Rakefile +8 -0
  5. data/cloudmersive-image-recognition-api-client.gemspec +45 -0
  6. data/docs/AgeDetectionResult.md +10 -0
  7. data/docs/ArtisticApi.md +66 -0
  8. data/docs/DetectedLicensePlate.md +14 -0
  9. data/docs/DetectedObject.md +13 -0
  10. data/docs/DrawRectangleInstance.md +14 -0
  11. data/docs/DrawRectangleRequest.md +10 -0
  12. data/docs/DrawTextInstance.md +15 -0
  13. data/docs/DrawTextRequest.md +10 -0
  14. data/docs/EditApi.md +179 -0
  15. data/docs/Face.md +11 -0
  16. data/docs/FaceApi.md +228 -0
  17. data/docs/FaceLocateResponse.md +11 -0
  18. data/docs/ImageDescriptionResponse.md +11 -0
  19. data/docs/NsfwApi.md +63 -0
  20. data/docs/NsfwResult.md +10 -0
  21. data/docs/ObjectDetectionResult.md +10 -0
  22. data/docs/PersonWithAge.md +10 -0
  23. data/docs/RecognitionOutcome.md +9 -0
  24. data/docs/RecognizeApi.md +287 -0
  25. data/docs/ResizeApi.md +69 -0
  26. data/docs/VehicleLicensePlateDetectionResult.md +10 -0
  27. data/git_push.sh +55 -0
  28. data/lib/cloudmersive-image-recognition-api-client.rb +60 -0
  29. data/lib/cloudmersive-image-recognition-api-client/api/artistic_api.rb +85 -0
  30. data/lib/cloudmersive-image-recognition-api-client/api/edit_api.rb +202 -0
  31. data/lib/cloudmersive-image-recognition-api-client/api/face_api.rb +247 -0
  32. data/lib/cloudmersive-image-recognition-api-client/api/nsfw_api.rb +79 -0
  33. data/lib/cloudmersive-image-recognition-api-client/api/recognize_api.rb +306 -0
  34. data/lib/cloudmersive-image-recognition-api-client/api/resize_api.rb +91 -0
  35. data/lib/cloudmersive-image-recognition-api-client/api_client.rb +389 -0
  36. data/lib/cloudmersive-image-recognition-api-client/api_error.rb +38 -0
  37. data/lib/cloudmersive-image-recognition-api-client/configuration.rb +209 -0
  38. data/lib/cloudmersive-image-recognition-api-client/models/age_detection_result.rb +211 -0
  39. data/lib/cloudmersive-image-recognition-api-client/models/detected_license_plate.rb +245 -0
  40. data/lib/cloudmersive-image-recognition-api-client/models/detected_object.rb +239 -0
  41. data/lib/cloudmersive-image-recognition-api-client/models/draw_rectangle_instance.rb +249 -0
  42. data/lib/cloudmersive-image-recognition-api-client/models/draw_rectangle_request.rb +227 -0
  43. data/lib/cloudmersive-image-recognition-api-client/models/draw_text_instance.rb +259 -0
  44. data/lib/cloudmersive-image-recognition-api-client/models/draw_text_request.rb +227 -0
  45. data/lib/cloudmersive-image-recognition-api-client/models/face.rb +219 -0
  46. data/lib/cloudmersive-image-recognition-api-client/models/face_locate_response.rb +220 -0
  47. data/lib/cloudmersive-image-recognition-api-client/models/image_description_response.rb +219 -0
  48. data/lib/cloudmersive-image-recognition-api-client/models/nsfw_result.rb +209 -0
  49. data/lib/cloudmersive-image-recognition-api-client/models/object_detection_result.rb +211 -0
  50. data/lib/cloudmersive-image-recognition-api-client/models/person_with_age.rb +209 -0
  51. data/lib/cloudmersive-image-recognition-api-client/models/recognition_outcome.rb +199 -0
  52. data/lib/cloudmersive-image-recognition-api-client/models/vehicle_license_plate_detection_result.rb +211 -0
  53. data/lib/cloudmersive-image-recognition-api-client/version.rb +15 -0
  54. data/spec/api/artistic_api_spec.rb +48 -0
  55. data/spec/api/edit_api_spec.rb +73 -0
  56. data/spec/api/face_api_spec.rb +83 -0
  57. data/spec/api/nsfw_api_spec.rb +47 -0
  58. data/spec/api/recognize_api_spec.rb +96 -0
  59. data/spec/api/resize_api_spec.rb +49 -0
  60. data/spec/api_client_spec.rb +226 -0
  61. data/spec/configuration_spec.rb +42 -0
  62. data/spec/models/age_detection_result_spec.rb +54 -0
  63. data/spec/models/detected_license_plate_spec.rb +78 -0
  64. data/spec/models/detected_object_spec.rb +72 -0
  65. data/spec/models/draw_rectangle_instance_spec.rb +78 -0
  66. data/spec/models/draw_rectangle_request_spec.rb +54 -0
  67. data/spec/models/draw_text_instance_spec.rb +84 -0
  68. data/spec/models/draw_text_request_spec.rb +54 -0
  69. data/spec/models/face_locate_response_spec.rb +60 -0
  70. data/spec/models/face_spec.rb +60 -0
  71. data/spec/models/image_description_response_spec.rb +60 -0
  72. data/spec/models/nsfw_result_spec.rb +54 -0
  73. data/spec/models/object_detection_result_spec.rb +54 -0
  74. data/spec/models/person_with_age_spec.rb +54 -0
  75. data/spec/models/recognition_outcome_spec.rb +48 -0
  76. data/spec/models/vehicle_license_plate_detection_result_spec.rb +54 -0
  77. data/spec/spec_helper.rb +111 -0
  78. metadata +302 -0
data/docs/Face.md ADDED
@@ -0,0 +1,11 @@
1
+ # CloudmersiveImageRecognitionApiClient::Face
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **left_x** | **Integer** | X coordinate of the left side of the face | [optional]
7
+ **top_y** | **Integer** | Y coordinate of the top side of the face | [optional]
8
+ **right_x** | **Integer** | X coordinate of the right side of the face | [optional]
9
+ **bottom_y** | **Integer** | Y coordinate of the bottom side of the face | [optional]
10
+
11
+
data/docs/FaceApi.md ADDED
@@ -0,0 +1,228 @@
1
+ # CloudmersiveImageRecognitionApiClient::FaceApi
2
+
3
+ All URIs are relative to *https://api.cloudmersive.com*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**face_crop_first**](FaceApi.md#face_crop_first) | **POST** /image/face/crop/first | Crop image to face (square)
8
+ [**face_crop_first_round**](FaceApi.md#face_crop_first_round) | **POST** /image/face/crop/first/round | Crop image to face (round)
9
+ [**face_detect_age**](FaceApi.md#face_detect_age) | **POST** /image/face/detect-age | Detect the age of people in an image
10
+ [**face_locate**](FaceApi.md#face_locate) | **POST** /image/face/locate | Find faces in an image
11
+
12
+
13
+ # **face_crop_first**
14
+ > String face_crop_first(image_file)
15
+
16
+ Crop image to face (square)
17
+
18
+ Crop an image to the face (rectangular crop). If there is more than one face present, choose the first one.
19
+
20
+ ### Example
21
+ ```ruby
22
+ # load the gem
23
+ require 'cloudmersive-image-recognition-api-client'
24
+ # setup authorization
25
+ CloudmersiveImageRecognitionApiClient.configure do |config|
26
+ # Configure API key authorization: Apikey
27
+ config.api_key['Apikey'] = 'YOUR API KEY'
28
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
29
+ #config.api_key_prefix['Apikey'] = 'Bearer'
30
+ end
31
+
32
+ api_instance = CloudmersiveImageRecognitionApiClient::FaceApi.new
33
+
34
+ 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.
35
+
36
+
37
+ begin
38
+ #Crop image to face (square)
39
+ result = api_instance.face_crop_first(image_file)
40
+ p result
41
+ rescue CloudmersiveImageRecognitionApiClient::ApiError => e
42
+ puts "Exception when calling FaceApi->face_crop_first: #{e}"
43
+ end
44
+ ```
45
+
46
+ ### Parameters
47
+
48
+ Name | Type | Description | Notes
49
+ ------------- | ------------- | ------------- | -------------
50
+ **image_file** | **File**| Image file to perform the operation on. Common file formats such as PNG, JPEG are supported. |
51
+
52
+ ### Return type
53
+
54
+ **String**
55
+
56
+ ### Authorization
57
+
58
+ [Apikey](../README.md#Apikey)
59
+
60
+ ### HTTP request headers
61
+
62
+ - **Content-Type**: multipart/form-data
63
+ - **Accept**: application/octet-stream
64
+
65
+
66
+
67
+ # **face_crop_first_round**
68
+ > String face_crop_first_round(image_file)
69
+
70
+ Crop image to face (round)
71
+
72
+ Crop an image to the face (circular/round crop). If there is more than one face present, choose the first one.
73
+
74
+ ### Example
75
+ ```ruby
76
+ # load the gem
77
+ require 'cloudmersive-image-recognition-api-client'
78
+ # setup authorization
79
+ CloudmersiveImageRecognitionApiClient.configure do |config|
80
+ # Configure API key authorization: Apikey
81
+ config.api_key['Apikey'] = 'YOUR API KEY'
82
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
83
+ #config.api_key_prefix['Apikey'] = 'Bearer'
84
+ end
85
+
86
+ api_instance = CloudmersiveImageRecognitionApiClient::FaceApi.new
87
+
88
+ 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.
89
+
90
+
91
+ begin
92
+ #Crop image to face (round)
93
+ result = api_instance.face_crop_first_round(image_file)
94
+ p result
95
+ rescue CloudmersiveImageRecognitionApiClient::ApiError => e
96
+ puts "Exception when calling FaceApi->face_crop_first_round: #{e}"
97
+ end
98
+ ```
99
+
100
+ ### Parameters
101
+
102
+ Name | Type | Description | Notes
103
+ ------------- | ------------- | ------------- | -------------
104
+ **image_file** | **File**| Image file to perform the operation on. Common file formats such as PNG, JPEG are supported. |
105
+
106
+ ### Return type
107
+
108
+ **String**
109
+
110
+ ### Authorization
111
+
112
+ [Apikey](../README.md#Apikey)
113
+
114
+ ### HTTP request headers
115
+
116
+ - **Content-Type**: multipart/form-data
117
+ - **Accept**: application/octet-stream
118
+
119
+
120
+
121
+ # **face_detect_age**
122
+ > AgeDetectionResult face_detect_age(image_file)
123
+
124
+ Detect the age of people in an image
125
+
126
+ Identify the age, position, and size of human faces in an image, along with a recognition confidence level. People in the image do NOT need to be facing the camera; they can be facing away, edge-on, etc.
127
+
128
+ ### Example
129
+ ```ruby
130
+ # load the gem
131
+ require 'cloudmersive-image-recognition-api-client'
132
+ # setup authorization
133
+ CloudmersiveImageRecognitionApiClient.configure do |config|
134
+ # Configure API key authorization: Apikey
135
+ config.api_key['Apikey'] = 'YOUR API KEY'
136
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
137
+ #config.api_key_prefix['Apikey'] = 'Bearer'
138
+ end
139
+
140
+ api_instance = CloudmersiveImageRecognitionApiClient::FaceApi.new
141
+
142
+ 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.
143
+
144
+
145
+ begin
146
+ #Detect the age of people in an image
147
+ result = api_instance.face_detect_age(image_file)
148
+ p result
149
+ rescue CloudmersiveImageRecognitionApiClient::ApiError => e
150
+ puts "Exception when calling FaceApi->face_detect_age: #{e}"
151
+ end
152
+ ```
153
+
154
+ ### Parameters
155
+
156
+ Name | Type | Description | Notes
157
+ ------------- | ------------- | ------------- | -------------
158
+ **image_file** | **File**| Image file to perform the operation on. Common file formats such as PNG, JPEG are supported. |
159
+
160
+ ### Return type
161
+
162
+ [**AgeDetectionResult**](AgeDetectionResult.md)
163
+
164
+ ### Authorization
165
+
166
+ [Apikey](../README.md#Apikey)
167
+
168
+ ### HTTP request headers
169
+
170
+ - **Content-Type**: multipart/form-data
171
+ - **Accept**: application/json, text/json, application/xml, text/xml
172
+
173
+
174
+
175
+ # **face_locate**
176
+ > FaceLocateResponse face_locate(image_file)
177
+
178
+ Find faces in an image
179
+
180
+ Locate the positions of all faces in an image
181
+
182
+ ### Example
183
+ ```ruby
184
+ # load the gem
185
+ require 'cloudmersive-image-recognition-api-client'
186
+ # setup authorization
187
+ CloudmersiveImageRecognitionApiClient.configure do |config|
188
+ # Configure API key authorization: Apikey
189
+ config.api_key['Apikey'] = 'YOUR API KEY'
190
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
191
+ #config.api_key_prefix['Apikey'] = 'Bearer'
192
+ end
193
+
194
+ api_instance = CloudmersiveImageRecognitionApiClient::FaceApi.new
195
+
196
+ 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.
197
+
198
+
199
+ begin
200
+ #Find faces in an image
201
+ result = api_instance.face_locate(image_file)
202
+ p result
203
+ rescue CloudmersiveImageRecognitionApiClient::ApiError => e
204
+ puts "Exception when calling FaceApi->face_locate: #{e}"
205
+ end
206
+ ```
207
+
208
+ ### Parameters
209
+
210
+ Name | Type | Description | Notes
211
+ ------------- | ------------- | ------------- | -------------
212
+ **image_file** | **File**| Image file to perform the operation on. Common file formats such as PNG, JPEG are supported. |
213
+
214
+ ### Return type
215
+
216
+ [**FaceLocateResponse**](FaceLocateResponse.md)
217
+
218
+ ### Authorization
219
+
220
+ [Apikey](../README.md#Apikey)
221
+
222
+ ### HTTP request headers
223
+
224
+ - **Content-Type**: multipart/form-data
225
+ - **Accept**: application/json, text/json, application/xml, text/xml
226
+
227
+
228
+
@@ -0,0 +1,11 @@
1
+ # CloudmersiveImageRecognitionApiClient::FaceLocateResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **error_details** | **String** | | [optional]
7
+ **successful** | **BOOLEAN** | True if the operation was successful, false otherwise | [optional]
8
+ **faces** | [**Array<Face>**](Face.md) | Array of faces found in the image | [optional]
9
+ **face_count** | **Integer** | Number of faces found in the image | [optional]
10
+
11
+
@@ -0,0 +1,11 @@
1
+ # CloudmersiveImageRecognitionApiClient::ImageDescriptionResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **successful** | **BOOLEAN** | Was the image processed successfully? | [optional]
7
+ **highconfidence** | **BOOLEAN** | Is the resulting best outcome recognition a high confidence outcome? | [optional]
8
+ **best_outcome** | [**RecognitionOutcome**](RecognitionOutcome.md) | The best Machine Learning outcome | [optional]
9
+ **runner_up_outcome** | [**RecognitionOutcome**](RecognitionOutcome.md) | Best backup (\"runner up\") Machine Learning outcome | [optional]
10
+
11
+
data/docs/NsfwApi.md ADDED
@@ -0,0 +1,63 @@
1
+ # CloudmersiveImageRecognitionApiClient::NsfwApi
2
+
3
+ All URIs are relative to *https://api.cloudmersive.com*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**nsfw_classify**](NsfwApi.md#nsfw_classify) | **POST** /image/nsfw/classify | Not safe for work (NSFW) racy content classification
8
+
9
+
10
+ # **nsfw_classify**
11
+ > NsfwResult nsfw_classify(image_file)
12
+
13
+ Not safe for work (NSFW) racy content classification
14
+
15
+ Classify an image into Not Safe For Work (NSFW)/Porn/Racy content and Safe Content.
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::NsfwApi.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
+ #Not safe for work (NSFW) racy content classification
36
+ result = api_instance.nsfw_classify(image_file)
37
+ p result
38
+ rescue CloudmersiveImageRecognitionApiClient::ApiError => e
39
+ puts "Exception when calling NsfwApi->nsfw_classify: #{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
+ [**NsfwResult**](NsfwResult.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
+
@@ -0,0 +1,10 @@
1
+ # CloudmersiveImageRecognitionApiClient::NsfwResult
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **successful** | **BOOLEAN** | True if the classification was successfully run, false otherwise | [optional]
7
+ **score** | **Float** | Score between 0.0 and 1.0. Scores of 0.0-0.2 represent high probability safe content, while scores 0.8-1.0 represent high probability unsafe content. Content between 0.2 and 0.8 is of increasing raciness. | [optional]
8
+ **classification_outcome** | **String** | Classification result into four categories: SafeContent_HighProbability, UnsafeContent_HighProbability, RacyContent, SafeContent_ModerateProbability | [optional]
9
+
10
+
@@ -0,0 +1,10 @@
1
+ # CloudmersiveImageRecognitionApiClient::ObjectDetectionResult
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **successful** | **BOOLEAN** | Was the image processed successfully? | [optional]
7
+ **objects** | [**Array<DetectedObject>**](DetectedObject.md) | Array of objects detected in the scene | [optional]
8
+ **object_count** | **Integer** | Number of objects detected in the scene | [optional]
9
+
10
+
@@ -0,0 +1,10 @@
1
+ # CloudmersiveImageRecognitionApiClient::PersonWithAge
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
+ **age_classification_confidence** | **Float** | Confidence level of age classification; possible values are between 0.0 and 1.0; higher is better, with values > 0.50 being high confidence results | [optional]
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
+
10
+
@@ -0,0 +1,9 @@
1
+ # CloudmersiveImageRecognitionApiClient::RecognitionOutcome
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **confidence_score** | **Float** | Scores closer to 1 are better than scores closer to 0 | [optional]
7
+ **description** | **String** | English language description of the image | [optional]
8
+
9
+
@@ -0,0 +1,287 @@
1
+ # CloudmersiveImageRecognitionApiClient::RecognizeApi
2
+
3
+ All URIs are relative to *https://api.cloudmersive.com*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**recognize_describe**](RecognizeApi.md#recognize_describe) | **POST** /image/recognize/describe | Describe an image in natural language
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
+ [**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
12
+
13
+
14
+ # **recognize_describe**
15
+ > ImageDescriptionResponse recognize_describe(image_file)
16
+
17
+ Describe an image in natural language
18
+
19
+ Generate an English language text description of the image as a sentence.
20
+
21
+ ### Example
22
+ ```ruby
23
+ # load the gem
24
+ require 'cloudmersive-image-recognition-api-client'
25
+ # setup authorization
26
+ CloudmersiveImageRecognitionApiClient.configure do |config|
27
+ # Configure API key authorization: Apikey
28
+ config.api_key['Apikey'] = 'YOUR API KEY'
29
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
30
+ #config.api_key_prefix['Apikey'] = 'Bearer'
31
+ end
32
+
33
+ api_instance = CloudmersiveImageRecognitionApiClient::RecognizeApi.new
34
+
35
+ 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.
36
+
37
+
38
+ begin
39
+ #Describe an image in natural language
40
+ result = api_instance.recognize_describe(image_file)
41
+ p result
42
+ rescue CloudmersiveImageRecognitionApiClient::ApiError => e
43
+ puts "Exception when calling RecognizeApi->recognize_describe: #{e}"
44
+ end
45
+ ```
46
+
47
+ ### Parameters
48
+
49
+ Name | Type | Description | Notes
50
+ ------------- | ------------- | ------------- | -------------
51
+ **image_file** | **File**| Image file to perform the operation on. Common file formats such as PNG, JPEG are supported. |
52
+
53
+ ### Return type
54
+
55
+ [**ImageDescriptionResponse**](ImageDescriptionResponse.md)
56
+
57
+ ### Authorization
58
+
59
+ [Apikey](../README.md#Apikey)
60
+
61
+ ### HTTP request headers
62
+
63
+ - **Content-Type**: multipart/form-data
64
+ - **Accept**: application/json, text/json, application/xml, text/xml
65
+
66
+
67
+
68
+ # **recognize_detect_and_unskew_document**
69
+ > String recognize_detect_and_unskew_document(image_file, opts)
70
+
71
+ Detect and unskew a photo of a document
72
+
73
+ Detect and unskew a photo of a document (e.g. taken on a cell phone) into a perfectly square image. Great for document scanning applications; once unskewed, this image is perfect for converting to PDF using the Convert API or optical character recognition using the OCR API.
74
+
75
+ ### Example
76
+ ```ruby
77
+ # load the gem
78
+ require 'cloudmersive-image-recognition-api-client'
79
+ # setup authorization
80
+ CloudmersiveImageRecognitionApiClient.configure do |config|
81
+ # Configure API key authorization: Apikey
82
+ config.api_key['Apikey'] = 'YOUR API KEY'
83
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
84
+ #config.api_key_prefix['Apikey'] = 'Bearer'
85
+ end
86
+
87
+ api_instance = CloudmersiveImageRecognitionApiClient::RecognizeApi.new
88
+
89
+ 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.
90
+
91
+ opts = {
92
+ post_processing_effect: "post_processing_effect_example" # String | Optional, post-processing effects to apply to the email, default is None. Possible values are None and BlackAndWhite (force the image into a black and white view to aid in OCR operations).
93
+ }
94
+
95
+ begin
96
+ #Detect and unskew a photo of a document
97
+ result = api_instance.recognize_detect_and_unskew_document(image_file, opts)
98
+ p result
99
+ rescue CloudmersiveImageRecognitionApiClient::ApiError => e
100
+ puts "Exception when calling RecognizeApi->recognize_detect_and_unskew_document: #{e}"
101
+ end
102
+ ```
103
+
104
+ ### Parameters
105
+
106
+ Name | Type | Description | Notes
107
+ ------------- | ------------- | ------------- | -------------
108
+ **image_file** | **File**| Image file to perform the operation on. Common file formats such as PNG, JPEG are supported. |
109
+ **post_processing_effect** | **String**| Optional, post-processing effects to apply to the email, default is None. Possible values are None and BlackAndWhite (force the image into a black and white view to aid in OCR operations). | [optional]
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/json, text/json, application/xml, text/xml
123
+
124
+
125
+
126
+ # **recognize_detect_objects**
127
+ > ObjectDetectionResult recognize_detect_objects(image_file)
128
+
129
+ Detect objects, including types and locations, in an image
130
+
131
+ Identify the position, size and description of objects in an image, along with a recognition confidence level. Detects both human people and objects in an image.
132
+
133
+ ### Example
134
+ ```ruby
135
+ # load the gem
136
+ require 'cloudmersive-image-recognition-api-client'
137
+ # setup authorization
138
+ CloudmersiveImageRecognitionApiClient.configure do |config|
139
+ # Configure API key authorization: Apikey
140
+ config.api_key['Apikey'] = 'YOUR API KEY'
141
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
142
+ #config.api_key_prefix['Apikey'] = 'Bearer'
143
+ end
144
+
145
+ api_instance = CloudmersiveImageRecognitionApiClient::RecognizeApi.new
146
+
147
+ 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.
148
+
149
+
150
+ begin
151
+ #Detect objects, including types and locations, in an image
152
+ result = api_instance.recognize_detect_objects(image_file)
153
+ p result
154
+ rescue CloudmersiveImageRecognitionApiClient::ApiError => e
155
+ puts "Exception when calling RecognizeApi->recognize_detect_objects: #{e}"
156
+ end
157
+ ```
158
+
159
+ ### Parameters
160
+
161
+ Name | Type | Description | Notes
162
+ ------------- | ------------- | ------------- | -------------
163
+ **image_file** | **File**| Image file to perform the operation on. Common file formats such as PNG, JPEG are supported. |
164
+
165
+ ### Return type
166
+
167
+ [**ObjectDetectionResult**](ObjectDetectionResult.md)
168
+
169
+ ### Authorization
170
+
171
+ [Apikey](../README.md#Apikey)
172
+
173
+ ### HTTP request headers
174
+
175
+ - **Content-Type**: multipart/form-data
176
+ - **Accept**: application/json, text/json, application/xml, text/xml
177
+
178
+
179
+
180
+ # **recognize_detect_people**
181
+ > ObjectDetectionResult recognize_detect_people(image_file)
182
+
183
+ Detect people, including locations, in an image
184
+
185
+ Identify the position, and size of human people in an image, along with a recognition confidence level. People in the image do NOT need to be facing the camera; they can be facing away, edge-on, etc.
186
+
187
+ ### Example
188
+ ```ruby
189
+ # load the gem
190
+ require 'cloudmersive-image-recognition-api-client'
191
+ # setup authorization
192
+ CloudmersiveImageRecognitionApiClient.configure do |config|
193
+ # Configure API key authorization: Apikey
194
+ config.api_key['Apikey'] = 'YOUR API KEY'
195
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
196
+ #config.api_key_prefix['Apikey'] = 'Bearer'
197
+ end
198
+
199
+ api_instance = CloudmersiveImageRecognitionApiClient::RecognizeApi.new
200
+
201
+ 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.
202
+
203
+
204
+ begin
205
+ #Detect people, including locations, in an image
206
+ result = api_instance.recognize_detect_people(image_file)
207
+ p result
208
+ rescue CloudmersiveImageRecognitionApiClient::ApiError => e
209
+ puts "Exception when calling RecognizeApi->recognize_detect_people: #{e}"
210
+ end
211
+ ```
212
+
213
+ ### Parameters
214
+
215
+ Name | Type | Description | Notes
216
+ ------------- | ------------- | ------------- | -------------
217
+ **image_file** | **File**| Image file to perform the operation on. Common file formats such as PNG, JPEG are supported. |
218
+
219
+ ### Return type
220
+
221
+ [**ObjectDetectionResult**](ObjectDetectionResult.md)
222
+
223
+ ### Authorization
224
+
225
+ [Apikey](../README.md#Apikey)
226
+
227
+ ### HTTP request headers
228
+
229
+ - **Content-Type**: multipart/form-data
230
+ - **Accept**: application/json, text/json, application/xml, text/xml
231
+
232
+
233
+
234
+ # **recognize_detect_vehicle_license_plates**
235
+ > VehicleLicensePlateDetectionResult recognize_detect_vehicle_license_plates(image_file)
236
+
237
+ Detect vehicle license plates in an image
238
+
239
+ 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.
240
+
241
+ ### Example
242
+ ```ruby
243
+ # load the gem
244
+ require 'cloudmersive-image-recognition-api-client'
245
+ # setup authorization
246
+ CloudmersiveImageRecognitionApiClient.configure do |config|
247
+ # Configure API key authorization: Apikey
248
+ config.api_key['Apikey'] = 'YOUR API KEY'
249
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
250
+ #config.api_key_prefix['Apikey'] = 'Bearer'
251
+ end
252
+
253
+ api_instance = CloudmersiveImageRecognitionApiClient::RecognizeApi.new
254
+
255
+ 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.
256
+
257
+
258
+ begin
259
+ #Detect vehicle license plates in an image
260
+ result = api_instance.recognize_detect_vehicle_license_plates(image_file)
261
+ p result
262
+ rescue CloudmersiveImageRecognitionApiClient::ApiError => e
263
+ puts "Exception when calling RecognizeApi->recognize_detect_vehicle_license_plates: #{e}"
264
+ end
265
+ ```
266
+
267
+ ### Parameters
268
+
269
+ Name | Type | Description | Notes
270
+ ------------- | ------------- | ------------- | -------------
271
+ **image_file** | **File**| Image file to perform the operation on. Common file formats such as PNG, JPEG are supported. |
272
+
273
+ ### Return type
274
+
275
+ [**VehicleLicensePlateDetectionResult**](VehicleLicensePlateDetectionResult.md)
276
+
277
+ ### Authorization
278
+
279
+ [Apikey](../README.md#Apikey)
280
+
281
+ ### HTTP request headers
282
+
283
+ - **Content-Type**: multipart/form-data
284
+ - **Accept**: application/json, text/json, application/xml, text/xml
285
+
286
+
287
+