cloudmersive-image-recognition-api-client 2.0.5 → 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.
Files changed (130) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +19 -19
  3. data/cloudmersive-image-recognition-api-client.gemspec +1 -1
  4. data/docs/AgeDetectionResult.md +1 -1
  5. data/docs/AiImageDetectionApi.md +63 -0
  6. data/docs/ConvertApi.md +58 -3
  7. data/docs/FaceApi.md +4 -4
  8. data/docs/FineTextItem.md +1 -0
  9. data/docs/ImageAiDetectionResult.md +10 -0
  10. data/docs/NsfwAdvancedResult.md +19 -0
  11. data/docs/NsfwApi.md +169 -4
  12. data/docs/PersonWithAge.md +4 -1
  13. data/docs/RecognizeApi.md +0 -110
  14. data/docs/ResizeApi.md +55 -0
  15. data/docs/TextItem.md +1 -0
  16. data/lib/cloudmersive-image-recognition-api-client/api/ai_image_detection_api.rb +78 -0
  17. data/lib/cloudmersive-image-recognition-api-client/api/artistic_api.rb +1 -1
  18. data/lib/cloudmersive-image-recognition-api-client/api/convert_api.rb +58 -3
  19. data/lib/cloudmersive-image-recognition-api-client/api/edit_api.rb +1 -1
  20. data/lib/cloudmersive-image-recognition-api-client/api/face_api.rb +8 -8
  21. data/lib/cloudmersive-image-recognition-api-client/api/filter_api.rb +1 -1
  22. data/lib/cloudmersive-image-recognition-api-client/api/info_api.rb +1 -1
  23. data/lib/cloudmersive-image-recognition-api-client/api/nsfw_api.rb +170 -5
  24. data/lib/cloudmersive-image-recognition-api-client/api/recognize_api.rb +1 -111
  25. data/lib/cloudmersive-image-recognition-api-client/api/resize_api.rb +56 -1
  26. data/lib/cloudmersive-image-recognition-api-client/api/text_generation_api.rb +1 -1
  27. data/lib/cloudmersive-image-recognition-api-client/api_client.rb +1 -1
  28. data/lib/cloudmersive-image-recognition-api-client/api_error.rb +1 -1
  29. data/lib/cloudmersive-image-recognition-api-client/configuration.rb +1 -1
  30. data/lib/cloudmersive-image-recognition-api-client/models/age_detection_result.rb +3 -3
  31. data/lib/cloudmersive-image-recognition-api-client/models/color_result.rb +1 -1
  32. data/lib/cloudmersive-image-recognition-api-client/models/create_handwriting_request.rb +1 -1
  33. data/lib/cloudmersive-image-recognition-api-client/models/detected_license_plate.rb +1 -1
  34. data/lib/cloudmersive-image-recognition-api-client/models/dominant_color_result.rb +1 -1
  35. data/lib/cloudmersive-image-recognition-api-client/models/draw_polygon_instance.rb +1 -1
  36. data/lib/cloudmersive-image-recognition-api-client/models/draw_polygon_request.rb +1 -1
  37. data/lib/cloudmersive-image-recognition-api-client/models/draw_rectangle_instance.rb +1 -1
  38. data/lib/cloudmersive-image-recognition-api-client/models/draw_rectangle_request.rb +1 -1
  39. data/lib/cloudmersive-image-recognition-api-client/models/draw_text_instance.rb +1 -1
  40. data/lib/cloudmersive-image-recognition-api-client/models/draw_text_request.rb +1 -1
  41. data/lib/cloudmersive-image-recognition-api-client/models/face.rb +1 -1
  42. data/lib/cloudmersive-image-recognition-api-client/models/face_compare_response.rb +1 -1
  43. data/lib/cloudmersive-image-recognition-api-client/models/face_locate_response.rb +1 -1
  44. data/lib/cloudmersive-image-recognition-api-client/models/face_locate_with_landmarks_response.rb +1 -1
  45. data/lib/cloudmersive-image-recognition-api-client/models/face_match.rb +1 -1
  46. data/lib/cloudmersive-image-recognition-api-client/models/face_point.rb +1 -1
  47. data/lib/cloudmersive-image-recognition-api-client/models/face_with_landmarks.rb +1 -1
  48. data/lib/cloudmersive-image-recognition-api-client/models/find_symbol_result.rb +1 -1
  49. data/lib/cloudmersive-image-recognition-api-client/models/fine_text_detection_result.rb +1 -1
  50. data/lib/cloudmersive-image-recognition-api-client/models/fine_text_item.rb +12 -2
  51. data/lib/cloudmersive-image-recognition-api-client/models/{gender_detection_result.rb → image_ai_detection_result.rb} +25 -27
  52. data/lib/cloudmersive-image-recognition-api-client/models/image_description_response.rb +1 -1
  53. data/lib/cloudmersive-image-recognition-api-client/models/image_metadata.rb +1 -1
  54. data/lib/cloudmersive-image-recognition-api-client/models/image_metadata_exif_value.rb +1 -1
  55. data/lib/cloudmersive-image-recognition-api-client/models/image_similarity_comparison_response.rb +1 -1
  56. data/lib/cloudmersive-image-recognition-api-client/models/image_similarity_hash_distance_request.rb +1 -1
  57. data/lib/cloudmersive-image-recognition-api-client/models/image_similarity_hash_distance_response.rb +1 -1
  58. data/lib/cloudmersive-image-recognition-api-client/models/image_similarity_hash_response.rb +1 -1
  59. data/lib/cloudmersive-image-recognition-api-client/models/nsfw_advanced_result.rb +296 -0
  60. data/lib/cloudmersive-image-recognition-api-client/models/nsfw_result.rb +1 -1
  61. data/lib/cloudmersive-image-recognition-api-client/models/person_with_age.rb +36 -5
  62. data/lib/cloudmersive-image-recognition-api-client/models/polygon_point.rb +1 -1
  63. data/lib/cloudmersive-image-recognition-api-client/models/recognition_outcome.rb +1 -1
  64. data/lib/cloudmersive-image-recognition-api-client/models/text_detection_result.rb +1 -1
  65. data/lib/cloudmersive-image-recognition-api-client/models/text_item.rb +12 -2
  66. data/lib/cloudmersive-image-recognition-api-client/models/vehicle_license_plate_detection_result.rb +1 -1
  67. data/lib/cloudmersive-image-recognition-api-client/version.rb +2 -2
  68. data/lib/cloudmersive-image-recognition-api-client.rb +4 -5
  69. data/spec/api/ai_image_detection_api_spec.rb +47 -0
  70. data/spec/api/artistic_api_spec.rb +1 -1
  71. data/spec/api/convert_api_spec.rb +14 -2
  72. data/spec/api/edit_api_spec.rb +1 -1
  73. data/spec/api/face_api_spec.rb +4 -4
  74. data/spec/api/filter_api_spec.rb +1 -1
  75. data/spec/api/info_api_spec.rb +1 -1
  76. data/spec/api/nsfw_api_spec.rb +39 -3
  77. data/spec/api/recognize_api_spec.rb +1 -25
  78. data/spec/api/resize_api_spec.rb +13 -1
  79. data/spec/api/text_generation_api_spec.rb +1 -1
  80. data/spec/api_client_spec.rb +1 -1
  81. data/spec/configuration_spec.rb +1 -1
  82. data/spec/models/age_detection_result_spec.rb +1 -1
  83. data/spec/models/color_result_spec.rb +1 -1
  84. data/spec/models/create_handwriting_request_spec.rb +1 -1
  85. data/spec/models/detected_license_plate_spec.rb +1 -1
  86. data/spec/models/dominant_color_result_spec.rb +1 -1
  87. data/spec/models/draw_polygon_instance_spec.rb +1 -1
  88. data/spec/models/draw_polygon_request_spec.rb +1 -1
  89. data/spec/models/draw_rectangle_instance_spec.rb +1 -1
  90. data/spec/models/draw_rectangle_request_spec.rb +1 -1
  91. data/spec/models/draw_text_instance_spec.rb +1 -1
  92. data/spec/models/draw_text_request_spec.rb +1 -1
  93. data/spec/models/face_compare_response_spec.rb +1 -1
  94. data/spec/models/face_locate_response_spec.rb +1 -1
  95. data/spec/models/face_locate_with_landmarks_response_spec.rb +1 -1
  96. data/spec/models/face_match_spec.rb +1 -1
  97. data/spec/models/face_point_spec.rb +1 -1
  98. data/spec/models/face_spec.rb +1 -1
  99. data/spec/models/face_with_landmarks_spec.rb +1 -1
  100. data/spec/models/find_symbol_result_spec.rb +1 -1
  101. data/spec/models/fine_text_detection_result_spec.rb +1 -1
  102. data/spec/models/fine_text_item_spec.rb +7 -1
  103. data/spec/models/{person_with_gender_spec.rb → image_ai_detection_result_spec.rb} +10 -10
  104. data/spec/models/image_description_response_spec.rb +1 -1
  105. data/spec/models/image_metadata_exif_value_spec.rb +1 -1
  106. data/spec/models/image_metadata_spec.rb +1 -1
  107. data/spec/models/image_similarity_comparison_response_spec.rb +1 -1
  108. data/spec/models/image_similarity_hash_distance_request_spec.rb +1 -1
  109. data/spec/models/image_similarity_hash_distance_response_spec.rb +1 -1
  110. data/spec/models/image_similarity_hash_response_spec.rb +1 -1
  111. data/spec/models/nsfw_advanced_result_spec.rb +107 -0
  112. data/spec/models/nsfw_result_spec.rb +1 -1
  113. data/spec/models/person_with_age_spec.rb +19 -1
  114. data/spec/models/polygon_point_spec.rb +1 -1
  115. data/spec/models/recognition_outcome_spec.rb +1 -1
  116. data/spec/models/text_detection_result_spec.rb +1 -1
  117. data/spec/models/text_item_spec.rb +7 -1
  118. data/spec/models/vehicle_license_plate_detection_result_spec.rb +1 -1
  119. data/spec/spec_helper.rb +1 -1
  120. metadata +27 -30
  121. data/docs/DetectedObject.md +0 -13
  122. data/docs/GenderDetectionResult.md +0 -10
  123. data/docs/ObjectDetectionResult.md +0 -10
  124. data/docs/PersonWithGender.md +0 -10
  125. data/lib/cloudmersive-image-recognition-api-client/models/detected_object.rb +0 -236
  126. data/lib/cloudmersive-image-recognition-api-client/models/object_detection_result.rb +0 -208
  127. data/lib/cloudmersive-image-recognition-api-client/models/person_with_gender.rb +0 -206
  128. data/spec/models/detected_object_spec.rb +0 -71
  129. data/spec/models/gender_detection_result_spec.rb +0 -53
  130. data/spec/models/object_detection_result_spec.rb +0 -53
@@ -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
 
@@ -19,8 +19,8 @@ module CloudmersiveImageRecognitionApiClient
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
- # Not safe for work NSFW racy content classification
23
- # Classify an image into Not Safe For Work (NSFW)/Porn/Racy content and Safe Content.
22
+ # Not safe for work (NSFW) content classification for Images
23
+ # Classify an image into Not Safe For Work (NSFW)/Pornographic/Nudity/Racy content and Safe Content. Helpful for filtering out unsafe content when processing user images. Input image should be JPG, PNG or GIF. Consumes 20 API calls.
24
24
  # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
25
25
  # @param [Hash] opts the optional parameters
26
26
  # @return [NsfwResult]
@@ -29,8 +29,8 @@ module CloudmersiveImageRecognitionApiClient
29
29
  data
30
30
  end
31
31
 
32
- # Not safe for work NSFW racy content classification
33
- # Classify an image into Not Safe For Work (NSFW)/Porn/Racy content and Safe Content.
32
+ # Not safe for work (NSFW) content classification for Images
33
+ # Classify an image into Not Safe For Work (NSFW)/Pornographic/Nudity/Racy content and Safe Content. Helpful for filtering out unsafe content when processing user images. Input image should be JPG, PNG or GIF. Consumes 20 API calls.
34
34
  # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
35
35
  # @param [Hash] opts the optional parameters
36
36
  # @return [Array<(NsfwResult, Fixnum, Hash)>] NsfwResult data, response status code and response headers
@@ -74,5 +74,170 @@ module CloudmersiveImageRecognitionApiClient
74
74
  end
75
75
  return data, status_code, headers
76
76
  end
77
+ # Advanced content moderation and not safe for work (NSFW) content classification for Images
78
+ # Uses advanced AI to classify an image into Not Safe For Work (NSFW) or not and determine if it contains nudity, graphic violence, non-graphic violence, self-harm, hate, potential illegal activity, medical imagery, or profanity. Helpful for filtering out unsafe content when processing user images. Input image should be JPG, PNG. Consumes 100 API calls. Requires Managed Instance or Private Cloud deployment, and a GPU.
79
+ # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
80
+ # @param [Hash] opts the optional parameters
81
+ # @return [NsfwAdvancedResult]
82
+ def nsfw_classify_advanced(image_file, opts = {})
83
+ data, _status_code, _headers = nsfw_classify_advanced_with_http_info(image_file, opts)
84
+ data
85
+ end
86
+
87
+ # Advanced content moderation and not safe for work (NSFW) content classification for Images
88
+ # Uses advanced AI to classify an image into Not Safe For Work (NSFW) or not and determine if it contains nudity, graphic violence, non-graphic violence, self-harm, hate, potential illegal activity, medical imagery, or profanity. Helpful for filtering out unsafe content when processing user images. Input image should be JPG, PNG. Consumes 100 API calls. Requires Managed Instance or Private Cloud deployment, and a GPU.
89
+ # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
90
+ # @param [Hash] opts the optional parameters
91
+ # @return [Array<(NsfwAdvancedResult, Fixnum, Hash)>] NsfwAdvancedResult data, response status code and response headers
92
+ def nsfw_classify_advanced_with_http_info(image_file, opts = {})
93
+ if @api_client.config.debugging
94
+ @api_client.config.logger.debug 'Calling API: NsfwApi.nsfw_classify_advanced ...'
95
+ end
96
+ # verify the required parameter 'image_file' is set
97
+ if @api_client.config.client_side_validation && image_file.nil?
98
+ fail ArgumentError, "Missing the required parameter 'image_file' when calling NsfwApi.nsfw_classify_advanced"
99
+ end
100
+ # resource path
101
+ local_var_path = '/image/nsfw/classify/advanced'
102
+
103
+ # query parameters
104
+ query_params = {}
105
+
106
+ # header parameters
107
+ header_params = {}
108
+ # HTTP header 'Accept' (if needed)
109
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
110
+ # HTTP header 'Content-Type'
111
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
112
+
113
+ # form parameters
114
+ form_params = {}
115
+ form_params['imageFile'] = image_file
116
+
117
+ # http body (model)
118
+ post_body = nil
119
+ auth_names = ['Apikey']
120
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
121
+ :header_params => header_params,
122
+ :query_params => query_params,
123
+ :form_params => form_params,
124
+ :body => post_body,
125
+ :auth_names => auth_names,
126
+ :return_type => 'NsfwAdvancedResult')
127
+ if @api_client.config.debugging
128
+ @api_client.config.logger.debug "API called: NsfwApi#nsfw_classify_advanced\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
129
+ end
130
+ return data, status_code, headers
131
+ end
132
+ # Not safe for work (NSFW) content classification for Documents
133
+ # Classify a document (PDF, DOCX, DOC, XLSX, XLS, PPTX, PPT) into Not Safe For Work (NSFW)/Pornographic/Nudity/Racy content and Safe Content. Helpful for filtering out unsafe content when processing user images. Consumes 20 API calls per image.
134
+ # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
135
+ # @param [Hash] opts the optional parameters
136
+ # @return [NsfwResult]
137
+ def nsfw_classify_document(image_file, opts = {})
138
+ data, _status_code, _headers = nsfw_classify_document_with_http_info(image_file, opts)
139
+ data
140
+ end
141
+
142
+ # Not safe for work (NSFW) content classification for Documents
143
+ # Classify a document (PDF, DOCX, DOC, XLSX, XLS, PPTX, PPT) into Not Safe For Work (NSFW)/Pornographic/Nudity/Racy content and Safe Content. Helpful for filtering out unsafe content when processing user images. Consumes 20 API calls per image.
144
+ # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
145
+ # @param [Hash] opts the optional parameters
146
+ # @return [Array<(NsfwResult, Fixnum, Hash)>] NsfwResult data, response status code and response headers
147
+ def nsfw_classify_document_with_http_info(image_file, opts = {})
148
+ if @api_client.config.debugging
149
+ @api_client.config.logger.debug 'Calling API: NsfwApi.nsfw_classify_document ...'
150
+ end
151
+ # verify the required parameter 'image_file' is set
152
+ if @api_client.config.client_side_validation && image_file.nil?
153
+ fail ArgumentError, "Missing the required parameter 'image_file' when calling NsfwApi.nsfw_classify_document"
154
+ end
155
+ # resource path
156
+ local_var_path = '/image/nsfw/classify/document'
157
+
158
+ # query parameters
159
+ query_params = {}
160
+
161
+ # header parameters
162
+ header_params = {}
163
+ # HTTP header 'Accept' (if needed)
164
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
165
+ # HTTP header 'Content-Type'
166
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
167
+
168
+ # form parameters
169
+ form_params = {}
170
+ form_params['imageFile'] = image_file
171
+
172
+ # http body (model)
173
+ post_body = nil
174
+ auth_names = ['Apikey']
175
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
176
+ :header_params => header_params,
177
+ :query_params => query_params,
178
+ :form_params => form_params,
179
+ :body => post_body,
180
+ :auth_names => auth_names,
181
+ :return_type => 'NsfwResult')
182
+ if @api_client.config.debugging
183
+ @api_client.config.logger.debug "API called: NsfwApi#nsfw_classify_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
184
+ end
185
+ return data, status_code, headers
186
+ end
187
+ # Not safe for work (NSFW) content classification for Video
188
+ # Classify a video into Not Safe For Work (NSFW)/Pornographic/Nudity/Racy content and Safe Content. Helpful for filtering out unsafe content when processing user images. Input image should be MP4, MOV, WEBM, MKV, AVI, FLV, MPG, GIF. Consumes 20 API calls per frame analyzed. Requires Cloudmersive Managed Instance or Private Cloud deployment.
189
+ # @param video_file Video file to perform the operation on. Common file formats such as MP4, MPG are supported.
190
+ # @param [Hash] opts the optional parameters
191
+ # @return [NsfwResult]
192
+ def nsfw_classify_video(video_file, opts = {})
193
+ data, _status_code, _headers = nsfw_classify_video_with_http_info(video_file, opts)
194
+ data
195
+ end
196
+
197
+ # Not safe for work (NSFW) content classification for Video
198
+ # Classify a video into Not Safe For Work (NSFW)/Pornographic/Nudity/Racy content and Safe Content. Helpful for filtering out unsafe content when processing user images. Input image should be MP4, MOV, WEBM, MKV, AVI, FLV, MPG, GIF. Consumes 20 API calls per frame analyzed. Requires Cloudmersive Managed Instance or Private Cloud deployment.
199
+ # @param video_file Video file to perform the operation on. Common file formats such as MP4, MPG are supported.
200
+ # @param [Hash] opts the optional parameters
201
+ # @return [Array<(NsfwResult, Fixnum, Hash)>] NsfwResult data, response status code and response headers
202
+ def nsfw_classify_video_with_http_info(video_file, opts = {})
203
+ if @api_client.config.debugging
204
+ @api_client.config.logger.debug 'Calling API: NsfwApi.nsfw_classify_video ...'
205
+ end
206
+ # verify the required parameter 'video_file' is set
207
+ if @api_client.config.client_side_validation && video_file.nil?
208
+ fail ArgumentError, "Missing the required parameter 'video_file' when calling NsfwApi.nsfw_classify_video"
209
+ end
210
+ # resource path
211
+ local_var_path = '/image/nsfw/classify/video'
212
+
213
+ # query parameters
214
+ query_params = {}
215
+
216
+ # header parameters
217
+ header_params = {}
218
+ # HTTP header 'Accept' (if needed)
219
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
220
+ # HTTP header 'Content-Type'
221
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
222
+
223
+ # form parameters
224
+ form_params = {}
225
+ form_params['videoFile'] = video_file
226
+
227
+ # http body (model)
228
+ post_body = nil
229
+ auth_names = ['Apikey']
230
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
231
+ :header_params => header_params,
232
+ :query_params => query_params,
233
+ :form_params => form_params,
234
+ :body => post_body,
235
+ :auth_names => auth_names,
236
+ :return_type => 'NsfwResult')
237
+ if @api_client.config.debugging
238
+ @api_client.config.logger.debug "API called: NsfwApi#nsfw_classify_video\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
239
+ end
240
+ return data, status_code, headers
241
+ end
77
242
  end
78
243
  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
 
@@ -132,116 +132,6 @@ module CloudmersiveImageRecognitionApiClient
132
132
  end
133
133
  return data, status_code, headers
134
134
  end
135
- # Detect objects including types and locations in an image
136
- # 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.
137
- # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
138
- # @param [Hash] opts the optional parameters
139
- # @return [ObjectDetectionResult]
140
- def recognize_detect_objects(image_file, opts = {})
141
- data, _status_code, _headers = recognize_detect_objects_with_http_info(image_file, opts)
142
- data
143
- end
144
-
145
- # Detect objects including types and locations in an image
146
- # 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.
147
- # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
148
- # @param [Hash] opts the optional parameters
149
- # @return [Array<(ObjectDetectionResult, Fixnum, Hash)>] ObjectDetectionResult data, response status code and response headers
150
- def recognize_detect_objects_with_http_info(image_file, opts = {})
151
- if @api_client.config.debugging
152
- @api_client.config.logger.debug 'Calling API: RecognizeApi.recognize_detect_objects ...'
153
- end
154
- # verify the required parameter 'image_file' is set
155
- if @api_client.config.client_side_validation && image_file.nil?
156
- fail ArgumentError, "Missing the required parameter 'image_file' when calling RecognizeApi.recognize_detect_objects"
157
- end
158
- # resource path
159
- local_var_path = '/image/recognize/detect-objects'
160
-
161
- # query parameters
162
- query_params = {}
163
-
164
- # header parameters
165
- header_params = {}
166
- # HTTP header 'Accept' (if needed)
167
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
168
- # HTTP header 'Content-Type'
169
- header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
170
-
171
- # form parameters
172
- form_params = {}
173
- form_params['imageFile'] = image_file
174
-
175
- # http body (model)
176
- post_body = nil
177
- auth_names = ['Apikey']
178
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
179
- :header_params => header_params,
180
- :query_params => query_params,
181
- :form_params => form_params,
182
- :body => post_body,
183
- :auth_names => auth_names,
184
- :return_type => 'ObjectDetectionResult')
185
- if @api_client.config.debugging
186
- @api_client.config.logger.debug "API called: RecognizeApi#recognize_detect_objects\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
187
- end
188
- return data, status_code, headers
189
- end
190
- # Detect people including locations in an image
191
- # 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.
192
- # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
193
- # @param [Hash] opts the optional parameters
194
- # @return [ObjectDetectionResult]
195
- def recognize_detect_people(image_file, opts = {})
196
- data, _status_code, _headers = recognize_detect_people_with_http_info(image_file, opts)
197
- data
198
- end
199
-
200
- # Detect people including locations in an image
201
- # 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.
202
- # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
203
- # @param [Hash] opts the optional parameters
204
- # @return [Array<(ObjectDetectionResult, Fixnum, Hash)>] ObjectDetectionResult data, response status code and response headers
205
- def recognize_detect_people_with_http_info(image_file, opts = {})
206
- if @api_client.config.debugging
207
- @api_client.config.logger.debug 'Calling API: RecognizeApi.recognize_detect_people ...'
208
- end
209
- # verify the required parameter 'image_file' is set
210
- if @api_client.config.client_side_validation && image_file.nil?
211
- fail ArgumentError, "Missing the required parameter 'image_file' when calling RecognizeApi.recognize_detect_people"
212
- end
213
- # resource path
214
- local_var_path = '/image/recognize/detect-people'
215
-
216
- # query parameters
217
- query_params = {}
218
-
219
- # header parameters
220
- header_params = {}
221
- # HTTP header 'Accept' (if needed)
222
- header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
223
- # HTTP header 'Content-Type'
224
- header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
225
-
226
- # form parameters
227
- form_params = {}
228
- form_params['imageFile'] = image_file
229
-
230
- # http body (model)
231
- post_body = nil
232
- auth_names = ['Apikey']
233
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
234
- :header_params => header_params,
235
- :query_params => query_params,
236
- :form_params => form_params,
237
- :body => post_body,
238
- :auth_names => auth_names,
239
- :return_type => 'ObjectDetectionResult')
240
- if @api_client.config.debugging
241
- @api_client.config.logger.debug "API called: RecognizeApi#recognize_detect_people\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
242
- end
243
- return data, status_code, headers
244
- end
245
135
  # Detect fine text in a photo of a document
246
136
  # 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.
247
137
  # @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
 
@@ -86,6 +86,61 @@ module CloudmersiveImageRecognitionApiClient
86
86
  end
87
87
  return data, status_code, headers
88
88
  end
89
+ # Resize an image with AI super sampling
90
+ # 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.
91
+ # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
92
+ # @param [Hash] opts the optional parameters
93
+ # @return [String]
94
+ def resize_resize_ai_super_sampling(image_file, opts = {})
95
+ data, _status_code, _headers = resize_resize_ai_super_sampling_with_http_info(image_file, opts)
96
+ data
97
+ end
98
+
99
+ # Resize an image with AI super sampling
100
+ # 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.
101
+ # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
102
+ # @param [Hash] opts the optional parameters
103
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
104
+ def resize_resize_ai_super_sampling_with_http_info(image_file, opts = {})
105
+ if @api_client.config.debugging
106
+ @api_client.config.logger.debug 'Calling API: ResizeApi.resize_resize_ai_super_sampling ...'
107
+ end
108
+ # verify the required parameter 'image_file' is set
109
+ if @api_client.config.client_side_validation && image_file.nil?
110
+ fail ArgumentError, "Missing the required parameter 'image_file' when calling ResizeApi.resize_resize_ai_super_sampling"
111
+ end
112
+ # resource path
113
+ local_var_path = '/image/resize/ai/target'
114
+
115
+ # query parameters
116
+ query_params = {}
117
+
118
+ # header parameters
119
+ header_params = {}
120
+ # HTTP header 'Accept' (if needed)
121
+ header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
122
+ # HTTP header 'Content-Type'
123
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
124
+
125
+ # form parameters
126
+ form_params = {}
127
+ form_params['imageFile'] = image_file
128
+
129
+ # http body (model)
130
+ post_body = nil
131
+ auth_names = ['Apikey']
132
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
133
+ :header_params => header_params,
134
+ :query_params => query_params,
135
+ :form_params => form_params,
136
+ :body => post_body,
137
+ :auth_names => auth_names,
138
+ :return_type => 'String')
139
+ if @api_client.config.debugging
140
+ @api_client.config.logger.debug "API called: ResizeApi#resize_resize_ai_super_sampling\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
141
+ end
142
+ return data, status_code, headers
143
+ end
89
144
  # Resize an image
90
145
  # Resize an image to a specific width and specific height. Resize is EXIF-aware.
91
146
  # @param width Width of the output image - final image will be exactly this width
@@ -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
 
@@ -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
 
@@ -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
 
@@ -13,12 +13,12 @@ Swagger Codegen version: 2.4.14
13
13
  require 'date'
14
14
 
15
15
  module CloudmersiveImageRecognitionApiClient
16
- # Result from classifying the Age of people in an image
16
+ # Result from classifying the Age and Gender of people in an image
17
17
  class AgeDetectionResult
18
18
  # True if the operation was successful, false otherwise
19
19
  attr_accessor :successful
20
20
 
21
- # People in the image annotated with age information
21
+ # People in the image annotated with age and gender information
22
22
  attr_accessor :people_with_age
23
23
 
24
24
  # Number of people identified in the image with an age
@@ -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
 
@@ -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
 
@@ -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
 
@@ -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
 
@@ -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
 
@@ -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
 
@@ -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
 
@@ -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
 
@@ -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