cloudmersive-image-recognition-api-client 1.3.0 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +10 -4
- data/cloudmersive-image-recognition-api-client.gemspec +1 -1
- data/docs/FineTextDetectionResult.md +10 -0
- data/docs/FineTextItem.md +15 -0
- data/docs/RecognizeApi.md +104 -0
- data/docs/TextDetectionResult.md +10 -0
- data/docs/TextItem.md +11 -0
- data/lib/cloudmersive-image-recognition-api-client.rb +5 -1
- data/lib/cloudmersive-image-recognition-api-client/api/artistic_api.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/api/edit_api.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/api/face_api.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/api/nsfw_api.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/api/recognize_api.rb +104 -1
- data/lib/cloudmersive-image-recognition-api-client/api/resize_api.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/api_client.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/api_error.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/configuration.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/age_detection_result.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/detected_license_plate.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/detected_object.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/draw_rectangle_instance.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/draw_rectangle_request.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/draw_text_instance.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/draw_text_request.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/face.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/face_compare_response.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/face_locate_response.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/face_locate_with_landmarks_response.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/face_match.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/face_point.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/face_with_landmarks.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/fine_text_detection_result.rb +211 -0
- data/lib/cloudmersive-image-recognition-api-client/models/fine_text_item.rb +259 -0
- data/lib/cloudmersive-image-recognition-api-client/models/image_description_response.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/nsfw_result.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/object_detection_result.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/person_with_age.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/recognition_outcome.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/models/text_detection_result.rb +211 -0
- data/lib/cloudmersive-image-recognition-api-client/models/text_item.rb +219 -0
- data/lib/cloudmersive-image-recognition-api-client/models/vehicle_license_plate_detection_result.rb +1 -1
- data/lib/cloudmersive-image-recognition-api-client/version.rb +2 -2
- data/spec/api/artistic_api_spec.rb +1 -1
- data/spec/api/edit_api_spec.rb +1 -1
- data/spec/api/face_api_spec.rb +1 -1
- data/spec/api/nsfw_api_spec.rb +1 -1
- data/spec/api/recognize_api_spec.rb +24 -1
- data/spec/api/resize_api_spec.rb +1 -1
- data/spec/api_client_spec.rb +1 -1
- data/spec/configuration_spec.rb +1 -1
- data/spec/models/age_detection_result_spec.rb +1 -1
- data/spec/models/detected_license_plate_spec.rb +1 -1
- data/spec/models/detected_object_spec.rb +1 -1
- data/spec/models/draw_rectangle_instance_spec.rb +1 -1
- data/spec/models/draw_rectangle_request_spec.rb +1 -1
- data/spec/models/draw_text_instance_spec.rb +1 -1
- data/spec/models/draw_text_request_spec.rb +1 -1
- data/spec/models/face_compare_response_spec.rb +1 -1
- data/spec/models/face_locate_response_spec.rb +1 -1
- data/spec/models/face_locate_with_landmarks_response_spec.rb +1 -1
- data/spec/models/face_match_spec.rb +1 -1
- data/spec/models/face_point_spec.rb +1 -1
- data/spec/models/face_spec.rb +1 -1
- data/spec/models/face_with_landmarks_spec.rb +1 -1
- data/spec/models/fine_text_detection_result_spec.rb +54 -0
- data/spec/models/fine_text_item_spec.rb +84 -0
- data/spec/models/image_description_response_spec.rb +1 -1
- data/spec/models/nsfw_result_spec.rb +1 -1
- data/spec/models/object_detection_result_spec.rb +1 -1
- data/spec/models/person_with_age_spec.rb +1 -1
- data/spec/models/recognition_outcome_spec.rb +1 -1
- data/spec/models/text_detection_result_spec.rb +54 -0
- data/spec/models/text_item_spec.rb +60 -0
- data/spec/models/vehicle_license_plate_detection_result_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- metadata +27 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ea70ccc435e1f0ee8a2b269f8a0c363576d3198ce354015ccb5b4ef0d96e22e8
|
4
|
+
data.tar.gz: fa0146a4a8c4232cd558fcc9ece0eac20437f39ed12dafe8628d26357a22bf1f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f03f2300a42454d1b0b39dfa9a91cdf3be4487d0e32c1e5e33209288285a7b0f7c74509ca4ecba9575dcb590ef75533166731063b87de7c06de884e4ae4f78de
|
7
|
+
data.tar.gz: 340623f2a202ef9894f9ec812ebe59da6118f5e0358400e34d1058472c3130f5e15b7063b1372e250592ba4849dfebce2d3d72e546a7b2a5b4aec0a3138a676f
|
data/README.md
CHANGED
@@ -7,7 +7,7 @@ Image Recognition and Processing APIs let you use Machine Learning to recognize
|
|
7
7
|
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
8
8
|
|
9
9
|
- API version: v1
|
10
|
-
- Package version: 1.3.
|
10
|
+
- Package version: 1.3.1
|
11
11
|
- Build package: io.swagger.codegen.languages.RubyClientCodegen
|
12
12
|
|
13
13
|
## Installation
|
@@ -23,15 +23,15 @@ gem build cloudmersive-image-recognition-api-client.gemspec
|
|
23
23
|
Then either install the gem locally:
|
24
24
|
|
25
25
|
```shell
|
26
|
-
gem install ./cloudmersive-image-recognition-api-client-1.3.
|
26
|
+
gem install ./cloudmersive-image-recognition-api-client-1.3.1.gem
|
27
27
|
```
|
28
|
-
(for development, run `gem install --dev ./cloudmersive-image-recognition-api-client-1.3.
|
28
|
+
(for development, run `gem install --dev ./cloudmersive-image-recognition-api-client-1.3.1.gem` to install the development dependencies)
|
29
29
|
|
30
30
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
31
31
|
|
32
32
|
Finally add this to the Gemfile:
|
33
33
|
|
34
|
-
gem 'cloudmersive-image-recognition-api-client', '~> 1.3.
|
34
|
+
gem 'cloudmersive-image-recognition-api-client', '~> 1.3.1'
|
35
35
|
|
36
36
|
### Install from Git
|
37
37
|
|
@@ -100,6 +100,8 @@ Class | Method | HTTP request | Description
|
|
100
100
|
*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
|
101
101
|
*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
|
102
102
|
*CloudmersiveImageRecognitionApiClient::RecognizeApi* | [**recognize_detect_people**](docs/RecognizeApi.md#recognize_detect_people) | **POST** /image/recognize/detect-people | Detect people, including locations, in an image
|
103
|
+
*CloudmersiveImageRecognitionApiClient::RecognizeApi* | [**recognize_detect_text_fine**](docs/RecognizeApi.md#recognize_detect_text_fine) | **POST** /image/recognize/detect-text/fine | Detect fine text in a photo of a document
|
104
|
+
*CloudmersiveImageRecognitionApiClient::RecognizeApi* | [**recognize_detect_text_large**](docs/RecognizeApi.md#recognize_detect_text_large) | **POST** /image/recognize/detect-text/large | Detect large text in a photo
|
103
105
|
*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
|
104
106
|
*CloudmersiveImageRecognitionApiClient::ResizeApi* | [**resize_post**](docs/ResizeApi.md#resize_post) | **POST** /image/resize/preserveAspectRatio/{maxWidth}/{maxHeight} | Resize an image with parameters
|
105
107
|
|
@@ -120,11 +122,15 @@ Class | Method | HTTP request | Description
|
|
120
122
|
- [CloudmersiveImageRecognitionApiClient::FaceMatch](docs/FaceMatch.md)
|
121
123
|
- [CloudmersiveImageRecognitionApiClient::FacePoint](docs/FacePoint.md)
|
122
124
|
- [CloudmersiveImageRecognitionApiClient::FaceWithLandmarks](docs/FaceWithLandmarks.md)
|
125
|
+
- [CloudmersiveImageRecognitionApiClient::FineTextDetectionResult](docs/FineTextDetectionResult.md)
|
126
|
+
- [CloudmersiveImageRecognitionApiClient::FineTextItem](docs/FineTextItem.md)
|
123
127
|
- [CloudmersiveImageRecognitionApiClient::ImageDescriptionResponse](docs/ImageDescriptionResponse.md)
|
124
128
|
- [CloudmersiveImageRecognitionApiClient::NsfwResult](docs/NsfwResult.md)
|
125
129
|
- [CloudmersiveImageRecognitionApiClient::ObjectDetectionResult](docs/ObjectDetectionResult.md)
|
126
130
|
- [CloudmersiveImageRecognitionApiClient::PersonWithAge](docs/PersonWithAge.md)
|
127
131
|
- [CloudmersiveImageRecognitionApiClient::RecognitionOutcome](docs/RecognitionOutcome.md)
|
132
|
+
- [CloudmersiveImageRecognitionApiClient::TextDetectionResult](docs/TextDetectionResult.md)
|
133
|
+
- [CloudmersiveImageRecognitionApiClient::TextItem](docs/TextItem.md)
|
128
134
|
- [CloudmersiveImageRecognitionApiClient::VehicleLicensePlateDetectionResult](docs/VehicleLicensePlateDetectionResult.md)
|
129
135
|
|
130
136
|
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# CloudmersiveImageRecognitionApiClient::FineTextDetectionResult
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**successful** | **BOOLEAN** | True if the operation was successful, false otherwise | [optional]
|
7
|
+
**text_items** | [**Array<FineTextItem>**](FineTextItem.md) | Text items found in the input image | [optional]
|
8
|
+
**text_items_count** | **Integer** | Count of text items found in the input image | [optional]
|
9
|
+
|
10
|
+
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# CloudmersiveImageRecognitionApiClient::FineTextItem
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**top_left_x** | **Integer** | X coordinate of the top/left text location; 0 represents the left edge of the input image | [optional]
|
7
|
+
**top_left_y** | **Integer** | Y coordinate of the top/left text location; 0 represents the top edge of the input image | [optional]
|
8
|
+
**top_right_x** | **Integer** | X coordinate of the top/right text location; 0 represents the left edge of the input image | [optional]
|
9
|
+
**top_right_y** | **Integer** | Y coordinate of the top/right text location; 0 represents the top edge of the input image | [optional]
|
10
|
+
**bottom_left_x** | **Integer** | X coordinate of the bottom/left text location; 0 represents the left edge of the input image | [optional]
|
11
|
+
**bottom_left_y** | **Integer** | Y coordinate of the bottom/left text location; 0 represents the top edge of the input image | [optional]
|
12
|
+
**bottom_right_x** | **Integer** | X coordinate of the bottom/right text location; 0 represents the left edge of the input image | [optional]
|
13
|
+
**bottom_right_y** | **Integer** | Y coordinate of the bottom/right text location; 0 represents the top edge of the input image | [optional]
|
14
|
+
|
15
|
+
|
data/docs/RecognizeApi.md
CHANGED
@@ -8,6 +8,8 @@ Method | HTTP request | Description
|
|
8
8
|
[**recognize_detect_and_unskew_document**](RecognizeApi.md#recognize_detect_and_unskew_document) | **POST** /image/recognize/detect-document/unskew | Detect and unskew a photo of a document
|
9
9
|
[**recognize_detect_objects**](RecognizeApi.md#recognize_detect_objects) | **POST** /image/recognize/detect-objects | Detect objects, including types and locations, in an image
|
10
10
|
[**recognize_detect_people**](RecognizeApi.md#recognize_detect_people) | **POST** /image/recognize/detect-people | Detect people, including locations, in an image
|
11
|
+
[**recognize_detect_text_fine**](RecognizeApi.md#recognize_detect_text_fine) | **POST** /image/recognize/detect-text/fine | Detect fine text in a photo of a document
|
12
|
+
[**recognize_detect_text_large**](RecognizeApi.md#recognize_detect_text_large) | **POST** /image/recognize/detect-text/large | Detect large text in a photo
|
11
13
|
[**recognize_detect_vehicle_license_plates**](RecognizeApi.md#recognize_detect_vehicle_license_plates) | **POST** /image/recognize/detect-vehicle-license-plates | Detect vehicle license plates in an image
|
12
14
|
|
13
15
|
|
@@ -231,6 +233,108 @@ Name | Type | Description | Notes
|
|
231
233
|
|
232
234
|
|
233
235
|
|
236
|
+
# **recognize_detect_text_fine**
|
237
|
+
> FineTextDetectionResult recognize_detect_text_fine(image_file)
|
238
|
+
|
239
|
+
Detect fine text in a photo of a document
|
240
|
+
|
241
|
+
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.
|
242
|
+
|
243
|
+
### Example
|
244
|
+
```ruby
|
245
|
+
# load the gem
|
246
|
+
require 'cloudmersive-image-recognition-api-client'
|
247
|
+
# setup authorization
|
248
|
+
CloudmersiveImageRecognitionApiClient.configure do |config|
|
249
|
+
# Configure API key authorization: Apikey
|
250
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
251
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
252
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
253
|
+
end
|
254
|
+
|
255
|
+
api_instance = CloudmersiveImageRecognitionApiClient::RecognizeApi.new
|
256
|
+
|
257
|
+
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.
|
258
|
+
|
259
|
+
|
260
|
+
begin
|
261
|
+
#Detect fine text in a photo of a document
|
262
|
+
result = api_instance.recognize_detect_text_fine(image_file)
|
263
|
+
p result
|
264
|
+
rescue CloudmersiveImageRecognitionApiClient::ApiError => e
|
265
|
+
puts "Exception when calling RecognizeApi->recognize_detect_text_fine: #{e}"
|
266
|
+
end
|
267
|
+
```
|
268
|
+
|
269
|
+
### Parameters
|
270
|
+
|
271
|
+
Name | Type | Description | Notes
|
272
|
+
------------- | ------------- | ------------- | -------------
|
273
|
+
**image_file** | **File**| Image file to perform the operation on. Common file formats such as PNG, JPEG are supported. |
|
274
|
+
|
275
|
+
### Return type
|
276
|
+
|
277
|
+
[**FineTextDetectionResult**](FineTextDetectionResult.md)
|
278
|
+
|
279
|
+
### Authorization
|
280
|
+
|
281
|
+
[Apikey](../README.md#Apikey)
|
282
|
+
|
283
|
+
### HTTP request headers
|
284
|
+
|
285
|
+
- **Content-Type**: multipart/form-data
|
286
|
+
- **Accept**: application/json, text/json, application/xml, text/xml
|
287
|
+
|
288
|
+
|
289
|
+
|
290
|
+
# **recognize_detect_text_large**
|
291
|
+
> TextDetectionResult recognize_detect_text_large
|
292
|
+
|
293
|
+
Detect large text in a photo
|
294
|
+
|
295
|
+
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.
|
296
|
+
|
297
|
+
### Example
|
298
|
+
```ruby
|
299
|
+
# load the gem
|
300
|
+
require 'cloudmersive-image-recognition-api-client'
|
301
|
+
# setup authorization
|
302
|
+
CloudmersiveImageRecognitionApiClient.configure do |config|
|
303
|
+
# Configure API key authorization: Apikey
|
304
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
305
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
306
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
307
|
+
end
|
308
|
+
|
309
|
+
api_instance = CloudmersiveImageRecognitionApiClient::RecognizeApi.new
|
310
|
+
|
311
|
+
begin
|
312
|
+
#Detect large text in a photo
|
313
|
+
result = api_instance.recognize_detect_text_large
|
314
|
+
p result
|
315
|
+
rescue CloudmersiveImageRecognitionApiClient::ApiError => e
|
316
|
+
puts "Exception when calling RecognizeApi->recognize_detect_text_large: #{e}"
|
317
|
+
end
|
318
|
+
```
|
319
|
+
|
320
|
+
### Parameters
|
321
|
+
This endpoint does not need any parameter.
|
322
|
+
|
323
|
+
### Return type
|
324
|
+
|
325
|
+
[**TextDetectionResult**](TextDetectionResult.md)
|
326
|
+
|
327
|
+
### Authorization
|
328
|
+
|
329
|
+
[Apikey](../README.md#Apikey)
|
330
|
+
|
331
|
+
### HTTP request headers
|
332
|
+
|
333
|
+
- **Content-Type**: Not defined
|
334
|
+
- **Accept**: application/json, text/json, application/xml, text/xml
|
335
|
+
|
336
|
+
|
337
|
+
|
234
338
|
# **recognize_detect_vehicle_license_plates**
|
235
339
|
> VehicleLicensePlateDetectionResult recognize_detect_vehicle_license_plates(image_file)
|
236
340
|
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# CloudmersiveImageRecognitionApiClient::TextDetectionResult
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**successful** | **BOOLEAN** | True if the operation was successful, false otherwise | [optional]
|
7
|
+
**text_items** | [**Array<TextItem>**](TextItem.md) | Text items found in the input image | [optional]
|
8
|
+
**text_items_count** | **Integer** | Count of text items found in the input image | [optional]
|
9
|
+
|
10
|
+
|
data/docs/TextItem.md
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
# CloudmersiveImageRecognitionApiClient::TextItem
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**left_x** | **Integer** | Left X coordinate of the text location; 0 represents the left edge of the input image | [optional]
|
7
|
+
**top_y** | **Integer** | Top Y coordinate of the text location; 0 represents the top edge of the input image | [optional]
|
8
|
+
**width** | **Integer** | Width in pixels of the text item | [optional]
|
9
|
+
**height** | **Integer** | Height in pixels of the text item | [optional]
|
10
|
+
|
11
|
+
|
@@ -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:
|
9
|
+
Swagger Codegen version: 2.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -31,11 +31,15 @@ require 'cloudmersive-image-recognition-api-client/models/face_locate_with_landm
|
|
31
31
|
require 'cloudmersive-image-recognition-api-client/models/face_match'
|
32
32
|
require 'cloudmersive-image-recognition-api-client/models/face_point'
|
33
33
|
require 'cloudmersive-image-recognition-api-client/models/face_with_landmarks'
|
34
|
+
require 'cloudmersive-image-recognition-api-client/models/fine_text_detection_result'
|
35
|
+
require 'cloudmersive-image-recognition-api-client/models/fine_text_item'
|
34
36
|
require 'cloudmersive-image-recognition-api-client/models/image_description_response'
|
35
37
|
require 'cloudmersive-image-recognition-api-client/models/nsfw_result'
|
36
38
|
require 'cloudmersive-image-recognition-api-client/models/object_detection_result'
|
37
39
|
require 'cloudmersive-image-recognition-api-client/models/person_with_age'
|
38
40
|
require 'cloudmersive-image-recognition-api-client/models/recognition_outcome'
|
41
|
+
require 'cloudmersive-image-recognition-api-client/models/text_detection_result'
|
42
|
+
require 'cloudmersive-image-recognition-api-client/models/text_item'
|
39
43
|
require 'cloudmersive-image-recognition-api-client/models/vehicle_license_plate_detection_result'
|
40
44
|
|
41
45
|
# APIs
|
@@ -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:
|
9
|
+
Swagger Codegen version: 2.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -247,6 +247,109 @@ module CloudmersiveImageRecognitionApiClient
|
|
247
247
|
return data, status_code, headers
|
248
248
|
end
|
249
249
|
|
250
|
+
# Detect fine text in a photo of a document
|
251
|
+
# 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.
|
252
|
+
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
253
|
+
# @param [Hash] opts the optional parameters
|
254
|
+
# @return [FineTextDetectionResult]
|
255
|
+
def recognize_detect_text_fine(image_file, opts = {})
|
256
|
+
data, _status_code, _headers = recognize_detect_text_fine_with_http_info(image_file, opts)
|
257
|
+
return data
|
258
|
+
end
|
259
|
+
|
260
|
+
# Detect fine text in a photo of a document
|
261
|
+
# 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.
|
262
|
+
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
263
|
+
# @param [Hash] opts the optional parameters
|
264
|
+
# @return [Array<(FineTextDetectionResult, Fixnum, Hash)>] FineTextDetectionResult data, response status code and response headers
|
265
|
+
def recognize_detect_text_fine_with_http_info(image_file, opts = {})
|
266
|
+
if @api_client.config.debugging
|
267
|
+
@api_client.config.logger.debug "Calling API: RecognizeApi.recognize_detect_text_fine ..."
|
268
|
+
end
|
269
|
+
# verify the required parameter 'image_file' is set
|
270
|
+
if @api_client.config.client_side_validation && image_file.nil?
|
271
|
+
fail ArgumentError, "Missing the required parameter 'image_file' when calling RecognizeApi.recognize_detect_text_fine"
|
272
|
+
end
|
273
|
+
# resource path
|
274
|
+
local_var_path = "/image/recognize/detect-text/fine"
|
275
|
+
|
276
|
+
# query parameters
|
277
|
+
query_params = {}
|
278
|
+
|
279
|
+
# header parameters
|
280
|
+
header_params = {}
|
281
|
+
# HTTP header 'Accept' (if needed)
|
282
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
283
|
+
# HTTP header 'Content-Type'
|
284
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
285
|
+
|
286
|
+
# form parameters
|
287
|
+
form_params = {}
|
288
|
+
form_params["imageFile"] = image_file
|
289
|
+
|
290
|
+
# http body (model)
|
291
|
+
post_body = nil
|
292
|
+
auth_names = ['Apikey']
|
293
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
294
|
+
:header_params => header_params,
|
295
|
+
:query_params => query_params,
|
296
|
+
:form_params => form_params,
|
297
|
+
:body => post_body,
|
298
|
+
:auth_names => auth_names,
|
299
|
+
:return_type => 'FineTextDetectionResult')
|
300
|
+
if @api_client.config.debugging
|
301
|
+
@api_client.config.logger.debug "API called: RecognizeApi#recognize_detect_text_fine\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
302
|
+
end
|
303
|
+
return data, status_code, headers
|
304
|
+
end
|
305
|
+
|
306
|
+
# Detect large text in a photo
|
307
|
+
# 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.
|
308
|
+
# @param [Hash] opts the optional parameters
|
309
|
+
# @return [TextDetectionResult]
|
310
|
+
def recognize_detect_text_large(opts = {})
|
311
|
+
data, _status_code, _headers = recognize_detect_text_large_with_http_info(opts)
|
312
|
+
return data
|
313
|
+
end
|
314
|
+
|
315
|
+
# Detect large text in a photo
|
316
|
+
# 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.
|
317
|
+
# @param [Hash] opts the optional parameters
|
318
|
+
# @return [Array<(TextDetectionResult, Fixnum, Hash)>] TextDetectionResult data, response status code and response headers
|
319
|
+
def recognize_detect_text_large_with_http_info(opts = {})
|
320
|
+
if @api_client.config.debugging
|
321
|
+
@api_client.config.logger.debug "Calling API: RecognizeApi.recognize_detect_text_large ..."
|
322
|
+
end
|
323
|
+
# resource path
|
324
|
+
local_var_path = "/image/recognize/detect-text/large"
|
325
|
+
|
326
|
+
# query parameters
|
327
|
+
query_params = {}
|
328
|
+
|
329
|
+
# header parameters
|
330
|
+
header_params = {}
|
331
|
+
# HTTP header 'Accept' (if needed)
|
332
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
333
|
+
|
334
|
+
# form parameters
|
335
|
+
form_params = {}
|
336
|
+
|
337
|
+
# http body (model)
|
338
|
+
post_body = nil
|
339
|
+
auth_names = ['Apikey']
|
340
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
341
|
+
:header_params => header_params,
|
342
|
+
:query_params => query_params,
|
343
|
+
:form_params => form_params,
|
344
|
+
:body => post_body,
|
345
|
+
:auth_names => auth_names,
|
346
|
+
:return_type => 'TextDetectionResult')
|
347
|
+
if @api_client.config.debugging
|
348
|
+
@api_client.config.logger.debug "API called: RecognizeApi#recognize_detect_text_large\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
349
|
+
end
|
350
|
+
return data, status_code, headers
|
351
|
+
end
|
352
|
+
|
250
353
|
# Detect vehicle license plates in an image
|
251
354
|
# 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.
|
252
355
|
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|