cloudmersive-image-recognition-api-client 1.3.7 → 1.4.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 (108) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +24 -5
  3. data/cloudmersive-image-recognition-api-client.gemspec +1 -1
  4. data/docs/ColorResult.md +10 -0
  5. data/docs/DetectedLicensePlate.md +4 -4
  6. data/docs/DominantColorResult.md +9 -0
  7. data/docs/EditApi.md +134 -0
  8. data/docs/FaceApi.md +55 -0
  9. data/docs/FaceCompareResponse.md +1 -1
  10. data/docs/FaceLocateWithLandmarksResponse.md +1 -1
  11. data/docs/FaceWithLandmarks.md +9 -9
  12. data/docs/FilterApi.md +475 -0
  13. data/docs/FindSymbolResult.md +12 -0
  14. data/docs/GenderDetectionResult.md +10 -0
  15. data/docs/InfoApi.md +63 -0
  16. data/docs/PersonWithAge.md +1 -0
  17. data/docs/PersonWithGender.md +10 -0
  18. data/docs/RecognizeApi.md +68 -4
  19. data/docs/ResizeApi.md +64 -3
  20. data/lib/cloudmersive-image-recognition-api-client.rb +8 -1
  21. data/lib/cloudmersive-image-recognition-api-client/api/artistic_api.rb +1 -1
  22. data/lib/cloudmersive-image-recognition-api-client/api/edit_api.rb +161 -1
  23. data/lib/cloudmersive-image-recognition-api-client/api/face_api.rb +57 -1
  24. data/lib/cloudmersive-image-recognition-api-client/api/filter_api.rb +524 -0
  25. data/lib/cloudmersive-image-recognition-api-client/api/info_api.rb +79 -0
  26. data/lib/cloudmersive-image-recognition-api-client/api/nsfw_api.rb +1 -1
  27. data/lib/cloudmersive-image-recognition-api-client/api/recognize_api.rb +76 -4
  28. data/lib/cloudmersive-image-recognition-api-client/api/resize_api.rb +71 -3
  29. data/lib/cloudmersive-image-recognition-api-client/api_client.rb +1 -1
  30. data/lib/cloudmersive-image-recognition-api-client/api_error.rb +1 -1
  31. data/lib/cloudmersive-image-recognition-api-client/configuration.rb +1 -1
  32. data/lib/cloudmersive-image-recognition-api-client/models/age_detection_result.rb +1 -1
  33. data/lib/cloudmersive-image-recognition-api-client/models/color_result.rb +209 -0
  34. data/lib/cloudmersive-image-recognition-api-client/models/detected_license_plate.rb +26 -22
  35. data/lib/cloudmersive-image-recognition-api-client/models/detected_object.rb +1 -1
  36. data/lib/cloudmersive-image-recognition-api-client/models/dominant_color_result.rb +201 -0
  37. data/lib/cloudmersive-image-recognition-api-client/models/draw_polygon_instance.rb +1 -1
  38. data/lib/cloudmersive-image-recognition-api-client/models/draw_polygon_request.rb +1 -1
  39. data/lib/cloudmersive-image-recognition-api-client/models/draw_rectangle_instance.rb +1 -1
  40. data/lib/cloudmersive-image-recognition-api-client/models/draw_rectangle_request.rb +1 -1
  41. data/lib/cloudmersive-image-recognition-api-client/models/draw_text_instance.rb +1 -1
  42. data/lib/cloudmersive-image-recognition-api-client/models/draw_text_request.rb +1 -1
  43. data/lib/cloudmersive-image-recognition-api-client/models/face.rb +1 -1
  44. data/lib/cloudmersive-image-recognition-api-client/models/face_compare_response.rb +15 -14
  45. data/lib/cloudmersive-image-recognition-api-client/models/face_locate_response.rb +1 -1
  46. data/lib/cloudmersive-image-recognition-api-client/models/face_locate_with_landmarks_response.rb +15 -14
  47. data/lib/cloudmersive-image-recognition-api-client/models/face_match.rb +1 -1
  48. data/lib/cloudmersive-image-recognition-api-client/models/face_point.rb +1 -1
  49. data/lib/cloudmersive-image-recognition-api-client/models/face_with_landmarks.rb +54 -45
  50. data/lib/cloudmersive-image-recognition-api-client/models/find_symbol_result.rb +229 -0
  51. data/lib/cloudmersive-image-recognition-api-client/models/fine_text_detection_result.rb +1 -1
  52. data/lib/cloudmersive-image-recognition-api-client/models/fine_text_item.rb +1 -1
  53. data/lib/cloudmersive-image-recognition-api-client/models/gender_detection_result.rb +211 -0
  54. data/lib/cloudmersive-image-recognition-api-client/models/image_description_response.rb +1 -1
  55. data/lib/cloudmersive-image-recognition-api-client/models/nsfw_result.rb +1 -1
  56. data/lib/cloudmersive-image-recognition-api-client/models/object_detection_result.rb +1 -1
  57. data/lib/cloudmersive-image-recognition-api-client/models/person_with_age.rb +14 -5
  58. data/lib/cloudmersive-image-recognition-api-client/models/person_with_gender.rb +209 -0
  59. data/lib/cloudmersive-image-recognition-api-client/models/polygon_point.rb +1 -1
  60. data/lib/cloudmersive-image-recognition-api-client/models/recognition_outcome.rb +1 -1
  61. data/lib/cloudmersive-image-recognition-api-client/models/text_detection_result.rb +1 -1
  62. data/lib/cloudmersive-image-recognition-api-client/models/text_item.rb +1 -1
  63. data/lib/cloudmersive-image-recognition-api-client/models/vehicle_license_plate_detection_result.rb +1 -1
  64. data/lib/cloudmersive-image-recognition-api-client/version.rb +2 -2
  65. data/spec/api/artistic_api_spec.rb +1 -1
  66. data/spec/api/edit_api_spec.rb +33 -1
  67. data/spec/api/face_api_spec.rb +13 -1
  68. data/spec/api/filter_api_spec.rb +140 -0
  69. data/spec/api/info_api_spec.rb +47 -0
  70. data/spec/api/nsfw_api_spec.rb +1 -1
  71. data/spec/api/recognize_api_spec.rb +15 -1
  72. data/spec/api/resize_api_spec.rb +16 -2
  73. data/spec/api_client_spec.rb +1 -1
  74. data/spec/configuration_spec.rb +1 -1
  75. data/spec/models/age_detection_result_spec.rb +1 -1
  76. data/spec/models/color_result_spec.rb +54 -0
  77. data/spec/models/detected_license_plate_spec.rb +7 -7
  78. data/spec/models/detected_object_spec.rb +1 -1
  79. data/spec/models/dominant_color_result_spec.rb +48 -0
  80. data/spec/models/draw_polygon_instance_spec.rb +1 -1
  81. data/spec/models/draw_polygon_request_spec.rb +1 -1
  82. data/spec/models/draw_rectangle_instance_spec.rb +1 -1
  83. data/spec/models/draw_rectangle_request_spec.rb +1 -1
  84. data/spec/models/draw_text_instance_spec.rb +1 -1
  85. data/spec/models/draw_text_request_spec.rb +1 -1
  86. data/spec/models/face_compare_response_spec.rb +5 -5
  87. data/spec/models/face_locate_response_spec.rb +1 -1
  88. data/spec/models/face_locate_with_landmarks_response_spec.rb +5 -5
  89. data/spec/models/face_match_spec.rb +1 -1
  90. data/spec/models/face_point_spec.rb +1 -1
  91. data/spec/models/face_spec.rb +1 -1
  92. data/spec/models/face_with_landmarks_spec.rb +14 -14
  93. data/spec/models/find_symbol_result_spec.rb +66 -0
  94. data/spec/models/fine_text_detection_result_spec.rb +1 -1
  95. data/spec/models/fine_text_item_spec.rb +1 -1
  96. data/spec/models/gender_detection_result_spec.rb +54 -0
  97. data/spec/models/image_description_response_spec.rb +1 -1
  98. data/spec/models/nsfw_result_spec.rb +1 -1
  99. data/spec/models/object_detection_result_spec.rb +1 -1
  100. data/spec/models/person_with_age_spec.rb +7 -1
  101. data/spec/models/person_with_gender_spec.rb +54 -0
  102. data/spec/models/polygon_point_spec.rb +1 -1
  103. data/spec/models/recognition_outcome_spec.rb +1 -1
  104. data/spec/models/text_detection_result_spec.rb +1 -1
  105. data/spec/models/text_item_spec.rb +1 -1
  106. data/spec/models/vehicle_license_plate_detection_result_spec.rb +1 -1
  107. data/spec/spec_helper.rb +1 -1
  108. metadata +36 -16
@@ -6,7 +6,7 @@
6
6
  OpenAPI spec version: v1
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: unset
9
+ Swagger Codegen version: 2.3.1
10
10
 
11
11
  =end
12
12
 
@@ -251,6 +251,62 @@ module CloudmersiveImageRecognitionApiClient
251
251
  return data, status_code, headers
252
252
  end
253
253
 
254
+ # Detect the gender of people in an image
255
+ # Identify the gender, position, and size of human faces in an image, along with a recognition confidence level. People in the image should be facing the camera.
256
+ # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
257
+ # @param [Hash] opts the optional parameters
258
+ # @return [GenderDetectionResult]
259
+ def face_detect_gender(image_file, opts = {})
260
+ data, _status_code, _headers = face_detect_gender_with_http_info(image_file, opts)
261
+ return data
262
+ end
263
+
264
+ # Detect the gender of people in an image
265
+ # Identify the gender, position, and size of human faces in an image, along with a recognition confidence level. People in the image should be facing the camera.
266
+ # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
267
+ # @param [Hash] opts the optional parameters
268
+ # @return [Array<(GenderDetectionResult, Fixnum, Hash)>] GenderDetectionResult data, response status code and response headers
269
+ def face_detect_gender_with_http_info(image_file, opts = {})
270
+ if @api_client.config.debugging
271
+ @api_client.config.logger.debug "Calling API: FaceApi.face_detect_gender ..."
272
+ end
273
+ # verify the required parameter 'image_file' is set
274
+ if @api_client.config.client_side_validation && image_file.nil?
275
+ fail ArgumentError, "Missing the required parameter 'image_file' when calling FaceApi.face_detect_gender"
276
+ end
277
+ # resource path
278
+ local_var_path = "/image/face/detect-gender"
279
+
280
+ # query parameters
281
+ query_params = {}
282
+
283
+ # header parameters
284
+ header_params = {}
285
+ # HTTP header 'Accept' (if needed)
286
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
287
+ # HTTP header 'Content-Type'
288
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
289
+
290
+ # form parameters
291
+ form_params = {}
292
+ form_params["imageFile"] = image_file
293
+
294
+ # http body (model)
295
+ post_body = nil
296
+ auth_names = ['Apikey']
297
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
298
+ :header_params => header_params,
299
+ :query_params => query_params,
300
+ :form_params => form_params,
301
+ :body => post_body,
302
+ :auth_names => auth_names,
303
+ :return_type => 'GenderDetectionResult')
304
+ if @api_client.config.debugging
305
+ @api_client.config.logger.debug "API called: FaceApi#face_detect_gender\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
306
+ end
307
+ return data, status_code, headers
308
+ end
309
+
254
310
  # Find faces in an image
255
311
  # Locate the positions of all faces in an image
256
312
  # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
@@ -0,0 +1,524 @@
1
+ =begin
2
+ #imageapi
3
+
4
+ #Image Recognition and Processing APIs let you use Machine Learning to recognize and process images, and also perform useful image modification operations.
5
+
6
+ OpenAPI spec version: v1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.3.1
10
+
11
+ =end
12
+
13
+ require "uri"
14
+
15
+ module CloudmersiveImageRecognitionApiClient
16
+ class FilterApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+
23
+ # Convert image to black-and-white grayscale
24
+ # Remove color from the image by converting to a grayscale, black-and-white image
25
+ # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
26
+ # @param [Hash] opts the optional parameters
27
+ # @return [String]
28
+ def filter_black_and_white(image_file, opts = {})
29
+ data, _status_code, _headers = filter_black_and_white_with_http_info(image_file, opts)
30
+ return data
31
+ end
32
+
33
+ # Convert image to black-and-white grayscale
34
+ # Remove color from the image by converting to a grayscale, black-and-white image
35
+ # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
36
+ # @param [Hash] opts the optional parameters
37
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
38
+ def filter_black_and_white_with_http_info(image_file, opts = {})
39
+ if @api_client.config.debugging
40
+ @api_client.config.logger.debug "Calling API: FilterApi.filter_black_and_white ..."
41
+ end
42
+ # verify the required parameter 'image_file' is set
43
+ if @api_client.config.client_side_validation && image_file.nil?
44
+ fail ArgumentError, "Missing the required parameter 'image_file' when calling FilterApi.filter_black_and_white"
45
+ end
46
+ # resource path
47
+ local_var_path = "/image/filter/black-and-white"
48
+
49
+ # query parameters
50
+ query_params = {}
51
+
52
+ # header parameters
53
+ header_params = {}
54
+ # HTTP header 'Accept' (if needed)
55
+ header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
56
+ # HTTP header 'Content-Type'
57
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
58
+
59
+ # form parameters
60
+ form_params = {}
61
+ form_params["imageFile"] = image_file
62
+
63
+ # http body (model)
64
+ post_body = nil
65
+ auth_names = ['Apikey']
66
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
67
+ :header_params => header_params,
68
+ :query_params => query_params,
69
+ :form_params => form_params,
70
+ :body => post_body,
71
+ :auth_names => auth_names,
72
+ :return_type => 'String')
73
+ if @api_client.config.debugging
74
+ @api_client.config.logger.debug "API called: FilterApi#filter_black_and_white\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
75
+ end
76
+ return data, status_code, headers
77
+ end
78
+
79
+ # Despeckle (remove point noise) from the image
80
+ # Remove point noise / despeckle the input image
81
+ # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
82
+ # @param [Hash] opts the optional parameters
83
+ # @return [String]
84
+ def filter_despeckle(image_file, opts = {})
85
+ data, _status_code, _headers = filter_despeckle_with_http_info(image_file, opts)
86
+ return data
87
+ end
88
+
89
+ # Despeckle (remove point noise) from the image
90
+ # Remove point noise / despeckle the input image
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 [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
94
+ def filter_despeckle_with_http_info(image_file, opts = {})
95
+ if @api_client.config.debugging
96
+ @api_client.config.logger.debug "Calling API: FilterApi.filter_despeckle ..."
97
+ end
98
+ # verify the required parameter 'image_file' is set
99
+ if @api_client.config.client_side_validation && image_file.nil?
100
+ fail ArgumentError, "Missing the required parameter 'image_file' when calling FilterApi.filter_despeckle"
101
+ end
102
+ # resource path
103
+ local_var_path = "/image/filter/despeckle"
104
+
105
+ # query parameters
106
+ query_params = {}
107
+
108
+ # header parameters
109
+ header_params = {}
110
+ # HTTP header 'Accept' (if needed)
111
+ header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
112
+ # HTTP header 'Content-Type'
113
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
114
+
115
+ # form parameters
116
+ form_params = {}
117
+ form_params["imageFile"] = image_file
118
+
119
+ # http body (model)
120
+ post_body = nil
121
+ auth_names = ['Apikey']
122
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
123
+ :header_params => header_params,
124
+ :query_params => query_params,
125
+ :form_params => form_params,
126
+ :body => post_body,
127
+ :auth_names => auth_names,
128
+ :return_type => 'String')
129
+ if @api_client.config.debugging
130
+ @api_client.config.logger.debug "API called: FilterApi#filter_despeckle\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
131
+ end
132
+ return data, status_code, headers
133
+ end
134
+
135
+ # Detect and highlight edges in an image
136
+ # Perform an edge detection operation on the input image
137
+ # @param radius Radius in pixels of the edge detection operation; a larger radius will produce a greater effect
138
+ # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
139
+ # @param [Hash] opts the optional parameters
140
+ # @return [String]
141
+ def filter_edge_detect(radius, image_file, opts = {})
142
+ data, _status_code, _headers = filter_edge_detect_with_http_info(radius, image_file, opts)
143
+ return data
144
+ end
145
+
146
+ # Detect and highlight edges in an image
147
+ # Perform an edge detection operation on the input image
148
+ # @param radius Radius in pixels of the edge detection operation; a larger radius will produce a greater effect
149
+ # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
150
+ # @param [Hash] opts the optional parameters
151
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
152
+ def filter_edge_detect_with_http_info(radius, image_file, opts = {})
153
+ if @api_client.config.debugging
154
+ @api_client.config.logger.debug "Calling API: FilterApi.filter_edge_detect ..."
155
+ end
156
+ # verify the required parameter 'radius' is set
157
+ if @api_client.config.client_side_validation && radius.nil?
158
+ fail ArgumentError, "Missing the required parameter 'radius' when calling FilterApi.filter_edge_detect"
159
+ end
160
+ # verify the required parameter 'image_file' is set
161
+ if @api_client.config.client_side_validation && image_file.nil?
162
+ fail ArgumentError, "Missing the required parameter 'image_file' when calling FilterApi.filter_edge_detect"
163
+ end
164
+ # resource path
165
+ local_var_path = "/image/filter/edge-detect/{radius}".sub('{' + 'radius' + '}', radius.to_s)
166
+
167
+ # query parameters
168
+ query_params = {}
169
+
170
+ # header parameters
171
+ header_params = {}
172
+ # HTTP header 'Accept' (if needed)
173
+ header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
174
+ # HTTP header 'Content-Type'
175
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
176
+
177
+ # form parameters
178
+ form_params = {}
179
+ form_params["imageFile"] = image_file
180
+
181
+ # http body (model)
182
+ post_body = nil
183
+ auth_names = ['Apikey']
184
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
185
+ :header_params => header_params,
186
+ :query_params => query_params,
187
+ :form_params => form_params,
188
+ :body => post_body,
189
+ :auth_names => auth_names,
190
+ :return_type => 'String')
191
+ if @api_client.config.debugging
192
+ @api_client.config.logger.debug "API called: FilterApi#filter_edge_detect\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
193
+ end
194
+ return data, status_code, headers
195
+ end
196
+
197
+ # Emboss an image
198
+ # Perform an emboss operation on the input image
199
+ # @param radius Radius in pixels of the emboss operation; a larger radius will produce a greater effect
200
+ # @param sigma Sigma, or variance, of the emboss operation
201
+ # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
202
+ # @param [Hash] opts the optional parameters
203
+ # @return [String]
204
+ def filter_emboss(radius, sigma, image_file, opts = {})
205
+ data, _status_code, _headers = filter_emboss_with_http_info(radius, sigma, image_file, opts)
206
+ return data
207
+ end
208
+
209
+ # Emboss an image
210
+ # Perform an emboss operation on the input image
211
+ # @param radius Radius in pixels of the emboss operation; a larger radius will produce a greater effect
212
+ # @param sigma Sigma, or variance, of the emboss operation
213
+ # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
214
+ # @param [Hash] opts the optional parameters
215
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
216
+ def filter_emboss_with_http_info(radius, sigma, image_file, opts = {})
217
+ if @api_client.config.debugging
218
+ @api_client.config.logger.debug "Calling API: FilterApi.filter_emboss ..."
219
+ end
220
+ # verify the required parameter 'radius' is set
221
+ if @api_client.config.client_side_validation && radius.nil?
222
+ fail ArgumentError, "Missing the required parameter 'radius' when calling FilterApi.filter_emboss"
223
+ end
224
+ # verify the required parameter 'sigma' is set
225
+ if @api_client.config.client_side_validation && sigma.nil?
226
+ fail ArgumentError, "Missing the required parameter 'sigma' when calling FilterApi.filter_emboss"
227
+ end
228
+ # verify the required parameter 'image_file' is set
229
+ if @api_client.config.client_side_validation && image_file.nil?
230
+ fail ArgumentError, "Missing the required parameter 'image_file' when calling FilterApi.filter_emboss"
231
+ end
232
+ # resource path
233
+ local_var_path = "/image/filter/emboss/{radius}/{sigma}".sub('{' + 'radius' + '}', radius.to_s).sub('{' + 'sigma' + '}', sigma.to_s)
234
+
235
+ # query parameters
236
+ query_params = {}
237
+
238
+ # header parameters
239
+ header_params = {}
240
+ # HTTP header 'Accept' (if needed)
241
+ header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
242
+ # HTTP header 'Content-Type'
243
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
244
+
245
+ # form parameters
246
+ form_params = {}
247
+ form_params["imageFile"] = image_file
248
+
249
+ # http body (model)
250
+ post_body = nil
251
+ auth_names = ['Apikey']
252
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
253
+ :header_params => header_params,
254
+ :query_params => query_params,
255
+ :form_params => form_params,
256
+ :body => post_body,
257
+ :auth_names => auth_names,
258
+ :return_type => 'String')
259
+ if @api_client.config.debugging
260
+ @api_client.config.logger.debug "API called: FilterApi#filter_emboss\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
261
+ end
262
+ return data, status_code, headers
263
+ end
264
+
265
+ # Perform a guassian blur on the input image
266
+ # Perform a gaussian blur on the input image
267
+ # @param radius Radius in pixels of the blur operation; a larger radius will produce a greater blur effect
268
+ # @param sigma Sigma, or variance, of the gaussian blur operation
269
+ # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
270
+ # @param [Hash] opts the optional parameters
271
+ # @return [String]
272
+ def filter_gaussian_blur(radius, sigma, image_file, opts = {})
273
+ data, _status_code, _headers = filter_gaussian_blur_with_http_info(radius, sigma, image_file, opts)
274
+ return data
275
+ end
276
+
277
+ # Perform a guassian blur on the input image
278
+ # Perform a gaussian blur on the input image
279
+ # @param radius Radius in pixels of the blur operation; a larger radius will produce a greater blur effect
280
+ # @param sigma Sigma, or variance, of the gaussian blur operation
281
+ # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
282
+ # @param [Hash] opts the optional parameters
283
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
284
+ def filter_gaussian_blur_with_http_info(radius, sigma, image_file, opts = {})
285
+ if @api_client.config.debugging
286
+ @api_client.config.logger.debug "Calling API: FilterApi.filter_gaussian_blur ..."
287
+ end
288
+ # verify the required parameter 'radius' is set
289
+ if @api_client.config.client_side_validation && radius.nil?
290
+ fail ArgumentError, "Missing the required parameter 'radius' when calling FilterApi.filter_gaussian_blur"
291
+ end
292
+ # verify the required parameter 'sigma' is set
293
+ if @api_client.config.client_side_validation && sigma.nil?
294
+ fail ArgumentError, "Missing the required parameter 'sigma' when calling FilterApi.filter_gaussian_blur"
295
+ end
296
+ # verify the required parameter 'image_file' is set
297
+ if @api_client.config.client_side_validation && image_file.nil?
298
+ fail ArgumentError, "Missing the required parameter 'image_file' when calling FilterApi.filter_gaussian_blur"
299
+ end
300
+ # resource path
301
+ local_var_path = "/image/filter/blur/guassian/{radius}/{sigma}".sub('{' + 'radius' + '}', radius.to_s).sub('{' + 'sigma' + '}', sigma.to_s)
302
+
303
+ # query parameters
304
+ query_params = {}
305
+
306
+ # header parameters
307
+ header_params = {}
308
+ # HTTP header 'Accept' (if needed)
309
+ header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
310
+ # HTTP header 'Content-Type'
311
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
312
+
313
+ # form parameters
314
+ form_params = {}
315
+ form_params["imageFile"] = image_file
316
+
317
+ # http body (model)
318
+ post_body = nil
319
+ auth_names = ['Apikey']
320
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
321
+ :header_params => header_params,
322
+ :query_params => query_params,
323
+ :form_params => form_params,
324
+ :body => post_body,
325
+ :auth_names => auth_names,
326
+ :return_type => 'String')
327
+ if @api_client.config.debugging
328
+ @api_client.config.logger.debug "API called: FilterApi#filter_gaussian_blur\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
329
+ end
330
+ return data, status_code, headers
331
+ end
332
+
333
+ # Perform a motion blur on the input image
334
+ # Perform a motion blur on the input image at a specific angle
335
+ # @param radius Radius in pixels of the blur operation; a larger radius will produce a greater blur effect
336
+ # @param sigma Sigma, or variance, of the motion blur operation
337
+ # @param angle Angle of the motion blur in degrees
338
+ # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
339
+ # @param [Hash] opts the optional parameters
340
+ # @return [String]
341
+ def filter_motion_blur(radius, sigma, angle, image_file, opts = {})
342
+ data, _status_code, _headers = filter_motion_blur_with_http_info(radius, sigma, angle, image_file, opts)
343
+ return data
344
+ end
345
+
346
+ # Perform a motion blur on the input image
347
+ # Perform a motion blur on the input image at a specific angle
348
+ # @param radius Radius in pixels of the blur operation; a larger radius will produce a greater blur effect
349
+ # @param sigma Sigma, or variance, of the motion blur operation
350
+ # @param angle Angle of the motion blur in degrees
351
+ # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
352
+ # @param [Hash] opts the optional parameters
353
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
354
+ def filter_motion_blur_with_http_info(radius, sigma, angle, image_file, opts = {})
355
+ if @api_client.config.debugging
356
+ @api_client.config.logger.debug "Calling API: FilterApi.filter_motion_blur ..."
357
+ end
358
+ # verify the required parameter 'radius' is set
359
+ if @api_client.config.client_side_validation && radius.nil?
360
+ fail ArgumentError, "Missing the required parameter 'radius' when calling FilterApi.filter_motion_blur"
361
+ end
362
+ # verify the required parameter 'sigma' is set
363
+ if @api_client.config.client_side_validation && sigma.nil?
364
+ fail ArgumentError, "Missing the required parameter 'sigma' when calling FilterApi.filter_motion_blur"
365
+ end
366
+ # verify the required parameter 'angle' is set
367
+ if @api_client.config.client_side_validation && angle.nil?
368
+ fail ArgumentError, "Missing the required parameter 'angle' when calling FilterApi.filter_motion_blur"
369
+ end
370
+ # verify the required parameter 'image_file' is set
371
+ if @api_client.config.client_side_validation && image_file.nil?
372
+ fail ArgumentError, "Missing the required parameter 'image_file' when calling FilterApi.filter_motion_blur"
373
+ end
374
+ # resource path
375
+ local_var_path = "/image/filter/blur/motion/{radius}/{sigma}/{angle}".sub('{' + 'radius' + '}', radius.to_s).sub('{' + 'sigma' + '}', sigma.to_s).sub('{' + 'angle' + '}', angle.to_s)
376
+
377
+ # query parameters
378
+ query_params = {}
379
+
380
+ # header parameters
381
+ header_params = {}
382
+ # HTTP header 'Accept' (if needed)
383
+ header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
384
+ # HTTP header 'Content-Type'
385
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
386
+
387
+ # form parameters
388
+ form_params = {}
389
+ form_params["imageFile"] = image_file
390
+
391
+ # http body (model)
392
+ post_body = nil
393
+ auth_names = ['Apikey']
394
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
395
+ :header_params => header_params,
396
+ :query_params => query_params,
397
+ :form_params => form_params,
398
+ :body => post_body,
399
+ :auth_names => auth_names,
400
+ :return_type => 'String')
401
+ if @api_client.config.debugging
402
+ @api_client.config.logger.debug "API called: FilterApi#filter_motion_blur\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
403
+ end
404
+ return data, status_code, headers
405
+ end
406
+
407
+ # Posterize the image by reducing distinct colors
408
+ # Reduce the unique number of colors in the image to the specified level
409
+ # @param levels Number of unique colors to retain in the output image
410
+ # @param [Hash] opts the optional parameters
411
+ # @return [Object]
412
+ def filter_posterize(levels, opts = {})
413
+ data, _status_code, _headers = filter_posterize_with_http_info(levels, opts)
414
+ return data
415
+ end
416
+
417
+ # Posterize the image by reducing distinct colors
418
+ # Reduce the unique number of colors in the image to the specified level
419
+ # @param levels Number of unique colors to retain in the output image
420
+ # @param [Hash] opts the optional parameters
421
+ # @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers
422
+ def filter_posterize_with_http_info(levels, opts = {})
423
+ if @api_client.config.debugging
424
+ @api_client.config.logger.debug "Calling API: FilterApi.filter_posterize ..."
425
+ end
426
+ # verify the required parameter 'levels' is set
427
+ if @api_client.config.client_side_validation && levels.nil?
428
+ fail ArgumentError, "Missing the required parameter 'levels' when calling FilterApi.filter_posterize"
429
+ end
430
+ # resource path
431
+ local_var_path = "/image/filter/posterize"
432
+
433
+ # query parameters
434
+ query_params = {}
435
+ query_params[:'levels'] = levels
436
+
437
+ # header parameters
438
+ header_params = {}
439
+ # HTTP header 'Accept' (if needed)
440
+ header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
441
+
442
+ # form parameters
443
+ form_params = {}
444
+
445
+ # http body (model)
446
+ post_body = nil
447
+ auth_names = ['Apikey']
448
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
449
+ :header_params => header_params,
450
+ :query_params => query_params,
451
+ :form_params => form_params,
452
+ :body => post_body,
453
+ :auth_names => auth_names,
454
+ :return_type => 'Object')
455
+ if @api_client.config.debugging
456
+ @api_client.config.logger.debug "API called: FilterApi#filter_posterize\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
457
+ end
458
+ return data, status_code, headers
459
+ end
460
+
461
+ # Swirl distort the image
462
+ # Swirl distort the image by the specified number of degrees
463
+ # @param degrees Degrees of swirl
464
+ # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
465
+ # @param [Hash] opts the optional parameters
466
+ # @return [String]
467
+ def filter_swirl(degrees, image_file, opts = {})
468
+ data, _status_code, _headers = filter_swirl_with_http_info(degrees, image_file, opts)
469
+ return data
470
+ end
471
+
472
+ # Swirl distort the image
473
+ # Swirl distort the image by the specified number of degrees
474
+ # @param degrees Degrees of swirl
475
+ # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
476
+ # @param [Hash] opts the optional parameters
477
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
478
+ def filter_swirl_with_http_info(degrees, image_file, opts = {})
479
+ if @api_client.config.debugging
480
+ @api_client.config.logger.debug "Calling API: FilterApi.filter_swirl ..."
481
+ end
482
+ # verify the required parameter 'degrees' is set
483
+ if @api_client.config.client_side_validation && degrees.nil?
484
+ fail ArgumentError, "Missing the required parameter 'degrees' when calling FilterApi.filter_swirl"
485
+ end
486
+ # verify the required parameter 'image_file' is set
487
+ if @api_client.config.client_side_validation && image_file.nil?
488
+ fail ArgumentError, "Missing the required parameter 'image_file' when calling FilterApi.filter_swirl"
489
+ end
490
+ # resource path
491
+ local_var_path = "/image/filter/swirl"
492
+
493
+ # query parameters
494
+ query_params = {}
495
+ query_params[:'degrees'] = degrees
496
+
497
+ # header parameters
498
+ header_params = {}
499
+ # HTTP header 'Accept' (if needed)
500
+ header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
501
+ # HTTP header 'Content-Type'
502
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
503
+
504
+ # form parameters
505
+ form_params = {}
506
+ form_params["imageFile"] = image_file
507
+
508
+ # http body (model)
509
+ post_body = nil
510
+ auth_names = ['Apikey']
511
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
512
+ :header_params => header_params,
513
+ :query_params => query_params,
514
+ :form_params => form_params,
515
+ :body => post_body,
516
+ :auth_names => auth_names,
517
+ :return_type => 'String')
518
+ if @api_client.config.debugging
519
+ @api_client.config.logger.debug "API called: FilterApi#filter_swirl\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
520
+ end
521
+ return data, status_code, headers
522
+ end
523
+ end
524
+ end