Class: CloudmersiveImageRecognitionApiClient::FilterApi
- Inherits:
-
Object
- Object
- CloudmersiveImageRecognitionApiClient::FilterApi
- Defined in:
- lib/cloudmersive-image-recognition-api-client/api/filter_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#filter_black_and_white(image_file, opts = {}) ⇒ String
Convert image to black-and-white grayscale Remove color from the image by converting to a grayscale, black-and-white image.
-
#filter_black_and_white_with_http_info(image_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Convert image to black-and-white grayscale Remove color from the image by converting to a grayscale, black-and-white image.
-
#filter_despeckle(image_file, opts = {}) ⇒ String
Despeckle to remove point noise from the image Remove point noise / despeckle the input image.
-
#filter_despeckle_with_http_info(image_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Despeckle to remove point noise from the image Remove point noise / despeckle the input image.
-
#filter_edge_detect(radius, image_file, opts = {}) ⇒ String
Detect and highlight edges in an image Perform an edge detection operation on the input image.
-
#filter_edge_detect_with_http_info(radius, image_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Detect and highlight edges in an image Perform an edge detection operation on the input image.
-
#filter_emboss(radius, sigma, image_file, opts = {}) ⇒ String
Emboss an image Perform an emboss operation on the input image.
-
#filter_emboss_with_http_info(radius, sigma, image_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Emboss an image Perform an emboss operation on the input image.
-
#filter_gaussian_blur(radius, sigma, image_file, opts = {}) ⇒ String
Perform a guassian blur on the input image Perform a gaussian blur on the input image.
-
#filter_gaussian_blur_with_http_info(radius, sigma, image_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Perform a guassian blur on the input image Perform a gaussian blur on the input image.
-
#filter_motion_blur(radius, sigma, angle, image_file, opts = {}) ⇒ String
Perform a motion blur on the input image Perform a motion blur on the input image at a specific angle.
-
#filter_motion_blur_with_http_info(radius, sigma, angle, image_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Perform a motion blur on the input image Perform a motion blur on the input image at a specific angle.
-
#filter_posterize(levels, image_file, opts = {}) ⇒ String
Posterize the image by reducing distinct colors Reduce the unique number of colors in the image to the specified level.
-
#filter_posterize_with_http_info(levels, image_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Posterize the image by reducing distinct colors Reduce the unique number of colors in the image to the specified level.
-
#filter_swirl(degrees, image_file, opts = {}) ⇒ String
Swirl distort the image Swirl distort the image by the specified number of degrees.
-
#filter_swirl_with_http_info(degrees, image_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Swirl distort the image Swirl distort the image by the specified number of degrees.
-
#initialize(api_client = ApiClient.default) ⇒ FilterApi
constructor
A new instance of FilterApi.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/cloudmersive-image-recognition-api-client/api/filter_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#filter_black_and_white(image_file, opts = {}) ⇒ String
Convert image to black-and-white grayscale Remove color from the image by converting to a grayscale, black-and-white image
27 28 29 30 |
# File 'lib/cloudmersive-image-recognition-api-client/api/filter_api.rb', line 27 def filter_black_and_white(image_file, opts = {}) data, _status_code, _headers = filter_black_and_white_with_http_info(image_file, opts) data end |
#filter_black_and_white_with_http_info(image_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Convert image to black-and-white grayscale Remove color from the image by converting to a grayscale, black-and-white image
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/cloudmersive-image-recognition-api-client/api/filter_api.rb', line 37 def filter_black_and_white_with_http_info(image_file, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FilterApi.filter_black_and_white ...' end # verify the required parameter 'image_file' is set if @api_client.config.client_side_validation && image_file.nil? fail ArgumentError, "Missing the required parameter 'image_file' when calling FilterApi.filter_black_and_white" end # resource path local_var_path = '/image/filter/black-and-white' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) # form parameters form_params = {} form_params['imageFile'] = image_file # http body (model) post_body = nil auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: FilterApi#filter_black_and_white\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#filter_despeckle(image_file, opts = {}) ⇒ String
Despeckle to remove point noise from the image Remove point noise / despeckle the input image
82 83 84 85 |
# File 'lib/cloudmersive-image-recognition-api-client/api/filter_api.rb', line 82 def filter_despeckle(image_file, opts = {}) data, _status_code, _headers = filter_despeckle_with_http_info(image_file, opts) data end |
#filter_despeckle_with_http_info(image_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Despeckle to remove point noise from the image Remove point noise / despeckle the input image
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 |
# File 'lib/cloudmersive-image-recognition-api-client/api/filter_api.rb', line 92 def filter_despeckle_with_http_info(image_file, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FilterApi.filter_despeckle ...' end # verify the required parameter 'image_file' is set if @api_client.config.client_side_validation && image_file.nil? fail ArgumentError, "Missing the required parameter 'image_file' when calling FilterApi.filter_despeckle" end # resource path local_var_path = '/image/filter/despeckle' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) # form parameters form_params = {} form_params['imageFile'] = image_file # http body (model) post_body = nil auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: FilterApi#filter_despeckle\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#filter_edge_detect(radius, image_file, opts = {}) ⇒ String
Detect and highlight edges in an image Perform an edge detection operation on the input image
138 139 140 141 |
# File 'lib/cloudmersive-image-recognition-api-client/api/filter_api.rb', line 138 def filter_edge_detect(radius, image_file, opts = {}) data, _status_code, _headers = filter_edge_detect_with_http_info(radius, image_file, opts) data end |
#filter_edge_detect_with_http_info(radius, image_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Detect and highlight edges in an image Perform an edge detection operation on the input image
149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 |
# File 'lib/cloudmersive-image-recognition-api-client/api/filter_api.rb', line 149 def filter_edge_detect_with_http_info(radius, image_file, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FilterApi.filter_edge_detect ...' end # verify the required parameter 'radius' is set if @api_client.config.client_side_validation && radius.nil? fail ArgumentError, "Missing the required parameter 'radius' when calling FilterApi.filter_edge_detect" end # verify the required parameter 'image_file' is set if @api_client.config.client_side_validation && image_file.nil? fail ArgumentError, "Missing the required parameter 'image_file' when calling FilterApi.filter_edge_detect" end # resource path local_var_path = '/image/filter/edge-detect/{radius}'.sub('{' + 'radius' + '}', radius.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) # form parameters form_params = {} form_params['imageFile'] = image_file # http body (model) post_body = nil auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: FilterApi#filter_edge_detect\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#filter_emboss(radius, sigma, image_file, opts = {}) ⇒ String
Emboss an image Perform an emboss operation on the input image
200 201 202 203 |
# File 'lib/cloudmersive-image-recognition-api-client/api/filter_api.rb', line 200 def filter_emboss(radius, sigma, image_file, opts = {}) data, _status_code, _headers = filter_emboss_with_http_info(radius, sigma, image_file, opts) data end |
#filter_emboss_with_http_info(radius, sigma, image_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Emboss an image Perform an emboss operation on the input image
212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 |
# File 'lib/cloudmersive-image-recognition-api-client/api/filter_api.rb', line 212 def filter_emboss_with_http_info(radius, sigma, image_file, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FilterApi.filter_emboss ...' end # verify the required parameter 'radius' is set if @api_client.config.client_side_validation && radius.nil? fail ArgumentError, "Missing the required parameter 'radius' when calling FilterApi.filter_emboss" end # verify the required parameter 'sigma' is set if @api_client.config.client_side_validation && sigma.nil? fail ArgumentError, "Missing the required parameter 'sigma' when calling FilterApi.filter_emboss" end # verify the required parameter 'image_file' is set if @api_client.config.client_side_validation && image_file.nil? fail ArgumentError, "Missing the required parameter 'image_file' when calling FilterApi.filter_emboss" end # resource path local_var_path = '/image/filter/emboss/{radius}/{sigma}'.sub('{' + 'radius' + '}', radius.to_s).sub('{' + 'sigma' + '}', sigma.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) # form parameters form_params = {} form_params['imageFile'] = image_file # http body (model) post_body = nil auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: FilterApi#filter_emboss\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#filter_gaussian_blur(radius, sigma, image_file, opts = {}) ⇒ String
Perform a guassian blur on the input image Perform a gaussian blur on the input image
267 268 269 270 |
# File 'lib/cloudmersive-image-recognition-api-client/api/filter_api.rb', line 267 def filter_gaussian_blur(radius, sigma, image_file, opts = {}) data, _status_code, _headers = filter_gaussian_blur_with_http_info(radius, sigma, image_file, opts) data end |
#filter_gaussian_blur_with_http_info(radius, sigma, image_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Perform a guassian blur on the input image Perform a gaussian blur on the input image
279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 |
# File 'lib/cloudmersive-image-recognition-api-client/api/filter_api.rb', line 279 def filter_gaussian_blur_with_http_info(radius, sigma, image_file, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FilterApi.filter_gaussian_blur ...' end # verify the required parameter 'radius' is set if @api_client.config.client_side_validation && radius.nil? fail ArgumentError, "Missing the required parameter 'radius' when calling FilterApi.filter_gaussian_blur" end # verify the required parameter 'sigma' is set if @api_client.config.client_side_validation && sigma.nil? fail ArgumentError, "Missing the required parameter 'sigma' when calling FilterApi.filter_gaussian_blur" end # verify the required parameter 'image_file' is set if @api_client.config.client_side_validation && image_file.nil? fail ArgumentError, "Missing the required parameter 'image_file' when calling FilterApi.filter_gaussian_blur" end # resource path local_var_path = '/image/filter/blur/guassian/{radius}/{sigma}'.sub('{' + 'radius' + '}', radius.to_s).sub('{' + 'sigma' + '}', sigma.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) # form parameters form_params = {} form_params['imageFile'] = image_file # http body (model) post_body = nil auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: FilterApi#filter_gaussian_blur\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#filter_motion_blur(radius, sigma, angle, image_file, opts = {}) ⇒ String
Perform a motion blur on the input image Perform a motion blur on the input image at a specific angle
335 336 337 338 |
# File 'lib/cloudmersive-image-recognition-api-client/api/filter_api.rb', line 335 def filter_motion_blur(radius, sigma, angle, image_file, opts = {}) data, _status_code, _headers = filter_motion_blur_with_http_info(radius, sigma, angle, image_file, opts) data end |
#filter_motion_blur_with_http_info(radius, sigma, angle, image_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Perform a motion blur on the input image Perform a motion blur on the input image at a specific angle
348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 |
# File 'lib/cloudmersive-image-recognition-api-client/api/filter_api.rb', line 348 def filter_motion_blur_with_http_info(radius, sigma, angle, image_file, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FilterApi.filter_motion_blur ...' end # verify the required parameter 'radius' is set if @api_client.config.client_side_validation && radius.nil? fail ArgumentError, "Missing the required parameter 'radius' when calling FilterApi.filter_motion_blur" end # verify the required parameter 'sigma' is set if @api_client.config.client_side_validation && sigma.nil? fail ArgumentError, "Missing the required parameter 'sigma' when calling FilterApi.filter_motion_blur" end # verify the required parameter 'angle' is set if @api_client.config.client_side_validation && angle.nil? fail ArgumentError, "Missing the required parameter 'angle' when calling FilterApi.filter_motion_blur" end # verify the required parameter 'image_file' is set if @api_client.config.client_side_validation && image_file.nil? fail ArgumentError, "Missing the required parameter 'image_file' when calling FilterApi.filter_motion_blur" end # resource path 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) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) # form parameters form_params = {} form_params['imageFile'] = image_file # http body (model) post_body = nil auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: FilterApi#filter_motion_blur\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#filter_posterize(levels, image_file, opts = {}) ⇒ String
Posterize the image by reducing distinct colors Reduce the unique number of colors in the image to the specified level
406 407 408 409 |
# File 'lib/cloudmersive-image-recognition-api-client/api/filter_api.rb', line 406 def filter_posterize(levels, image_file, opts = {}) data, _status_code, _headers = filter_posterize_with_http_info(levels, image_file, opts) data end |
#filter_posterize_with_http_info(levels, image_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Posterize the image by reducing distinct colors Reduce the unique number of colors in the image to the specified level
417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 |
# File 'lib/cloudmersive-image-recognition-api-client/api/filter_api.rb', line 417 def filter_posterize_with_http_info(levels, image_file, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FilterApi.filter_posterize ...' end # verify the required parameter 'levels' is set if @api_client.config.client_side_validation && levels.nil? fail ArgumentError, "Missing the required parameter 'levels' when calling FilterApi.filter_posterize" end # verify the required parameter 'image_file' is set if @api_client.config.client_side_validation && image_file.nil? fail ArgumentError, "Missing the required parameter 'image_file' when calling FilterApi.filter_posterize" end # resource path local_var_path = '/image/filter/posterize' # query parameters query_params = {} query_params[:'levels'] = levels # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) # form parameters form_params = {} form_params['imageFile'] = image_file # http body (model) post_body = nil auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: FilterApi#filter_posterize\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#filter_swirl(degrees, image_file, opts = {}) ⇒ String
Swirl distort the image Swirl distort the image by the specified number of degrees
468 469 470 471 |
# File 'lib/cloudmersive-image-recognition-api-client/api/filter_api.rb', line 468 def filter_swirl(degrees, image_file, opts = {}) data, _status_code, _headers = filter_swirl_with_http_info(degrees, image_file, opts) data end |
#filter_swirl_with_http_info(degrees, image_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Swirl distort the image Swirl distort the image by the specified number of degrees
479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 |
# File 'lib/cloudmersive-image-recognition-api-client/api/filter_api.rb', line 479 def filter_swirl_with_http_info(degrees, image_file, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FilterApi.filter_swirl ...' end # verify the required parameter 'degrees' is set if @api_client.config.client_side_validation && degrees.nil? fail ArgumentError, "Missing the required parameter 'degrees' when calling FilterApi.filter_swirl" end # verify the required parameter 'image_file' is set if @api_client.config.client_side_validation && image_file.nil? fail ArgumentError, "Missing the required parameter 'image_file' when calling FilterApi.filter_swirl" end # resource path local_var_path = '/image/filter/swirl' # query parameters query_params = {} query_params[:'degrees'] = degrees # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) # form parameters form_params = {} form_params['imageFile'] = image_file # http body (model) post_body = nil auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: FilterApi#filter_swirl\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |