cloudmersive-image-recognition-api-client 1.2.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +7 -0
- data/README.md +132 -0
- data/Rakefile +8 -0
- data/cloudmersive-image-recognition-api-client.gemspec +45 -0
- data/docs/AgeDetectionResult.md +10 -0
- data/docs/ArtisticApi.md +66 -0
- data/docs/DetectedLicensePlate.md +14 -0
- data/docs/DetectedObject.md +13 -0
- data/docs/DrawRectangleInstance.md +14 -0
- data/docs/DrawRectangleRequest.md +10 -0
- data/docs/DrawTextInstance.md +15 -0
- data/docs/DrawTextRequest.md +10 -0
- data/docs/EditApi.md +179 -0
- data/docs/Face.md +11 -0
- data/docs/FaceApi.md +228 -0
- data/docs/FaceLocateResponse.md +11 -0
- data/docs/ImageDescriptionResponse.md +11 -0
- data/docs/NsfwApi.md +63 -0
- data/docs/NsfwResult.md +10 -0
- data/docs/ObjectDetectionResult.md +10 -0
- data/docs/PersonWithAge.md +10 -0
- data/docs/RecognitionOutcome.md +9 -0
- data/docs/RecognizeApi.md +287 -0
- data/docs/ResizeApi.md +69 -0
- data/docs/VehicleLicensePlateDetectionResult.md +10 -0
- data/git_push.sh +55 -0
- data/lib/cloudmersive-image-recognition-api-client.rb +60 -0
- data/lib/cloudmersive-image-recognition-api-client/api/artistic_api.rb +85 -0
- data/lib/cloudmersive-image-recognition-api-client/api/edit_api.rb +202 -0
- data/lib/cloudmersive-image-recognition-api-client/api/face_api.rb +247 -0
- data/lib/cloudmersive-image-recognition-api-client/api/nsfw_api.rb +79 -0
- data/lib/cloudmersive-image-recognition-api-client/api/recognize_api.rb +306 -0
- data/lib/cloudmersive-image-recognition-api-client/api/resize_api.rb +91 -0
- data/lib/cloudmersive-image-recognition-api-client/api_client.rb +389 -0
- data/lib/cloudmersive-image-recognition-api-client/api_error.rb +38 -0
- data/lib/cloudmersive-image-recognition-api-client/configuration.rb +209 -0
- data/lib/cloudmersive-image-recognition-api-client/models/age_detection_result.rb +211 -0
- data/lib/cloudmersive-image-recognition-api-client/models/detected_license_plate.rb +245 -0
- data/lib/cloudmersive-image-recognition-api-client/models/detected_object.rb +239 -0
- data/lib/cloudmersive-image-recognition-api-client/models/draw_rectangle_instance.rb +249 -0
- data/lib/cloudmersive-image-recognition-api-client/models/draw_rectangle_request.rb +227 -0
- data/lib/cloudmersive-image-recognition-api-client/models/draw_text_instance.rb +259 -0
- data/lib/cloudmersive-image-recognition-api-client/models/draw_text_request.rb +227 -0
- data/lib/cloudmersive-image-recognition-api-client/models/face.rb +219 -0
- data/lib/cloudmersive-image-recognition-api-client/models/face_locate_response.rb +220 -0
- data/lib/cloudmersive-image-recognition-api-client/models/image_description_response.rb +219 -0
- data/lib/cloudmersive-image-recognition-api-client/models/nsfw_result.rb +209 -0
- data/lib/cloudmersive-image-recognition-api-client/models/object_detection_result.rb +211 -0
- data/lib/cloudmersive-image-recognition-api-client/models/person_with_age.rb +209 -0
- data/lib/cloudmersive-image-recognition-api-client/models/recognition_outcome.rb +199 -0
- data/lib/cloudmersive-image-recognition-api-client/models/vehicle_license_plate_detection_result.rb +211 -0
- data/lib/cloudmersive-image-recognition-api-client/version.rb +15 -0
- data/spec/api/artistic_api_spec.rb +48 -0
- data/spec/api/edit_api_spec.rb +73 -0
- data/spec/api/face_api_spec.rb +83 -0
- data/spec/api/nsfw_api_spec.rb +47 -0
- data/spec/api/recognize_api_spec.rb +96 -0
- data/spec/api/resize_api_spec.rb +49 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/age_detection_result_spec.rb +54 -0
- data/spec/models/detected_license_plate_spec.rb +78 -0
- data/spec/models/detected_object_spec.rb +72 -0
- data/spec/models/draw_rectangle_instance_spec.rb +78 -0
- data/spec/models/draw_rectangle_request_spec.rb +54 -0
- data/spec/models/draw_text_instance_spec.rb +84 -0
- data/spec/models/draw_text_request_spec.rb +54 -0
- data/spec/models/face_locate_response_spec.rb +60 -0
- data/spec/models/face_spec.rb +60 -0
- data/spec/models/image_description_response_spec.rb +60 -0
- data/spec/models/nsfw_result_spec.rb +54 -0
- data/spec/models/object_detection_result_spec.rb +54 -0
- data/spec/models/person_with_age_spec.rb +54 -0
- data/spec/models/recognition_outcome_spec.rb +48 -0
- data/spec/models/vehicle_license_plate_detection_result_spec.rb +54 -0
- data/spec/spec_helper.rb +111 -0
- metadata +302 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: d063cb2476ced3741652e33e98920d288909c5b68b0c6563e2330ad5edd9c73f
|
4
|
+
data.tar.gz: a8d38165be51821e7cdc2bfbfbfab44c62ca9b1422a928f268dd463ab23707ad
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 37e4faabbb26e87154abecac5f81c24eb5a1d49c7ed284cd7eac57b894d05ce9b19d30cc47453178607135b217af8e4d254770520179219750c3ec56b9bf8f3e
|
7
|
+
data.tar.gz: 85116f1fc8d500ce31ed6435443d1e85f4dbc91644da60a932033861540614d1e2a47710fa325520540781af7324e08e162da0d68467e407d1f53ff3b01c6eb7
|
data/Gemfile
ADDED
data/README.md
ADDED
@@ -0,0 +1,132 @@
|
|
1
|
+
# cloudmersive-image-recognition-api-client
|
2
|
+
|
3
|
+
CloudmersiveImageRecognitionApiClient - the Ruby gem for the imageapi
|
4
|
+
|
5
|
+
Image Recognition and Processing APIs let you use Machine Learning to recognize and process images, and also perform useful image modification operations.
|
6
|
+
|
7
|
+
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
8
|
+
|
9
|
+
- API version: v1
|
10
|
+
- Package version: 1.2.9
|
11
|
+
- Build package: io.swagger.codegen.languages.RubyClientCodegen
|
12
|
+
|
13
|
+
## Installation
|
14
|
+
|
15
|
+
### Build a gem
|
16
|
+
|
17
|
+
To build the Ruby code into a gem:
|
18
|
+
|
19
|
+
```shell
|
20
|
+
gem build cloudmersive-image-recognition-api-client.gemspec
|
21
|
+
```
|
22
|
+
|
23
|
+
Then either install the gem locally:
|
24
|
+
|
25
|
+
```shell
|
26
|
+
gem install ./cloudmersive-image-recognition-api-client-1.2.9.gem
|
27
|
+
```
|
28
|
+
(for development, run `gem install --dev ./cloudmersive-image-recognition-api-client-1.2.9.gem` to install the development dependencies)
|
29
|
+
|
30
|
+
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
31
|
+
|
32
|
+
Finally add this to the Gemfile:
|
33
|
+
|
34
|
+
gem 'cloudmersive-image-recognition-api-client', '~> 1.2.9'
|
35
|
+
|
36
|
+
### Install from Git
|
37
|
+
|
38
|
+
If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
|
39
|
+
|
40
|
+
gem 'cloudmersive-image-recognition-api-client', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
|
41
|
+
|
42
|
+
### Include the Ruby code directly
|
43
|
+
|
44
|
+
Include the Ruby code directly using `-I` as follows:
|
45
|
+
|
46
|
+
```shell
|
47
|
+
ruby -Ilib script.rb
|
48
|
+
```
|
49
|
+
|
50
|
+
## Getting Started
|
51
|
+
|
52
|
+
Please follow the [installation](#installation) procedure and then run the following code:
|
53
|
+
```ruby
|
54
|
+
# Load the gem
|
55
|
+
require 'cloudmersive-image-recognition-api-client'
|
56
|
+
|
57
|
+
# Setup authorization
|
58
|
+
CloudmersiveImageRecognitionApiClient.configure do |config|
|
59
|
+
# Configure API key authorization: Apikey
|
60
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
61
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
62
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
63
|
+
end
|
64
|
+
|
65
|
+
api_instance = CloudmersiveImageRecognitionApiClient::ArtisticApi.new
|
66
|
+
|
67
|
+
style = "style_example" # String | The style of the painting to apply. To start, try \"udnie\" a painting style. Possible values are: \"udnie\", \"wave\", \"la_muse\", \"rain_princess\".
|
68
|
+
|
69
|
+
image_file = File.new("/path/to/file.txt") # File | Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
70
|
+
|
71
|
+
|
72
|
+
begin
|
73
|
+
#Transform an image into an artistic painting automatically
|
74
|
+
result = api_instance.artistic_painting(style, image_file)
|
75
|
+
p result
|
76
|
+
rescue CloudmersiveImageRecognitionApiClient::ApiError => e
|
77
|
+
puts "Exception when calling ArtisticApi->artistic_painting: #{e}"
|
78
|
+
end
|
79
|
+
|
80
|
+
```
|
81
|
+
|
82
|
+
## Documentation for API Endpoints
|
83
|
+
|
84
|
+
All URIs are relative to *https://api.cloudmersive.com*
|
85
|
+
|
86
|
+
Class | Method | HTTP request | Description
|
87
|
+
------------ | ------------- | ------------- | -------------
|
88
|
+
*CloudmersiveImageRecognitionApiClient::ArtisticApi* | [**artistic_painting**](docs/ArtisticApi.md#artistic_painting) | **POST** /image/artistic/painting/{style} | Transform an image into an artistic painting automatically
|
89
|
+
*CloudmersiveImageRecognitionApiClient::EditApi* | [**edit_composite_basic**](docs/EditApi.md#edit_composite_basic) | **POST** /image/edit/composite/{location} | Composite two images together
|
90
|
+
*CloudmersiveImageRecognitionApiClient::EditApi* | [**edit_draw_rectangle**](docs/EditApi.md#edit_draw_rectangle) | **POST** /image/edit/draw/rectangle | Draw rectangle onto an image
|
91
|
+
*CloudmersiveImageRecognitionApiClient::EditApi* | [**edit_draw_text**](docs/EditApi.md#edit_draw_text) | **POST** /image/edit/draw/text | Draw text onto an image
|
92
|
+
*CloudmersiveImageRecognitionApiClient::FaceApi* | [**face_crop_first**](docs/FaceApi.md#face_crop_first) | **POST** /image/face/crop/first | Crop image to face (square)
|
93
|
+
*CloudmersiveImageRecognitionApiClient::FaceApi* | [**face_crop_first_round**](docs/FaceApi.md#face_crop_first_round) | **POST** /image/face/crop/first/round | Crop image to face (round)
|
94
|
+
*CloudmersiveImageRecognitionApiClient::FaceApi* | [**face_detect_age**](docs/FaceApi.md#face_detect_age) | **POST** /image/face/detect-age | Detect the age of people in an image
|
95
|
+
*CloudmersiveImageRecognitionApiClient::FaceApi* | [**face_locate**](docs/FaceApi.md#face_locate) | **POST** /image/face/locate | Find faces in an image
|
96
|
+
*CloudmersiveImageRecognitionApiClient::NsfwApi* | [**nsfw_classify**](docs/NsfwApi.md#nsfw_classify) | **POST** /image/nsfw/classify | Not safe for work (NSFW) racy content classification
|
97
|
+
*CloudmersiveImageRecognitionApiClient::RecognizeApi* | [**recognize_describe**](docs/RecognizeApi.md#recognize_describe) | **POST** /image/recognize/describe | Describe an image in natural language
|
98
|
+
*CloudmersiveImageRecognitionApiClient::RecognizeApi* | [**recognize_detect_and_unskew_document**](docs/RecognizeApi.md#recognize_detect_and_unskew_document) | **POST** /image/recognize/detect-document/unskew | Detect and unskew a photo of a document
|
99
|
+
*CloudmersiveImageRecognitionApiClient::RecognizeApi* | [**recognize_detect_objects**](docs/RecognizeApi.md#recognize_detect_objects) | **POST** /image/recognize/detect-objects | Detect objects, including types and locations, in an image
|
100
|
+
*CloudmersiveImageRecognitionApiClient::RecognizeApi* | [**recognize_detect_people**](docs/RecognizeApi.md#recognize_detect_people) | **POST** /image/recognize/detect-people | Detect people, including locations, in an image
|
101
|
+
*CloudmersiveImageRecognitionApiClient::RecognizeApi* | [**recognize_detect_vehicle_license_plates**](docs/RecognizeApi.md#recognize_detect_vehicle_license_plates) | **POST** /image/recognize/detect-vehicle-license-plates | Detect vehicle license plates in an image
|
102
|
+
*CloudmersiveImageRecognitionApiClient::ResizeApi* | [**resize_post**](docs/ResizeApi.md#resize_post) | **POST** /image/resize/preserveAspectRatio/{maxWidth}/{maxHeight} | Resize an image with parameters
|
103
|
+
|
104
|
+
|
105
|
+
## Documentation for Models
|
106
|
+
|
107
|
+
- [CloudmersiveImageRecognitionApiClient::AgeDetectionResult](docs/AgeDetectionResult.md)
|
108
|
+
- [CloudmersiveImageRecognitionApiClient::DetectedLicensePlate](docs/DetectedLicensePlate.md)
|
109
|
+
- [CloudmersiveImageRecognitionApiClient::DetectedObject](docs/DetectedObject.md)
|
110
|
+
- [CloudmersiveImageRecognitionApiClient::DrawRectangleInstance](docs/DrawRectangleInstance.md)
|
111
|
+
- [CloudmersiveImageRecognitionApiClient::DrawRectangleRequest](docs/DrawRectangleRequest.md)
|
112
|
+
- [CloudmersiveImageRecognitionApiClient::DrawTextInstance](docs/DrawTextInstance.md)
|
113
|
+
- [CloudmersiveImageRecognitionApiClient::DrawTextRequest](docs/DrawTextRequest.md)
|
114
|
+
- [CloudmersiveImageRecognitionApiClient::Face](docs/Face.md)
|
115
|
+
- [CloudmersiveImageRecognitionApiClient::FaceLocateResponse](docs/FaceLocateResponse.md)
|
116
|
+
- [CloudmersiveImageRecognitionApiClient::ImageDescriptionResponse](docs/ImageDescriptionResponse.md)
|
117
|
+
- [CloudmersiveImageRecognitionApiClient::NsfwResult](docs/NsfwResult.md)
|
118
|
+
- [CloudmersiveImageRecognitionApiClient::ObjectDetectionResult](docs/ObjectDetectionResult.md)
|
119
|
+
- [CloudmersiveImageRecognitionApiClient::PersonWithAge](docs/PersonWithAge.md)
|
120
|
+
- [CloudmersiveImageRecognitionApiClient::RecognitionOutcome](docs/RecognitionOutcome.md)
|
121
|
+
- [CloudmersiveImageRecognitionApiClient::VehicleLicensePlateDetectionResult](docs/VehicleLicensePlateDetectionResult.md)
|
122
|
+
|
123
|
+
|
124
|
+
## Documentation for Authorization
|
125
|
+
|
126
|
+
|
127
|
+
### Apikey
|
128
|
+
|
129
|
+
- **Type**: API key
|
130
|
+
- **API key parameter name**: Apikey
|
131
|
+
- **Location**: HTTP header
|
132
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
#
|
3
|
+
=begin
|
4
|
+
#imageapi
|
5
|
+
|
6
|
+
#Image Recognition and Processing APIs let you use Machine Learning to recognize and process images, and also perform useful image modification operations.
|
7
|
+
|
8
|
+
OpenAPI spec version: v1
|
9
|
+
|
10
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
11
|
+
Swagger Codegen version: unset
|
12
|
+
|
13
|
+
=end
|
14
|
+
|
15
|
+
$:.push File.expand_path("../lib", __FILE__)
|
16
|
+
require "cloudmersive-image-recognition-api-client/version"
|
17
|
+
|
18
|
+
Gem::Specification.new do |s|
|
19
|
+
s.name = "cloudmersive-image-recognition-api-client"
|
20
|
+
s.version = CloudmersiveImageRecognitionApiClient::VERSION
|
21
|
+
s.platform = Gem::Platform::RUBY
|
22
|
+
s.authors = ["Cloudmersive"]
|
23
|
+
s.email = [""]
|
24
|
+
s.homepage = "https://www.cloudmersive.com/image-recognition-and-processing-api"
|
25
|
+
s.summary = "Advanced Machine Learning APIs for recognizing and processing images."
|
26
|
+
s.description = "Image Recognition and Processing APIs let you use Machine Learning to recognize and process images, including automatic caption generation, face recognition and NSFW classification, and also perform useful image modification operations."
|
27
|
+
s.license = "Apache 2.0"
|
28
|
+
s.required_ruby_version = ">= 1.9"
|
29
|
+
|
30
|
+
s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
|
31
|
+
s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0'
|
32
|
+
|
33
|
+
s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
|
34
|
+
s.add_development_dependency 'vcr', '~> 3.0', '>= 3.0.1'
|
35
|
+
s.add_development_dependency 'webmock', '~> 1.24', '>= 1.24.3'
|
36
|
+
s.add_development_dependency 'autotest', '~> 4.4', '>= 4.4.6'
|
37
|
+
s.add_development_dependency 'autotest-rails-pure', '~> 4.1', '>= 4.1.2'
|
38
|
+
s.add_development_dependency 'autotest-growl', '~> 0.2', '>= 0.2.16'
|
39
|
+
s.add_development_dependency 'autotest-fsevent', '~> 0.2', '>= 0.2.12'
|
40
|
+
|
41
|
+
s.files = Dir['./**/*']
|
42
|
+
s.test_files = `find spec/*`.split("\n")
|
43
|
+
s.executables = []
|
44
|
+
s.require_paths = ["lib"]
|
45
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# CloudmersiveImageRecognitionApiClient::AgeDetectionResult
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**successful** | **BOOLEAN** | True if the operation was successful, false otherwise | [optional]
|
7
|
+
**people_with_age** | [**Array<PersonWithAge>**](PersonWithAge.md) | People in the image annotated with age information | [optional]
|
8
|
+
**people_identified** | **Integer** | Number of people identified in the image with an age | [optional]
|
9
|
+
|
10
|
+
|
data/docs/ArtisticApi.md
ADDED
@@ -0,0 +1,66 @@
|
|
1
|
+
# CloudmersiveImageRecognitionApiClient::ArtisticApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api.cloudmersive.com*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**artistic_painting**](ArtisticApi.md#artistic_painting) | **POST** /image/artistic/painting/{style} | Transform an image into an artistic painting automatically
|
8
|
+
|
9
|
+
|
10
|
+
# **artistic_painting**
|
11
|
+
> String artistic_painting(style, image_file)
|
12
|
+
|
13
|
+
Transform an image into an artistic painting automatically
|
14
|
+
|
15
|
+
Uses machine learning to automatically transform an image into an artistic painting. Due to depth of AI processing, depending on image size this operation can take up to 20 seconds.
|
16
|
+
|
17
|
+
### Example
|
18
|
+
```ruby
|
19
|
+
# load the gem
|
20
|
+
require 'cloudmersive-image-recognition-api-client'
|
21
|
+
# setup authorization
|
22
|
+
CloudmersiveImageRecognitionApiClient.configure do |config|
|
23
|
+
# Configure API key authorization: Apikey
|
24
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
25
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
26
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
27
|
+
end
|
28
|
+
|
29
|
+
api_instance = CloudmersiveImageRecognitionApiClient::ArtisticApi.new
|
30
|
+
|
31
|
+
style = "style_example" # String | The style of the painting to apply. To start, try \"udnie\" a painting style. Possible values are: \"udnie\", \"wave\", \"la_muse\", \"rain_princess\".
|
32
|
+
|
33
|
+
image_file = File.new("/path/to/file.txt") # File | Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
34
|
+
|
35
|
+
|
36
|
+
begin
|
37
|
+
#Transform an image into an artistic painting automatically
|
38
|
+
result = api_instance.artistic_painting(style, image_file)
|
39
|
+
p result
|
40
|
+
rescue CloudmersiveImageRecognitionApiClient::ApiError => e
|
41
|
+
puts "Exception when calling ArtisticApi->artistic_painting: #{e}"
|
42
|
+
end
|
43
|
+
```
|
44
|
+
|
45
|
+
### Parameters
|
46
|
+
|
47
|
+
Name | Type | Description | Notes
|
48
|
+
------------- | ------------- | ------------- | -------------
|
49
|
+
**style** | **String**| The style of the painting to apply. To start, try \"udnie\" a painting style. Possible values are: \"udnie\", \"wave\", \"la_muse\", \"rain_princess\". |
|
50
|
+
**image_file** | **File**| Image file to perform the operation on. Common file formats such as PNG, JPEG are supported. |
|
51
|
+
|
52
|
+
### Return type
|
53
|
+
|
54
|
+
**String**
|
55
|
+
|
56
|
+
### Authorization
|
57
|
+
|
58
|
+
[Apikey](../README.md#Apikey)
|
59
|
+
|
60
|
+
### HTTP request headers
|
61
|
+
|
62
|
+
- **Content-Type**: multipart/form-data
|
63
|
+
- **Accept**: application/octet-stream
|
64
|
+
|
65
|
+
|
66
|
+
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# CloudmersiveImageRecognitionApiClient::DetectedLicensePlate
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**location_x** | **Integer** | | [optional]
|
7
|
+
**location_y** | **Integer** | | [optional]
|
8
|
+
**width** | **Integer** | | [optional]
|
9
|
+
**height** | **Integer** | | [optional]
|
10
|
+
**license_plate_text_best_match** | **String** | Text from the license plate, highest-confidence result | [optional]
|
11
|
+
**license_plate_text_runner_up** | **String** | Alternate text from the license plate, based on second-highest-confidence result | [optional]
|
12
|
+
**license_plate_recognition_confidence_level** | **Float** | Confidence score on a range of 0.0 - 1.0 of the accuracy of the detected license plate, with higher scores being better; values about 0.75 are high confidence | [optional]
|
13
|
+
|
14
|
+
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# CloudmersiveImageRecognitionApiClient::DetectedObject
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**object_class_name** | **String** | Class of the object. Example values are \"person\", \"car\", \"dining table\", etc. | [optional]
|
7
|
+
**height** | **Integer** | Height, in pixels, of the object | [optional]
|
8
|
+
**width** | **Integer** | Width, in pixels, of the object | [optional]
|
9
|
+
**score** | **Float** | Confidence score of detected object; possible values are between 0.0 and 1.0; values closer to 1.0 are higher confidence | [optional]
|
10
|
+
**x** | **Integer** | X location, in pixels, of the left side location of the object, with the right side being X + Width | [optional]
|
11
|
+
**y** | **Integer** | Y location, in pixels, of the top side location of the object, with the bottom side being Y + Height | [optional]
|
12
|
+
|
13
|
+
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# CloudmersiveImageRecognitionApiClient::DrawRectangleInstance
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**border_color** | **String** | Border Color to use - can be a hex value (with #) or HTML common color name. Transparent colors are supported. | [optional]
|
7
|
+
**border_width** | **Float** | Width in pixels of the border. Pass in 0 to draw a rectangle with no border | [optional]
|
8
|
+
**fill_color** | **String** | Fill Color to use - can be a hex value (with #) or HTML common color name. Transparent colors are supported. Leave blank to not fill the rectangle. | [optional]
|
9
|
+
**x** | **Float** | Pixel location of the left edge of the rectangle location | [optional]
|
10
|
+
**y** | **Float** | Pixel location of the top edge of the rectangle location | [optional]
|
11
|
+
**width** | **Float** | Width in pixels of the rectangle | [optional]
|
12
|
+
**height** | **Float** | Height in pixels of the rectangle | [optional]
|
13
|
+
|
14
|
+
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# CloudmersiveImageRecognitionApiClient::DrawRectangleRequest
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**base_image_bytes** | **String** | Image to draw rectangles on, in bytes. You can also use the BaseImageUrl instead to supply image input as a URL | [optional]
|
7
|
+
**base_image_url** | **String** | Image to draw rectangles on, as an HTTP or HTTPS fully-qualified URL | [optional]
|
8
|
+
**rectangles_to_draw** | [**Array<DrawRectangleInstance>**](DrawRectangleInstance.md) | Rectangles to draw on the image. Rectangles are drawn in index order. | [optional]
|
9
|
+
|
10
|
+
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# CloudmersiveImageRecognitionApiClient::DrawTextInstance
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**text** | **String** | Text string to draw | [optional]
|
7
|
+
**font_family_name** | **String** | Font Family to use. Leave blank to default to \"Arial\". | [optional]
|
8
|
+
**font_size** | **Float** | Font size to use. | [optional]
|
9
|
+
**color** | **String** | Color to use - can be a hex value (with #) or HTML common color name | [optional]
|
10
|
+
**x** | **Float** | Pixel location of the left edge of the text location | [optional]
|
11
|
+
**y** | **Float** | Pixel location of the top edge of the text location | [optional]
|
12
|
+
**width** | **Float** | Width in pixels of the text box to draw the text in; text will wrap inside this box | [optional]
|
13
|
+
**height** | **Float** | Height in pixels of the text box to draw the text in; text will wrap inside this box | [optional]
|
14
|
+
|
15
|
+
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# CloudmersiveImageRecognitionApiClient::DrawTextRequest
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**base_image_bytes** | **String** | Image to draw text on, in bytes. You can also use the BaseImageUrl instead to supply image input as a URL | [optional]
|
7
|
+
**base_image_url** | **String** | Image to draw text on, as an HTTP or HTTPS fully-qualified URL | [optional]
|
8
|
+
**text_to_draw** | [**Array<DrawTextInstance>**](DrawTextInstance.md) | One or more pieces of text to draw onto the image | [optional]
|
9
|
+
|
10
|
+
|
data/docs/EditApi.md
ADDED
@@ -0,0 +1,179 @@
|
|
1
|
+
# CloudmersiveImageRecognitionApiClient::EditApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api.cloudmersive.com*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**edit_composite_basic**](EditApi.md#edit_composite_basic) | **POST** /image/edit/composite/{location} | Composite two images together
|
8
|
+
[**edit_draw_rectangle**](EditApi.md#edit_draw_rectangle) | **POST** /image/edit/draw/rectangle | Draw rectangle onto an image
|
9
|
+
[**edit_draw_text**](EditApi.md#edit_draw_text) | **POST** /image/edit/draw/text | Draw text onto an image
|
10
|
+
|
11
|
+
|
12
|
+
# **edit_composite_basic**
|
13
|
+
> Object edit_composite_basic(location, base_image, layered_image)
|
14
|
+
|
15
|
+
Composite two images together
|
16
|
+
|
17
|
+
Composites two input images together; a layered image onto a base image. The first image you input is the base image. The second image (the layered image) will be composited on top of this base image. Supports PNG transparency. To control padding you can include transparent pixels at the border(s) of your layered images as appropriate.
|
18
|
+
|
19
|
+
### Example
|
20
|
+
```ruby
|
21
|
+
# load the gem
|
22
|
+
require 'cloudmersive-image-recognition-api-client'
|
23
|
+
# setup authorization
|
24
|
+
CloudmersiveImageRecognitionApiClient.configure do |config|
|
25
|
+
# Configure API key authorization: Apikey
|
26
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
27
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
28
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
29
|
+
end
|
30
|
+
|
31
|
+
api_instance = CloudmersiveImageRecognitionApiClient::EditApi.new
|
32
|
+
|
33
|
+
location = "location_example" # String | Location to composite the layered images; possible values are: \"center\", \"top-left\", \"top-center\", \"top-right\", \"center-left\", \"center-right\", \"bottom-left\", \"bottom-center\", \"bottom-right\"
|
34
|
+
|
35
|
+
base_image = File.new("/path/to/file.txt") # File | Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
36
|
+
|
37
|
+
layered_image = File.new("/path/to/file.txt") # File | Image to layer on top of the base image.
|
38
|
+
|
39
|
+
|
40
|
+
begin
|
41
|
+
#Composite two images together
|
42
|
+
result = api_instance.edit_composite_basic(location, base_image, layered_image)
|
43
|
+
p result
|
44
|
+
rescue CloudmersiveImageRecognitionApiClient::ApiError => e
|
45
|
+
puts "Exception when calling EditApi->edit_composite_basic: #{e}"
|
46
|
+
end
|
47
|
+
```
|
48
|
+
|
49
|
+
### Parameters
|
50
|
+
|
51
|
+
Name | Type | Description | Notes
|
52
|
+
------------- | ------------- | ------------- | -------------
|
53
|
+
**location** | **String**| Location to composite the layered images; possible values are: \"center\", \"top-left\", \"top-center\", \"top-right\", \"center-left\", \"center-right\", \"bottom-left\", \"bottom-center\", \"bottom-right\" |
|
54
|
+
**base_image** | **File**| Image file to perform the operation on. Common file formats such as PNG, JPEG are supported. |
|
55
|
+
**layered_image** | **File**| Image to layer on top of the base image. |
|
56
|
+
|
57
|
+
### Return type
|
58
|
+
|
59
|
+
**Object**
|
60
|
+
|
61
|
+
### Authorization
|
62
|
+
|
63
|
+
[Apikey](../README.md#Apikey)
|
64
|
+
|
65
|
+
### HTTP request headers
|
66
|
+
|
67
|
+
- **Content-Type**: multipart/form-data
|
68
|
+
- **Accept**: image/png
|
69
|
+
|
70
|
+
|
71
|
+
|
72
|
+
# **edit_draw_rectangle**
|
73
|
+
> Object edit_draw_rectangle(request)
|
74
|
+
|
75
|
+
Draw rectangle onto an image
|
76
|
+
|
77
|
+
Draw one or more rectangles, with customized visuals, onto an image
|
78
|
+
|
79
|
+
### Example
|
80
|
+
```ruby
|
81
|
+
# load the gem
|
82
|
+
require 'cloudmersive-image-recognition-api-client'
|
83
|
+
# setup authorization
|
84
|
+
CloudmersiveImageRecognitionApiClient.configure do |config|
|
85
|
+
# Configure API key authorization: Apikey
|
86
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
87
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
88
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
89
|
+
end
|
90
|
+
|
91
|
+
api_instance = CloudmersiveImageRecognitionApiClient::EditApi.new
|
92
|
+
|
93
|
+
request = CloudmersiveImageRecognitionApiClient::DrawRectangleRequest.new # DrawRectangleRequest |
|
94
|
+
|
95
|
+
|
96
|
+
begin
|
97
|
+
#Draw rectangle onto an image
|
98
|
+
result = api_instance.edit_draw_rectangle(request)
|
99
|
+
p result
|
100
|
+
rescue CloudmersiveImageRecognitionApiClient::ApiError => e
|
101
|
+
puts "Exception when calling EditApi->edit_draw_rectangle: #{e}"
|
102
|
+
end
|
103
|
+
```
|
104
|
+
|
105
|
+
### Parameters
|
106
|
+
|
107
|
+
Name | Type | Description | Notes
|
108
|
+
------------- | ------------- | ------------- | -------------
|
109
|
+
**request** | [**DrawRectangleRequest**](DrawRectangleRequest.md)| |
|
110
|
+
|
111
|
+
### Return type
|
112
|
+
|
113
|
+
**Object**
|
114
|
+
|
115
|
+
### Authorization
|
116
|
+
|
117
|
+
[Apikey](../README.md#Apikey)
|
118
|
+
|
119
|
+
### HTTP request headers
|
120
|
+
|
121
|
+
- **Content-Type**: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
|
122
|
+
- **Accept**: image/png
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
# **edit_draw_text**
|
127
|
+
> Object edit_draw_text(request)
|
128
|
+
|
129
|
+
Draw text onto an image
|
130
|
+
|
131
|
+
Draw one or more pieces of text, with customized visuals, onto an image
|
132
|
+
|
133
|
+
### Example
|
134
|
+
```ruby
|
135
|
+
# load the gem
|
136
|
+
require 'cloudmersive-image-recognition-api-client'
|
137
|
+
# setup authorization
|
138
|
+
CloudmersiveImageRecognitionApiClient.configure do |config|
|
139
|
+
# Configure API key authorization: Apikey
|
140
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
141
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
142
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
143
|
+
end
|
144
|
+
|
145
|
+
api_instance = CloudmersiveImageRecognitionApiClient::EditApi.new
|
146
|
+
|
147
|
+
request = CloudmersiveImageRecognitionApiClient::DrawTextRequest.new # DrawTextRequest |
|
148
|
+
|
149
|
+
|
150
|
+
begin
|
151
|
+
#Draw text onto an image
|
152
|
+
result = api_instance.edit_draw_text(request)
|
153
|
+
p result
|
154
|
+
rescue CloudmersiveImageRecognitionApiClient::ApiError => e
|
155
|
+
puts "Exception when calling EditApi->edit_draw_text: #{e}"
|
156
|
+
end
|
157
|
+
```
|
158
|
+
|
159
|
+
### Parameters
|
160
|
+
|
161
|
+
Name | Type | Description | Notes
|
162
|
+
------------- | ------------- | ------------- | -------------
|
163
|
+
**request** | [**DrawTextRequest**](DrawTextRequest.md)| |
|
164
|
+
|
165
|
+
### Return type
|
166
|
+
|
167
|
+
**Object**
|
168
|
+
|
169
|
+
### Authorization
|
170
|
+
|
171
|
+
[Apikey](../README.md#Apikey)
|
172
|
+
|
173
|
+
### HTTP request headers
|
174
|
+
|
175
|
+
- **Content-Type**: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
|
176
|
+
- **Accept**: image/png
|
177
|
+
|
178
|
+
|
179
|
+
|