cloudmersive-image-recognition-api-client 2.0.4 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +26 -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/ImageSimilarityComparisonResponse.md +10 -0
  11. data/docs/ImageSimilarityHashDistanceRequest.md +9 -0
  12. data/docs/ImageSimilarityHashDistanceResponse.md +9 -0
  13. data/docs/ImageSimilarityHashResponse.md +9 -0
  14. data/docs/NsfwAdvancedResult.md +19 -0
  15. data/docs/NsfwApi.md +169 -4
  16. data/docs/PersonWithAge.md +4 -1
  17. data/docs/RecognizeApi.md +124 -58
  18. data/docs/ResizeApi.md +55 -0
  19. data/docs/TextItem.md +1 -0
  20. data/lib/cloudmersive-image-recognition-api-client/api/ai_image_detection_api.rb +78 -0
  21. data/lib/cloudmersive-image-recognition-api-client/api/artistic_api.rb +1 -1
  22. data/lib/cloudmersive-image-recognition-api-client/api/convert_api.rb +58 -3
  23. data/lib/cloudmersive-image-recognition-api-client/api/edit_api.rb +1 -1
  24. data/lib/cloudmersive-image-recognition-api-client/api/face_api.rb +8 -8
  25. data/lib/cloudmersive-image-recognition-api-client/api/filter_api.rb +1 -1
  26. data/lib/cloudmersive-image-recognition-api-client/api/info_api.rb +1 -1
  27. data/lib/cloudmersive-image-recognition-api-client/api/nsfw_api.rb +170 -5
  28. data/lib/cloudmersive-image-recognition-api-client/api/recognize_api.rb +171 -104
  29. data/lib/cloudmersive-image-recognition-api-client/api/resize_api.rb +56 -1
  30. data/lib/cloudmersive-image-recognition-api-client/api/text_generation_api.rb +1 -1
  31. data/lib/cloudmersive-image-recognition-api-client/api_client.rb +1 -1
  32. data/lib/cloudmersive-image-recognition-api-client/api_error.rb +1 -1
  33. data/lib/cloudmersive-image-recognition-api-client/configuration.rb +1 -1
  34. data/lib/cloudmersive-image-recognition-api-client/models/age_detection_result.rb +3 -3
  35. data/lib/cloudmersive-image-recognition-api-client/models/color_result.rb +1 -1
  36. data/lib/cloudmersive-image-recognition-api-client/models/create_handwriting_request.rb +1 -1
  37. data/lib/cloudmersive-image-recognition-api-client/models/detected_license_plate.rb +1 -1
  38. data/lib/cloudmersive-image-recognition-api-client/models/dominant_color_result.rb +1 -1
  39. data/lib/cloudmersive-image-recognition-api-client/models/draw_polygon_instance.rb +1 -1
  40. data/lib/cloudmersive-image-recognition-api-client/models/draw_polygon_request.rb +1 -1
  41. data/lib/cloudmersive-image-recognition-api-client/models/draw_rectangle_instance.rb +1 -1
  42. data/lib/cloudmersive-image-recognition-api-client/models/draw_rectangle_request.rb +1 -1
  43. data/lib/cloudmersive-image-recognition-api-client/models/draw_text_instance.rb +1 -1
  44. data/lib/cloudmersive-image-recognition-api-client/models/draw_text_request.rb +1 -1
  45. data/lib/cloudmersive-image-recognition-api-client/models/face.rb +1 -1
  46. data/lib/cloudmersive-image-recognition-api-client/models/face_compare_response.rb +1 -1
  47. data/lib/cloudmersive-image-recognition-api-client/models/face_locate_response.rb +1 -1
  48. data/lib/cloudmersive-image-recognition-api-client/models/face_locate_with_landmarks_response.rb +1 -1
  49. data/lib/cloudmersive-image-recognition-api-client/models/face_match.rb +1 -1
  50. data/lib/cloudmersive-image-recognition-api-client/models/face_point.rb +1 -1
  51. data/lib/cloudmersive-image-recognition-api-client/models/face_with_landmarks.rb +1 -1
  52. data/lib/cloudmersive-image-recognition-api-client/models/find_symbol_result.rb +1 -1
  53. data/lib/cloudmersive-image-recognition-api-client/models/fine_text_detection_result.rb +1 -1
  54. data/lib/cloudmersive-image-recognition-api-client/models/fine_text_item.rb +12 -2
  55. data/lib/cloudmersive-image-recognition-api-client/models/{person_with_gender.rb → image_ai_detection_result.rb} +25 -25
  56. data/lib/cloudmersive-image-recognition-api-client/models/image_description_response.rb +1 -1
  57. data/lib/cloudmersive-image-recognition-api-client/models/image_metadata.rb +1 -1
  58. data/lib/cloudmersive-image-recognition-api-client/models/image_metadata_exif_value.rb +1 -1
  59. data/lib/cloudmersive-image-recognition-api-client/models/{detected_object.rb → image_similarity_comparison_response.rb} +25 -55
  60. data/lib/cloudmersive-image-recognition-api-client/models/image_similarity_hash_distance_request.rb +196 -0
  61. data/lib/cloudmersive-image-recognition-api-client/models/{object_detection_result.rb → image_similarity_hash_distance_response.rb} +12 -24
  62. data/lib/cloudmersive-image-recognition-api-client/models/{gender_detection_result.rb → image_similarity_hash_response.rb} +12 -24
  63. data/lib/cloudmersive-image-recognition-api-client/models/nsfw_advanced_result.rb +296 -0
  64. data/lib/cloudmersive-image-recognition-api-client/models/nsfw_result.rb +1 -1
  65. data/lib/cloudmersive-image-recognition-api-client/models/person_with_age.rb +36 -5
  66. data/lib/cloudmersive-image-recognition-api-client/models/polygon_point.rb +1 -1
  67. data/lib/cloudmersive-image-recognition-api-client/models/recognition_outcome.rb +1 -1
  68. data/lib/cloudmersive-image-recognition-api-client/models/text_detection_result.rb +1 -1
  69. data/lib/cloudmersive-image-recognition-api-client/models/text_item.rb +12 -2
  70. data/lib/cloudmersive-image-recognition-api-client/models/vehicle_license_plate_detection_result.rb +1 -1
  71. data/lib/cloudmersive-image-recognition-api-client/version.rb +2 -2
  72. data/lib/cloudmersive-image-recognition-api-client.rb +8 -5
  73. data/spec/api/ai_image_detection_api_spec.rb +47 -0
  74. data/spec/api/artistic_api_spec.rb +1 -1
  75. data/spec/api/convert_api_spec.rb +14 -2
  76. data/spec/api/edit_api_spec.rb +1 -1
  77. data/spec/api/face_api_spec.rb +4 -4
  78. data/spec/api/filter_api_spec.rb +1 -1
  79. data/spec/api/info_api_spec.rb +1 -1
  80. data/spec/api/nsfw_api_spec.rb +39 -3
  81. data/spec/api/recognize_api_spec.rb +40 -25
  82. data/spec/api/resize_api_spec.rb +13 -1
  83. data/spec/api/text_generation_api_spec.rb +1 -1
  84. data/spec/api_client_spec.rb +1 -1
  85. data/spec/configuration_spec.rb +1 -1
  86. data/spec/models/age_detection_result_spec.rb +1 -1
  87. data/spec/models/color_result_spec.rb +1 -1
  88. data/spec/models/create_handwriting_request_spec.rb +1 -1
  89. data/spec/models/detected_license_plate_spec.rb +1 -1
  90. data/spec/models/dominant_color_result_spec.rb +1 -1
  91. data/spec/models/draw_polygon_instance_spec.rb +1 -1
  92. data/spec/models/draw_polygon_request_spec.rb +1 -1
  93. data/spec/models/draw_rectangle_instance_spec.rb +1 -1
  94. data/spec/models/draw_rectangle_request_spec.rb +1 -1
  95. data/spec/models/draw_text_instance_spec.rb +1 -1
  96. data/spec/models/draw_text_request_spec.rb +1 -1
  97. data/spec/models/face_compare_response_spec.rb +1 -1
  98. data/spec/models/face_locate_response_spec.rb +1 -1
  99. data/spec/models/face_locate_with_landmarks_response_spec.rb +1 -1
  100. data/spec/models/face_match_spec.rb +1 -1
  101. data/spec/models/face_point_spec.rb +1 -1
  102. data/spec/models/face_spec.rb +1 -1
  103. data/spec/models/face_with_landmarks_spec.rb +1 -1
  104. data/spec/models/find_symbol_result_spec.rb +1 -1
  105. data/spec/models/fine_text_detection_result_spec.rb +1 -1
  106. data/spec/models/fine_text_item_spec.rb +7 -1
  107. data/spec/models/{person_with_gender_spec.rb → image_ai_detection_result_spec.rb} +10 -10
  108. data/spec/models/image_description_response_spec.rb +1 -1
  109. data/spec/models/image_metadata_exif_value_spec.rb +1 -1
  110. data/spec/models/image_metadata_spec.rb +1 -1
  111. data/spec/models/{gender_detection_result_spec.rb → image_similarity_comparison_response_spec.rb} +9 -9
  112. data/spec/models/image_similarity_hash_distance_request_spec.rb +47 -0
  113. data/spec/models/{object_detection_result_spec.rb → image_similarity_hash_distance_response_spec.rb} +8 -14
  114. data/spec/models/image_similarity_hash_response_spec.rb +47 -0
  115. data/spec/models/nsfw_advanced_result_spec.rb +107 -0
  116. data/spec/models/nsfw_result_spec.rb +1 -1
  117. data/spec/models/person_with_age_spec.rb +19 -1
  118. data/spec/models/polygon_point_spec.rb +1 -1
  119. data/spec/models/recognition_outcome_spec.rb +1 -1
  120. data/spec/models/text_detection_result_spec.rb +1 -1
  121. data/spec/models/text_item_spec.rb +7 -1
  122. data/spec/models/vehicle_license_plate_detection_result_spec.rb +1 -1
  123. data/spec/spec_helper.rb +1 -1
  124. metadata +39 -30
  125. data/docs/DetectedObject.md +0 -13
  126. data/docs/GenderDetectionResult.md +0 -10
  127. data/docs/ObjectDetectionResult.md +0 -10
  128. data/docs/PersonWithGender.md +0 -10
  129. data/spec/models/detected_object_spec.rb +0 -71
@@ -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,31 +132,31 @@ 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.
135
+ # Detect fine text in a photo of a document
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.
137
137
  # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
138
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)
139
+ # @return [FineTextDetectionResult]
140
+ def recognize_detect_text_fine(image_file, opts = {})
141
+ data, _status_code, _headers = recognize_detect_text_fine_with_http_info(image_file, opts)
142
142
  data
143
143
  end
144
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.
145
+ # Detect fine text in a photo of a document
146
+ # 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.
147
147
  # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
148
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 = {})
149
+ # @return [Array<(FineTextDetectionResult, Fixnum, Hash)>] FineTextDetectionResult data, response status code and response headers
150
+ def recognize_detect_text_fine_with_http_info(image_file, opts = {})
151
151
  if @api_client.config.debugging
152
- @api_client.config.logger.debug 'Calling API: RecognizeApi.recognize_detect_objects ...'
152
+ @api_client.config.logger.debug 'Calling API: RecognizeApi.recognize_detect_text_fine ...'
153
153
  end
154
154
  # verify the required parameter 'image_file' is set
155
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"
156
+ fail ArgumentError, "Missing the required parameter 'image_file' when calling RecognizeApi.recognize_detect_text_fine"
157
157
  end
158
158
  # resource path
159
- local_var_path = '/image/recognize/detect-objects'
159
+ local_var_path = '/image/recognize/detect-text/fine'
160
160
 
161
161
  # query parameters
162
162
  query_params = {}
@@ -181,37 +181,37 @@ module CloudmersiveImageRecognitionApiClient
181
181
  :form_params => form_params,
182
182
  :body => post_body,
183
183
  :auth_names => auth_names,
184
- :return_type => 'ObjectDetectionResult')
184
+ :return_type => 'FineTextDetectionResult')
185
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}"
186
+ @api_client.config.logger.debug "API called: RecognizeApi#recognize_detect_text_fine\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
187
187
  end
188
188
  return data, status_code, headers
189
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.
190
+ # Detect large text in a photo
191
+ # Identify the position, and size of large text within a photograph. Identify the location of large text in a photo - such as signs, titles, etc. and other forms of large, low-density text. Not suitable for high-density text (e.g. scans of documents, receipts, etc.) for OCR purposes - for OCR, please see our Deep Learning OCR APIs.
192
192
  # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
193
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)
194
+ # @return [TextDetectionResult]
195
+ def recognize_detect_text_large(image_file, opts = {})
196
+ data, _status_code, _headers = recognize_detect_text_large_with_http_info(image_file, opts)
197
197
  data
198
198
  end
199
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.
200
+ # Detect large text in a photo
201
+ # Identify the position, and size of large text within a photograph. Identify the location of large text in a photo - such as signs, titles, etc. and other forms of large, low-density text. Not suitable for high-density text (e.g. scans of documents, receipts, etc.) for OCR purposes - for OCR, please see our Deep Learning OCR APIs.
202
202
  # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
203
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 = {})
204
+ # @return [Array<(TextDetectionResult, Fixnum, Hash)>] TextDetectionResult data, response status code and response headers
205
+ def recognize_detect_text_large_with_http_info(image_file, opts = {})
206
206
  if @api_client.config.debugging
207
- @api_client.config.logger.debug 'Calling API: RecognizeApi.recognize_detect_people ...'
207
+ @api_client.config.logger.debug 'Calling API: RecognizeApi.recognize_detect_text_large ...'
208
208
  end
209
209
  # verify the required parameter 'image_file' is set
210
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"
211
+ fail ArgumentError, "Missing the required parameter 'image_file' when calling RecognizeApi.recognize_detect_text_large"
212
212
  end
213
213
  # resource path
214
- local_var_path = '/image/recognize/detect-people'
214
+ local_var_path = '/image/recognize/detect-text/large'
215
215
 
216
216
  # query parameters
217
217
  query_params = {}
@@ -236,37 +236,37 @@ module CloudmersiveImageRecognitionApiClient
236
236
  :form_params => form_params,
237
237
  :body => post_body,
238
238
  :auth_names => auth_names,
239
- :return_type => 'ObjectDetectionResult')
239
+ :return_type => 'TextDetectionResult')
240
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}"
241
+ @api_client.config.logger.debug "API called: RecognizeApi#recognize_detect_text_large\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
242
242
  end
243
243
  return data, status_code, headers
244
244
  end
245
- # Detect fine text in a photo of a document
246
- # 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.
245
+ # Detect vehicle license plates in an image
246
+ # Identify the position, and size, and content of vehicle license plates in an image. License plates should be within 15-20 degrees on-axis to the camera. Supported image formats are JPG, PNG and BMP.
247
247
  # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
248
248
  # @param [Hash] opts the optional parameters
249
- # @return [FineTextDetectionResult]
250
- def recognize_detect_text_fine(image_file, opts = {})
251
- data, _status_code, _headers = recognize_detect_text_fine_with_http_info(image_file, opts)
249
+ # @return [VehicleLicensePlateDetectionResult]
250
+ def recognize_detect_vehicle_license_plates(image_file, opts = {})
251
+ data, _status_code, _headers = recognize_detect_vehicle_license_plates_with_http_info(image_file, opts)
252
252
  data
253
253
  end
254
254
 
255
- # Detect fine text in a photo of a document
256
- # 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.
255
+ # Detect vehicle license plates in an image
256
+ # Identify the position, and size, and content of vehicle license plates in an image. License plates should be within 15-20 degrees on-axis to the camera. Supported image formats are JPG, PNG and BMP.
257
257
  # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
258
258
  # @param [Hash] opts the optional parameters
259
- # @return [Array<(FineTextDetectionResult, Fixnum, Hash)>] FineTextDetectionResult data, response status code and response headers
260
- def recognize_detect_text_fine_with_http_info(image_file, opts = {})
259
+ # @return [Array<(VehicleLicensePlateDetectionResult, Fixnum, Hash)>] VehicleLicensePlateDetectionResult data, response status code and response headers
260
+ def recognize_detect_vehicle_license_plates_with_http_info(image_file, opts = {})
261
261
  if @api_client.config.debugging
262
- @api_client.config.logger.debug 'Calling API: RecognizeApi.recognize_detect_text_fine ...'
262
+ @api_client.config.logger.debug 'Calling API: RecognizeApi.recognize_detect_vehicle_license_plates ...'
263
263
  end
264
264
  # verify the required parameter 'image_file' is set
265
265
  if @api_client.config.client_side_validation && image_file.nil?
266
- fail ArgumentError, "Missing the required parameter 'image_file' when calling RecognizeApi.recognize_detect_text_fine"
266
+ fail ArgumentError, "Missing the required parameter 'image_file' when calling RecognizeApi.recognize_detect_vehicle_license_plates"
267
267
  end
268
268
  # resource path
269
- local_var_path = '/image/recognize/detect-text/fine'
269
+ local_var_path = '/image/recognize/detect-vehicle-license-plates'
270
270
 
271
271
  # query parameters
272
272
  query_params = {}
@@ -291,37 +291,43 @@ module CloudmersiveImageRecognitionApiClient
291
291
  :form_params => form_params,
292
292
  :body => post_body,
293
293
  :auth_names => auth_names,
294
- :return_type => 'FineTextDetectionResult')
294
+ :return_type => 'VehicleLicensePlateDetectionResult')
295
295
  if @api_client.config.debugging
296
- @api_client.config.logger.debug "API called: RecognizeApi#recognize_detect_text_fine\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
296
+ @api_client.config.logger.debug "API called: RecognizeApi#recognize_detect_vehicle_license_plates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
297
297
  end
298
298
  return data, status_code, headers
299
299
  end
300
- # Detect large text in a photo
301
- # Identify the position, and size of large text within a photograph. Identify the location of large text in a photo - such as signs, titles, etc. and other forms of large, low-density text. Not suitable for high-density text (e.g. scans of documents, receipts, etc.) for OCR purposes - for OCR, please see our Deep Learning OCR APIs.
302
- # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
300
+ # Find the location of a symbol in an image
301
+ # Determine if an image contains a symbol, and if so, the location of that symbol in the image.
302
+ # @param input_image Image file to search through for the target image.
303
+ # @param target_image Image to find in the input image.
303
304
  # @param [Hash] opts the optional parameters
304
- # @return [TextDetectionResult]
305
- def recognize_detect_text_large(image_file, opts = {})
306
- data, _status_code, _headers = recognize_detect_text_large_with_http_info(image_file, opts)
305
+ # @return [FindSymbolResult]
306
+ def recognize_find_symbol(input_image, target_image, opts = {})
307
+ data, _status_code, _headers = recognize_find_symbol_with_http_info(input_image, target_image, opts)
307
308
  data
308
309
  end
309
310
 
310
- # Detect large text in a photo
311
- # Identify the position, and size of large text within a photograph. Identify the location of large text in a photo - such as signs, titles, etc. and other forms of large, low-density text. Not suitable for high-density text (e.g. scans of documents, receipts, etc.) for OCR purposes - for OCR, please see our Deep Learning OCR APIs.
312
- # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
311
+ # Find the location of a symbol in an image
312
+ # Determine if an image contains a symbol, and if so, the location of that symbol in the image.
313
+ # @param input_image Image file to search through for the target image.
314
+ # @param target_image Image to find in the input image.
313
315
  # @param [Hash] opts the optional parameters
314
- # @return [Array<(TextDetectionResult, Fixnum, Hash)>] TextDetectionResult data, response status code and response headers
315
- def recognize_detect_text_large_with_http_info(image_file, opts = {})
316
+ # @return [Array<(FindSymbolResult, Fixnum, Hash)>] FindSymbolResult data, response status code and response headers
317
+ def recognize_find_symbol_with_http_info(input_image, target_image, opts = {})
316
318
  if @api_client.config.debugging
317
- @api_client.config.logger.debug 'Calling API: RecognizeApi.recognize_detect_text_large ...'
319
+ @api_client.config.logger.debug 'Calling API: RecognizeApi.recognize_find_symbol ...'
318
320
  end
319
- # verify the required parameter 'image_file' is set
320
- if @api_client.config.client_side_validation && image_file.nil?
321
- fail ArgumentError, "Missing the required parameter 'image_file' when calling RecognizeApi.recognize_detect_text_large"
321
+ # verify the required parameter 'input_image' is set
322
+ if @api_client.config.client_side_validation && input_image.nil?
323
+ fail ArgumentError, "Missing the required parameter 'input_image' when calling RecognizeApi.recognize_find_symbol"
324
+ end
325
+ # verify the required parameter 'target_image' is set
326
+ if @api_client.config.client_side_validation && target_image.nil?
327
+ fail ArgumentError, "Missing the required parameter 'target_image' when calling RecognizeApi.recognize_find_symbol"
322
328
  end
323
329
  # resource path
324
- local_var_path = '/image/recognize/detect-text/large'
330
+ local_var_path = '/image/recognize/find/symbol'
325
331
 
326
332
  # query parameters
327
333
  query_params = {}
@@ -335,7 +341,8 @@ module CloudmersiveImageRecognitionApiClient
335
341
 
336
342
  # form parameters
337
343
  form_params = {}
338
- form_params['imageFile'] = image_file
344
+ form_params['inputImage'] = input_image
345
+ form_params['targetImage'] = target_image
339
346
 
340
347
  # http body (model)
341
348
  post_body = nil
@@ -346,37 +353,104 @@ module CloudmersiveImageRecognitionApiClient
346
353
  :form_params => form_params,
347
354
  :body => post_body,
348
355
  :auth_names => auth_names,
349
- :return_type => 'TextDetectionResult')
356
+ :return_type => 'FindSymbolResult')
350
357
  if @api_client.config.debugging
351
- @api_client.config.logger.debug "API called: RecognizeApi#recognize_detect_text_large\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
358
+ @api_client.config.logger.debug "API called: RecognizeApi#recognize_find_symbol\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
352
359
  end
353
360
  return data, status_code, headers
354
361
  end
355
- # Detect vehicle license plates in an image
356
- # Identify the position, and size, and content of vehicle license plates in an image. License plates should be within 15-20 degrees on-axis to the camera. Supported image formats are JPG, PNG and BMP.
362
+ # Compare two images for similarity
363
+ # Generates an image similarity score using Deep Learning between 0.0 and 1.0, values closer to 1.0 indicate greater similarity
364
+ # @param base_image Image file to compare against. Common file formats such as PNG, JPEG are supported.
365
+ # @param comparison_image Image to compare to the base image.
366
+ # @param [Hash] opts the optional parameters
367
+ # @option opts [String] :recognition_mode Optional, specify the recognition mode; possible values are Normal, Basic and Advanced. Default is Normal.
368
+ # @return [String]
369
+ def recognize_similarity_compare(base_image, comparison_image, opts = {})
370
+ data, _status_code, _headers = recognize_similarity_compare_with_http_info(base_image, comparison_image, opts)
371
+ data
372
+ end
373
+
374
+ # Compare two images for similarity
375
+ # Generates an image similarity score using Deep Learning between 0.0 and 1.0, values closer to 1.0 indicate greater similarity
376
+ # @param base_image Image file to compare against. Common file formats such as PNG, JPEG are supported.
377
+ # @param comparison_image Image to compare to the base image.
378
+ # @param [Hash] opts the optional parameters
379
+ # @option opts [String] :recognition_mode Optional, specify the recognition mode; possible values are Normal, Basic and Advanced. Default is Normal.
380
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
381
+ def recognize_similarity_compare_with_http_info(base_image, comparison_image, opts = {})
382
+ if @api_client.config.debugging
383
+ @api_client.config.logger.debug 'Calling API: RecognizeApi.recognize_similarity_compare ...'
384
+ end
385
+ # verify the required parameter 'base_image' is set
386
+ if @api_client.config.client_side_validation && base_image.nil?
387
+ fail ArgumentError, "Missing the required parameter 'base_image' when calling RecognizeApi.recognize_similarity_compare"
388
+ end
389
+ # verify the required parameter 'comparison_image' is set
390
+ if @api_client.config.client_side_validation && comparison_image.nil?
391
+ fail ArgumentError, "Missing the required parameter 'comparison_image' when calling RecognizeApi.recognize_similarity_compare"
392
+ end
393
+ # resource path
394
+ local_var_path = '/image/recognize/similarity/compare'
395
+
396
+ # query parameters
397
+ query_params = {}
398
+
399
+ # header parameters
400
+ header_params = {}
401
+ # HTTP header 'Accept' (if needed)
402
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
403
+ # HTTP header 'Content-Type'
404
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
405
+ header_params[:'recognitionMode'] = opts[:'recognition_mode'] if !opts[:'recognition_mode'].nil?
406
+
407
+ # form parameters
408
+ form_params = {}
409
+ form_params['baseImage'] = base_image
410
+ form_params['comparisonImage'] = comparison_image
411
+
412
+ # http body (model)
413
+ post_body = nil
414
+ auth_names = ['Apikey']
415
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
416
+ :header_params => header_params,
417
+ :query_params => query_params,
418
+ :form_params => form_params,
419
+ :body => post_body,
420
+ :auth_names => auth_names,
421
+ :return_type => 'String')
422
+ if @api_client.config.debugging
423
+ @api_client.config.logger.debug "API called: RecognizeApi#recognize_similarity_compare\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
424
+ end
425
+ return data, status_code, headers
426
+ end
427
+ # Generate a perceptual image hash
428
+ # Generates a hash value for the image; hash values that are closer together in terms of Hamming Distance are more similar.
357
429
  # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
358
430
  # @param [Hash] opts the optional parameters
359
- # @return [VehicleLicensePlateDetectionResult]
360
- def recognize_detect_vehicle_license_plates(image_file, opts = {})
361
- data, _status_code, _headers = recognize_detect_vehicle_license_plates_with_http_info(image_file, opts)
431
+ # @option opts [String] :recognition_mode Optional, specify the recognition mode; possible values are Normal, Basic and Advanced. Default is Normal.
432
+ # @return [ImageSimilarityHashResponse]
433
+ def recognize_similarity_hash(image_file, opts = {})
434
+ data, _status_code, _headers = recognize_similarity_hash_with_http_info(image_file, opts)
362
435
  data
363
436
  end
364
437
 
365
- # Detect vehicle license plates in an image
366
- # Identify the position, and size, and content of vehicle license plates in an image. License plates should be within 15-20 degrees on-axis to the camera. Supported image formats are JPG, PNG and BMP.
438
+ # Generate a perceptual image hash
439
+ # Generates a hash value for the image; hash values that are closer together in terms of Hamming Distance are more similar.
367
440
  # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
368
441
  # @param [Hash] opts the optional parameters
369
- # @return [Array<(VehicleLicensePlateDetectionResult, Fixnum, Hash)>] VehicleLicensePlateDetectionResult data, response status code and response headers
370
- def recognize_detect_vehicle_license_plates_with_http_info(image_file, opts = {})
442
+ # @option opts [String] :recognition_mode Optional, specify the recognition mode; possible values are Normal, Basic and Advanced. Default is Normal.
443
+ # @return [Array<(ImageSimilarityHashResponse, Fixnum, Hash)>] ImageSimilarityHashResponse data, response status code and response headers
444
+ def recognize_similarity_hash_with_http_info(image_file, opts = {})
371
445
  if @api_client.config.debugging
372
- @api_client.config.logger.debug 'Calling API: RecognizeApi.recognize_detect_vehicle_license_plates ...'
446
+ @api_client.config.logger.debug 'Calling API: RecognizeApi.recognize_similarity_hash ...'
373
447
  end
374
448
  # verify the required parameter 'image_file' is set
375
449
  if @api_client.config.client_side_validation && image_file.nil?
376
- fail ArgumentError, "Missing the required parameter 'image_file' when calling RecognizeApi.recognize_detect_vehicle_license_plates"
450
+ fail ArgumentError, "Missing the required parameter 'image_file' when calling RecognizeApi.recognize_similarity_hash"
377
451
  end
378
452
  # resource path
379
- local_var_path = '/image/recognize/detect-vehicle-license-plates'
453
+ local_var_path = '/image/recognize/similarity/hash'
380
454
 
381
455
  # query parameters
382
456
  query_params = {}
@@ -387,6 +461,7 @@ module CloudmersiveImageRecognitionApiClient
387
461
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
388
462
  # HTTP header 'Content-Type'
389
463
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
464
+ header_params[:'recognitionMode'] = opts[:'recognition_mode'] if !opts[:'recognition_mode'].nil?
390
465
 
391
466
  # form parameters
392
467
  form_params = {}
@@ -401,43 +476,37 @@ module CloudmersiveImageRecognitionApiClient
401
476
  :form_params => form_params,
402
477
  :body => post_body,
403
478
  :auth_names => auth_names,
404
- :return_type => 'VehicleLicensePlateDetectionResult')
479
+ :return_type => 'ImageSimilarityHashResponse')
405
480
  if @api_client.config.debugging
406
- @api_client.config.logger.debug "API called: RecognizeApi#recognize_detect_vehicle_license_plates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
481
+ @api_client.config.logger.debug "API called: RecognizeApi#recognize_similarity_hash\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
407
482
  end
408
483
  return data, status_code, headers
409
484
  end
410
- # Find the location of a symbol in an image
411
- # Determine if an image contains a symbol, and if so, the location of that symbol in the image.
412
- # @param input_image Image file to search through for the target image.
413
- # @param target_image Image to find in the input image.
485
+ # Calculates the similarity between two perceptual image hashes
486
+ # Calculates the similarity between two perceptual image hashes by computing the Hamming Distance between them.
487
+ # @param request
414
488
  # @param [Hash] opts the optional parameters
415
- # @return [FindSymbolResult]
416
- def recognize_find_symbol(input_image, target_image, opts = {})
417
- data, _status_code, _headers = recognize_find_symbol_with_http_info(input_image, target_image, opts)
489
+ # @return [ImageSimilarityHashDistanceResponse]
490
+ def recognize_similarity_hash_distance(request, opts = {})
491
+ data, _status_code, _headers = recognize_similarity_hash_distance_with_http_info(request, opts)
418
492
  data
419
493
  end
420
494
 
421
- # Find the location of a symbol in an image
422
- # Determine if an image contains a symbol, and if so, the location of that symbol in the image.
423
- # @param input_image Image file to search through for the target image.
424
- # @param target_image Image to find in the input image.
495
+ # Calculates the similarity between two perceptual image hashes
496
+ # Calculates the similarity between two perceptual image hashes by computing the Hamming Distance between them.
497
+ # @param request
425
498
  # @param [Hash] opts the optional parameters
426
- # @return [Array<(FindSymbolResult, Fixnum, Hash)>] FindSymbolResult data, response status code and response headers
427
- def recognize_find_symbol_with_http_info(input_image, target_image, opts = {})
499
+ # @return [Array<(ImageSimilarityHashDistanceResponse, Fixnum, Hash)>] ImageSimilarityHashDistanceResponse data, response status code and response headers
500
+ def recognize_similarity_hash_distance_with_http_info(request, opts = {})
428
501
  if @api_client.config.debugging
429
- @api_client.config.logger.debug 'Calling API: RecognizeApi.recognize_find_symbol ...'
430
- end
431
- # verify the required parameter 'input_image' is set
432
- if @api_client.config.client_side_validation && input_image.nil?
433
- fail ArgumentError, "Missing the required parameter 'input_image' when calling RecognizeApi.recognize_find_symbol"
502
+ @api_client.config.logger.debug 'Calling API: RecognizeApi.recognize_similarity_hash_distance ...'
434
503
  end
435
- # verify the required parameter 'target_image' is set
436
- if @api_client.config.client_side_validation && target_image.nil?
437
- fail ArgumentError, "Missing the required parameter 'target_image' when calling RecognizeApi.recognize_find_symbol"
504
+ # verify the required parameter 'request' is set
505
+ if @api_client.config.client_side_validation && request.nil?
506
+ fail ArgumentError, "Missing the required parameter 'request' when calling RecognizeApi.recognize_similarity_hash_distance"
438
507
  end
439
508
  # resource path
440
- local_var_path = '/image/recognize/find/symbol'
509
+ local_var_path = '/image/recognize/similarity/hash/distance'
441
510
 
442
511
  # query parameters
443
512
  query_params = {}
@@ -447,15 +516,13 @@ module CloudmersiveImageRecognitionApiClient
447
516
  # HTTP header 'Accept' (if needed)
448
517
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
449
518
  # HTTP header 'Content-Type'
450
- header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
519
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
451
520
 
452
521
  # form parameters
453
522
  form_params = {}
454
- form_params['inputImage'] = input_image
455
- form_params['targetImage'] = target_image
456
523
 
457
524
  # http body (model)
458
- post_body = nil
525
+ post_body = @api_client.object_to_http_body(request)
459
526
  auth_names = ['Apikey']
460
527
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
461
528
  :header_params => header_params,
@@ -463,9 +530,9 @@ module CloudmersiveImageRecognitionApiClient
463
530
  :form_params => form_params,
464
531
  :body => post_body,
465
532
  :auth_names => auth_names,
466
- :return_type => 'FindSymbolResult')
533
+ :return_type => 'ImageSimilarityHashDistanceResponse')
467
534
  if @api_client.config.debugging
468
- @api_client.config.logger.debug "API called: RecognizeApi#recognize_find_symbol\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
535
+ @api_client.config.logger.debug "API called: RecognizeApi#recognize_similarity_hash_distance\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
469
536
  end
470
537
  return data, status_code, headers
471
538
  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
 
@@ -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