cloudmersive-image-recognition-api-client 2.0.1 → 2.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +7 -0
- data/README.md +184 -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/ColorResult.md +10 -0
- data/docs/ConvertApi.md +396 -0
- data/docs/DetectedLicensePlate.md +14 -0
- data/docs/DetectedObject.md +13 -0
- data/docs/DominantColorResult.md +9 -0
- data/docs/DrawPolygonInstance.md +11 -0
- data/docs/DrawPolygonRequest.md +10 -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 +704 -0
- data/docs/Face.md +11 -0
- data/docs/FaceApi.md +396 -0
- data/docs/FaceCompareResponse.md +11 -0
- data/docs/FaceLocateResponse.md +11 -0
- data/docs/FaceLocateWithLandmarksResponse.md +11 -0
- data/docs/FaceMatch.md +13 -0
- data/docs/FacePoint.md +9 -0
- data/docs/FaceWithLandmarks.md +20 -0
- data/docs/FilterApi.md +478 -0
- data/docs/FindSymbolResult.md +13 -0
- data/docs/FineTextDetectionResult.md +10 -0
- data/docs/FineTextItem.md +18 -0
- data/docs/GenderDetectionResult.md +10 -0
- data/docs/ImageDescriptionResponse.md +11 -0
- data/docs/ImageMetadata.md +17 -0
- data/docs/ImageMetadataExifValue.md +10 -0
- data/docs/InfoApi.md +118 -0
- data/docs/NsfwApi.md +63 -0
- data/docs/NsfwResult.md +10 -0
- data/docs/ObjectDetectionResult.md +10 -0
- data/docs/PersonWithAge.md +11 -0
- data/docs/PersonWithGender.md +10 -0
- data/docs/PolygonPoint.md +9 -0
- data/docs/RecognitionOutcome.md +9 -0
- data/docs/RecognizeApi.md +455 -0
- data/docs/ResizeApi.md +130 -0
- data/docs/TextDetectionResult.md +10 -0
- data/docs/TextItem.md +11 -0
- data/docs/VehicleLicensePlateDetectionResult.md +10 -0
- data/git_push.sh +55 -0
- data/lib/cloudmersive-image-recognition-api-client.rb +82 -0
- data/lib/cloudmersive-image-recognition-api-client/api/artistic_api.rb +84 -0
- data/lib/cloudmersive-image-recognition-api-client/api/convert_api.rb +414 -0
- data/lib/cloudmersive-image-recognition-api-client/api/edit_api.rb +753 -0
- data/lib/cloudmersive-image-recognition-api-client/api/face_api.rb +415 -0
- data/lib/cloudmersive-image-recognition-api-client/api/filter_api.rb +525 -0
- data/lib/cloudmersive-image-recognition-api-client/api/info_api.rb +133 -0
- data/lib/cloudmersive-image-recognition-api-client/api/nsfw_api.rb +78 -0
- data/lib/cloudmersive-image-recognition-api-client/api/recognize_api.rb +473 -0
- data/lib/cloudmersive-image-recognition-api-client/api/resize_api.rb +157 -0
- data/lib/cloudmersive-image-recognition-api-client/api_client.rb +391 -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 +208 -0
- data/lib/cloudmersive-image-recognition-api-client/models/color_result.rb +206 -0
- data/lib/cloudmersive-image-recognition-api-client/models/detected_license_plate.rb +246 -0
- data/lib/cloudmersive-image-recognition-api-client/models/detected_object.rb +236 -0
- data/lib/cloudmersive-image-recognition-api-client/models/dominant_color_result.rb +198 -0
- data/lib/cloudmersive-image-recognition-api-client/models/draw_polygon_instance.rb +218 -0
- data/lib/cloudmersive-image-recognition-api-client/models/draw_polygon_request.rb +223 -0
- data/lib/cloudmersive-image-recognition-api-client/models/draw_rectangle_instance.rb +246 -0
- data/lib/cloudmersive-image-recognition-api-client/models/draw_rectangle_request.rb +223 -0
- data/lib/cloudmersive-image-recognition-api-client/models/draw_text_instance.rb +256 -0
- data/lib/cloudmersive-image-recognition-api-client/models/draw_text_request.rb +223 -0
- data/lib/cloudmersive-image-recognition-api-client/models/face.rb +216 -0
- data/lib/cloudmersive-image-recognition-api-client/models/face_compare_response.rb +218 -0
- data/lib/cloudmersive-image-recognition-api-client/models/face_locate_response.rb +218 -0
- data/lib/cloudmersive-image-recognition-api-client/models/face_locate_with_landmarks_response.rb +218 -0
- data/lib/cloudmersive-image-recognition-api-client/models/face_match.rb +236 -0
- data/lib/cloudmersive-image-recognition-api-client/models/face_point.rb +196 -0
- data/lib/cloudmersive-image-recognition-api-client/models/face_with_landmarks.rb +324 -0
- data/lib/cloudmersive-image-recognition-api-client/models/find_symbol_result.rb +236 -0
- data/lib/cloudmersive-image-recognition-api-client/models/fine_text_detection_result.rb +208 -0
- data/lib/cloudmersive-image-recognition-api-client/models/fine_text_item.rb +286 -0
- data/lib/cloudmersive-image-recognition-api-client/models/gender_detection_result.rb +208 -0
- data/lib/cloudmersive-image-recognition-api-client/models/image_description_response.rb +216 -0
- data/lib/cloudmersive-image-recognition-api-client/models/image_metadata.rb +278 -0
- data/lib/cloudmersive-image-recognition-api-client/models/image_metadata_exif_value.rb +206 -0
- data/lib/cloudmersive-image-recognition-api-client/models/nsfw_result.rb +206 -0
- data/lib/cloudmersive-image-recognition-api-client/models/object_detection_result.rb +208 -0
- data/lib/cloudmersive-image-recognition-api-client/models/person_with_age.rb +215 -0
- data/lib/cloudmersive-image-recognition-api-client/models/person_with_gender.rb +206 -0
- data/lib/cloudmersive-image-recognition-api-client/models/polygon_point.rb +196 -0
- data/lib/cloudmersive-image-recognition-api-client/models/recognition_outcome.rb +196 -0
- data/lib/cloudmersive-image-recognition-api-client/models/text_detection_result.rb +208 -0
- data/lib/cloudmersive-image-recognition-api-client/models/text_item.rb +216 -0
- data/lib/cloudmersive-image-recognition-api-client/models/vehicle_license_plate_detection_result.rb +208 -0
- data/lib/cloudmersive-image-recognition-api-client/version.rb +15 -0
- data/spec/api/artistic_api_spec.rb +48 -0
- data/spec/api/convert_api_spec.rb +120 -0
- data/spec/api/edit_api_spec.rb +191 -0
- data/spec/api/face_api_spec.rb +120 -0
- data/spec/api/filter_api_spec.rb +141 -0
- data/spec/api/info_api_spec.rb +59 -0
- data/spec/api/nsfw_api_spec.rb +47 -0
- data/spec/api/recognize_api_spec.rb +133 -0
- data/spec/api/resize_api_spec.rb +63 -0
- data/spec/api_client_spec.rb +243 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/age_detection_result_spec.rb +53 -0
- data/spec/models/color_result_spec.rb +53 -0
- data/spec/models/detected_license_plate_spec.rb +77 -0
- data/spec/models/detected_object_spec.rb +71 -0
- data/spec/models/dominant_color_result_spec.rb +47 -0
- data/spec/models/draw_polygon_instance_spec.rb +59 -0
- data/spec/models/draw_polygon_request_spec.rb +53 -0
- data/spec/models/draw_rectangle_instance_spec.rb +77 -0
- data/spec/models/draw_rectangle_request_spec.rb +53 -0
- data/spec/models/draw_text_instance_spec.rb +83 -0
- data/spec/models/draw_text_request_spec.rb +53 -0
- data/spec/models/face_compare_response_spec.rb +59 -0
- data/spec/models/face_locate_response_spec.rb +59 -0
- data/spec/models/face_locate_with_landmarks_response_spec.rb +59 -0
- data/spec/models/face_match_spec.rb +71 -0
- data/spec/models/face_point_spec.rb +47 -0
- data/spec/models/face_spec.rb +59 -0
- data/spec/models/face_with_landmarks_spec.rb +113 -0
- data/spec/models/find_symbol_result_spec.rb +71 -0
- data/spec/models/fine_text_detection_result_spec.rb +53 -0
- data/spec/models/fine_text_item_spec.rb +101 -0
- data/spec/models/gender_detection_result_spec.rb +53 -0
- data/spec/models/image_description_response_spec.rb +59 -0
- data/spec/models/image_metadata_exif_value_spec.rb +53 -0
- data/spec/models/image_metadata_spec.rb +95 -0
- data/spec/models/nsfw_result_spec.rb +53 -0
- data/spec/models/object_detection_result_spec.rb +53 -0
- data/spec/models/person_with_age_spec.rb +59 -0
- data/spec/models/person_with_gender_spec.rb +53 -0
- data/spec/models/polygon_point_spec.rb +47 -0
- data/spec/models/recognition_outcome_spec.rb +47 -0
- data/spec/models/text_detection_result_spec.rb +53 -0
- data/spec/models/text_item_spec.rb +59 -0
- data/spec/models/vehicle_license_plate_detection_result_spec.rb +53 -0
- data/spec/spec_helper.rb +111 -0
- metadata +145 -3
@@ -0,0 +1,133 @@
|
|
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.4.14
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'uri'
|
14
|
+
|
15
|
+
module CloudmersiveImageRecognitionApiClient
|
16
|
+
class InfoApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Returns the dominant colors of the image
|
23
|
+
# Uses advanced image processing to extract the top 5 dominant colors in the image, returned in the order of dominance with the most-dominant color first. These are the primary perceptual colors used in the image as perceived by a viewer.
|
24
|
+
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [DominantColorResult]
|
27
|
+
def info_get_dominant_color(image_file, opts = {})
|
28
|
+
data, _status_code, _headers = info_get_dominant_color_with_http_info(image_file, opts)
|
29
|
+
data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Returns the dominant colors of the image
|
33
|
+
# Uses advanced image processing to extract the top 5 dominant colors in the image, returned in the order of dominance with the most-dominant color first. These are the primary perceptual colors used in the image as perceived by a viewer.
|
34
|
+
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @return [Array<(DominantColorResult, Fixnum, Hash)>] DominantColorResult data, response status code and response headers
|
37
|
+
def info_get_dominant_color_with_http_info(image_file, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: InfoApi.info_get_dominant_color ...'
|
40
|
+
end
|
41
|
+
# verify the required parameter 'image_file' is set
|
42
|
+
if @api_client.config.client_side_validation && image_file.nil?
|
43
|
+
fail ArgumentError, "Missing the required parameter 'image_file' when calling InfoApi.info_get_dominant_color"
|
44
|
+
end
|
45
|
+
# resource path
|
46
|
+
local_var_path = '/image/get-info/dominant-color'
|
47
|
+
|
48
|
+
# query parameters
|
49
|
+
query_params = {}
|
50
|
+
|
51
|
+
# header parameters
|
52
|
+
header_params = {}
|
53
|
+
# HTTP header 'Accept' (if needed)
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
55
|
+
# HTTP header 'Content-Type'
|
56
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
57
|
+
|
58
|
+
# form parameters
|
59
|
+
form_params = {}
|
60
|
+
form_params['imageFile'] = image_file
|
61
|
+
|
62
|
+
# http body (model)
|
63
|
+
post_body = nil
|
64
|
+
auth_names = ['Apikey']
|
65
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
66
|
+
:header_params => header_params,
|
67
|
+
:query_params => query_params,
|
68
|
+
:form_params => form_params,
|
69
|
+
:body => post_body,
|
70
|
+
:auth_names => auth_names,
|
71
|
+
:return_type => 'DominantColorResult')
|
72
|
+
if @api_client.config.debugging
|
73
|
+
@api_client.config.logger.debug "API called: InfoApi#info_get_dominant_color\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
74
|
+
end
|
75
|
+
return data, status_code, headers
|
76
|
+
end
|
77
|
+
# Returns the image metadata including EXIF and resolution
|
78
|
+
# Returns the metadata information on the image, including file type, EXIF (if available), and resolution.
|
79
|
+
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
80
|
+
# @param [Hash] opts the optional parameters
|
81
|
+
# @return [ImageMetadata]
|
82
|
+
def info_get_metadata(image_file, opts = {})
|
83
|
+
data, _status_code, _headers = info_get_metadata_with_http_info(image_file, opts)
|
84
|
+
data
|
85
|
+
end
|
86
|
+
|
87
|
+
# Returns the image metadata including EXIF and resolution
|
88
|
+
# Returns the metadata information on the image, including file type, EXIF (if available), and resolution.
|
89
|
+
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
90
|
+
# @param [Hash] opts the optional parameters
|
91
|
+
# @return [Array<(ImageMetadata, Fixnum, Hash)>] ImageMetadata data, response status code and response headers
|
92
|
+
def info_get_metadata_with_http_info(image_file, opts = {})
|
93
|
+
if @api_client.config.debugging
|
94
|
+
@api_client.config.logger.debug 'Calling API: InfoApi.info_get_metadata ...'
|
95
|
+
end
|
96
|
+
# verify the required parameter 'image_file' is set
|
97
|
+
if @api_client.config.client_side_validation && image_file.nil?
|
98
|
+
fail ArgumentError, "Missing the required parameter 'image_file' when calling InfoApi.info_get_metadata"
|
99
|
+
end
|
100
|
+
# resource path
|
101
|
+
local_var_path = '/image/get-info/metadata'
|
102
|
+
|
103
|
+
# query parameters
|
104
|
+
query_params = {}
|
105
|
+
|
106
|
+
# header parameters
|
107
|
+
header_params = {}
|
108
|
+
# HTTP header 'Accept' (if needed)
|
109
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
110
|
+
# HTTP header 'Content-Type'
|
111
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
112
|
+
|
113
|
+
# form parameters
|
114
|
+
form_params = {}
|
115
|
+
form_params['imageFile'] = image_file
|
116
|
+
|
117
|
+
# http body (model)
|
118
|
+
post_body = nil
|
119
|
+
auth_names = ['Apikey']
|
120
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
121
|
+
:header_params => header_params,
|
122
|
+
:query_params => query_params,
|
123
|
+
:form_params => form_params,
|
124
|
+
:body => post_body,
|
125
|
+
:auth_names => auth_names,
|
126
|
+
:return_type => 'ImageMetadata')
|
127
|
+
if @api_client.config.debugging
|
128
|
+
@api_client.config.logger.debug "API called: InfoApi#info_get_metadata\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
129
|
+
end
|
130
|
+
return data, status_code, headers
|
131
|
+
end
|
132
|
+
end
|
133
|
+
end
|
@@ -0,0 +1,78 @@
|
|
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.4.14
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'uri'
|
14
|
+
|
15
|
+
module CloudmersiveImageRecognitionApiClient
|
16
|
+
class NsfwApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Not safe for work NSFW racy content classification
|
23
|
+
# Classify an image into Not Safe For Work (NSFW)/Porn/Racy content and Safe Content.
|
24
|
+
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [NsfwResult]
|
27
|
+
def nsfw_classify(image_file, opts = {})
|
28
|
+
data, _status_code, _headers = nsfw_classify_with_http_info(image_file, opts)
|
29
|
+
data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Not safe for work NSFW racy content classification
|
33
|
+
# Classify an image into Not Safe For Work (NSFW)/Porn/Racy content and Safe Content.
|
34
|
+
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @return [Array<(NsfwResult, Fixnum, Hash)>] NsfwResult data, response status code and response headers
|
37
|
+
def nsfw_classify_with_http_info(image_file, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: NsfwApi.nsfw_classify ...'
|
40
|
+
end
|
41
|
+
# verify the required parameter 'image_file' is set
|
42
|
+
if @api_client.config.client_side_validation && image_file.nil?
|
43
|
+
fail ArgumentError, "Missing the required parameter 'image_file' when calling NsfwApi.nsfw_classify"
|
44
|
+
end
|
45
|
+
# resource path
|
46
|
+
local_var_path = '/image/nsfw/classify'
|
47
|
+
|
48
|
+
# query parameters
|
49
|
+
query_params = {}
|
50
|
+
|
51
|
+
# header parameters
|
52
|
+
header_params = {}
|
53
|
+
# HTTP header 'Accept' (if needed)
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
55
|
+
# HTTP header 'Content-Type'
|
56
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
57
|
+
|
58
|
+
# form parameters
|
59
|
+
form_params = {}
|
60
|
+
form_params['imageFile'] = image_file
|
61
|
+
|
62
|
+
# http body (model)
|
63
|
+
post_body = nil
|
64
|
+
auth_names = ['Apikey']
|
65
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
66
|
+
:header_params => header_params,
|
67
|
+
:query_params => query_params,
|
68
|
+
:form_params => form_params,
|
69
|
+
:body => post_body,
|
70
|
+
:auth_names => auth_names,
|
71
|
+
:return_type => 'NsfwResult')
|
72
|
+
if @api_client.config.debugging
|
73
|
+
@api_client.config.logger.debug "API called: NsfwApi#nsfw_classify\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
74
|
+
end
|
75
|
+
return data, status_code, headers
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
@@ -0,0 +1,473 @@
|
|
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.4.14
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'uri'
|
14
|
+
|
15
|
+
module CloudmersiveImageRecognitionApiClient
|
16
|
+
class RecognizeApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Describe an image in natural language
|
23
|
+
# Generate an English language text description of the image as a sentence.
|
24
|
+
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [ImageDescriptionResponse]
|
27
|
+
def recognize_describe(image_file, opts = {})
|
28
|
+
data, _status_code, _headers = recognize_describe_with_http_info(image_file, opts)
|
29
|
+
data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Describe an image in natural language
|
33
|
+
# Generate an English language text description of the image as a sentence.
|
34
|
+
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @return [Array<(ImageDescriptionResponse, Fixnum, Hash)>] ImageDescriptionResponse data, response status code and response headers
|
37
|
+
def recognize_describe_with_http_info(image_file, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: RecognizeApi.recognize_describe ...'
|
40
|
+
end
|
41
|
+
# verify the required parameter 'image_file' is set
|
42
|
+
if @api_client.config.client_side_validation && image_file.nil?
|
43
|
+
fail ArgumentError, "Missing the required parameter 'image_file' when calling RecognizeApi.recognize_describe"
|
44
|
+
end
|
45
|
+
# resource path
|
46
|
+
local_var_path = '/image/recognize/describe'
|
47
|
+
|
48
|
+
# query parameters
|
49
|
+
query_params = {}
|
50
|
+
|
51
|
+
# header parameters
|
52
|
+
header_params = {}
|
53
|
+
# HTTP header 'Accept' (if needed)
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
55
|
+
# HTTP header 'Content-Type'
|
56
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
57
|
+
|
58
|
+
# form parameters
|
59
|
+
form_params = {}
|
60
|
+
form_params['imageFile'] = image_file
|
61
|
+
|
62
|
+
# http body (model)
|
63
|
+
post_body = nil
|
64
|
+
auth_names = ['Apikey']
|
65
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
66
|
+
:header_params => header_params,
|
67
|
+
:query_params => query_params,
|
68
|
+
:form_params => form_params,
|
69
|
+
:body => post_body,
|
70
|
+
:auth_names => auth_names,
|
71
|
+
:return_type => 'ImageDescriptionResponse')
|
72
|
+
if @api_client.config.debugging
|
73
|
+
@api_client.config.logger.debug "API called: RecognizeApi#recognize_describe\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
74
|
+
end
|
75
|
+
return data, status_code, headers
|
76
|
+
end
|
77
|
+
# Detect and unskew a photo of a document
|
78
|
+
# Detect and unskew a photo of a document (e.g. taken on a cell phone) into a perfectly square image. Great for document scanning applications; once unskewed, this image is perfect for converting to PDF using the Convert API or optical character recognition using the OCR API.
|
79
|
+
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
80
|
+
# @param [Hash] opts the optional parameters
|
81
|
+
# @option opts [String] :post_processing_effect Optional, post-processing effects to apply to the email, default is None. Possible values are None and BlackAndWhite (force the image into a black and white view to aid in OCR operations).
|
82
|
+
# @return [String]
|
83
|
+
def recognize_detect_and_unskew_document(image_file, opts = {})
|
84
|
+
data, _status_code, _headers = recognize_detect_and_unskew_document_with_http_info(image_file, opts)
|
85
|
+
data
|
86
|
+
end
|
87
|
+
|
88
|
+
# Detect and unskew a photo of a document
|
89
|
+
# Detect and unskew a photo of a document (e.g. taken on a cell phone) into a perfectly square image. Great for document scanning applications; once unskewed, this image is perfect for converting to PDF using the Convert API or optical character recognition using the OCR API.
|
90
|
+
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
91
|
+
# @param [Hash] opts the optional parameters
|
92
|
+
# @option opts [String] :post_processing_effect Optional, post-processing effects to apply to the email, default is None. Possible values are None and BlackAndWhite (force the image into a black and white view to aid in OCR operations).
|
93
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
94
|
+
def recognize_detect_and_unskew_document_with_http_info(image_file, opts = {})
|
95
|
+
if @api_client.config.debugging
|
96
|
+
@api_client.config.logger.debug 'Calling API: RecognizeApi.recognize_detect_and_unskew_document ...'
|
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 RecognizeApi.recognize_detect_and_unskew_document"
|
101
|
+
end
|
102
|
+
# resource path
|
103
|
+
local_var_path = '/image/recognize/detect-document/unskew'
|
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/json', 'text/json', 'application/xml', 'text/xml'])
|
112
|
+
# HTTP header 'Content-Type'
|
113
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
114
|
+
header_params[:'PostProcessingEffect'] = opts[:'post_processing_effect'] if !opts[:'post_processing_effect'].nil?
|
115
|
+
|
116
|
+
# form parameters
|
117
|
+
form_params = {}
|
118
|
+
form_params['imageFile'] = image_file
|
119
|
+
|
120
|
+
# http body (model)
|
121
|
+
post_body = nil
|
122
|
+
auth_names = ['Apikey']
|
123
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
124
|
+
:header_params => header_params,
|
125
|
+
:query_params => query_params,
|
126
|
+
:form_params => form_params,
|
127
|
+
:body => post_body,
|
128
|
+
:auth_names => auth_names,
|
129
|
+
:return_type => 'String')
|
130
|
+
if @api_client.config.debugging
|
131
|
+
@api_client.config.logger.debug "API called: RecognizeApi#recognize_detect_and_unskew_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
132
|
+
end
|
133
|
+
return data, status_code, headers
|
134
|
+
end
|
135
|
+
# Detect objects including types and locations in an image
|
136
|
+
# Identify the position, size and description of objects in an image, along with a recognition confidence level. Detects both human people and objects in an image.
|
137
|
+
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
138
|
+
# @param [Hash] opts the optional parameters
|
139
|
+
# @return [ObjectDetectionResult]
|
140
|
+
def recognize_detect_objects(image_file, opts = {})
|
141
|
+
data, _status_code, _headers = recognize_detect_objects_with_http_info(image_file, opts)
|
142
|
+
data
|
143
|
+
end
|
144
|
+
|
145
|
+
# Detect objects including types and locations in an image
|
146
|
+
# Identify the position, size and description of objects in an image, along with a recognition confidence level. Detects both human people and objects in an image.
|
147
|
+
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
148
|
+
# @param [Hash] opts the optional parameters
|
149
|
+
# @return [Array<(ObjectDetectionResult, Fixnum, Hash)>] ObjectDetectionResult data, response status code and response headers
|
150
|
+
def recognize_detect_objects_with_http_info(image_file, opts = {})
|
151
|
+
if @api_client.config.debugging
|
152
|
+
@api_client.config.logger.debug 'Calling API: RecognizeApi.recognize_detect_objects ...'
|
153
|
+
end
|
154
|
+
# verify the required parameter 'image_file' is set
|
155
|
+
if @api_client.config.client_side_validation && image_file.nil?
|
156
|
+
fail ArgumentError, "Missing the required parameter 'image_file' when calling RecognizeApi.recognize_detect_objects"
|
157
|
+
end
|
158
|
+
# resource path
|
159
|
+
local_var_path = '/image/recognize/detect-objects'
|
160
|
+
|
161
|
+
# query parameters
|
162
|
+
query_params = {}
|
163
|
+
|
164
|
+
# header parameters
|
165
|
+
header_params = {}
|
166
|
+
# HTTP header 'Accept' (if needed)
|
167
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
168
|
+
# HTTP header 'Content-Type'
|
169
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
170
|
+
|
171
|
+
# form parameters
|
172
|
+
form_params = {}
|
173
|
+
form_params['imageFile'] = image_file
|
174
|
+
|
175
|
+
# http body (model)
|
176
|
+
post_body = nil
|
177
|
+
auth_names = ['Apikey']
|
178
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
179
|
+
:header_params => header_params,
|
180
|
+
:query_params => query_params,
|
181
|
+
:form_params => form_params,
|
182
|
+
:body => post_body,
|
183
|
+
:auth_names => auth_names,
|
184
|
+
:return_type => 'ObjectDetectionResult')
|
185
|
+
if @api_client.config.debugging
|
186
|
+
@api_client.config.logger.debug "API called: RecognizeApi#recognize_detect_objects\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
187
|
+
end
|
188
|
+
return data, status_code, headers
|
189
|
+
end
|
190
|
+
# Detect people including locations in an image
|
191
|
+
# Identify the position, and size of human people in an image, along with a recognition confidence level. People in the image do NOT need to be facing the camera; they can be facing away, edge-on, etc.
|
192
|
+
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
193
|
+
# @param [Hash] opts the optional parameters
|
194
|
+
# @return [ObjectDetectionResult]
|
195
|
+
def recognize_detect_people(image_file, opts = {})
|
196
|
+
data, _status_code, _headers = recognize_detect_people_with_http_info(image_file, opts)
|
197
|
+
data
|
198
|
+
end
|
199
|
+
|
200
|
+
# Detect people including locations in an image
|
201
|
+
# Identify the position, and size of human people in an image, along with a recognition confidence level. People in the image do NOT need to be facing the camera; they can be facing away, edge-on, etc.
|
202
|
+
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
203
|
+
# @param [Hash] opts the optional parameters
|
204
|
+
# @return [Array<(ObjectDetectionResult, Fixnum, Hash)>] ObjectDetectionResult data, response status code and response headers
|
205
|
+
def recognize_detect_people_with_http_info(image_file, opts = {})
|
206
|
+
if @api_client.config.debugging
|
207
|
+
@api_client.config.logger.debug 'Calling API: RecognizeApi.recognize_detect_people ...'
|
208
|
+
end
|
209
|
+
# verify the required parameter 'image_file' is set
|
210
|
+
if @api_client.config.client_side_validation && image_file.nil?
|
211
|
+
fail ArgumentError, "Missing the required parameter 'image_file' when calling RecognizeApi.recognize_detect_people"
|
212
|
+
end
|
213
|
+
# resource path
|
214
|
+
local_var_path = '/image/recognize/detect-people'
|
215
|
+
|
216
|
+
# query parameters
|
217
|
+
query_params = {}
|
218
|
+
|
219
|
+
# header parameters
|
220
|
+
header_params = {}
|
221
|
+
# HTTP header 'Accept' (if needed)
|
222
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
223
|
+
# HTTP header 'Content-Type'
|
224
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
225
|
+
|
226
|
+
# form parameters
|
227
|
+
form_params = {}
|
228
|
+
form_params['imageFile'] = image_file
|
229
|
+
|
230
|
+
# http body (model)
|
231
|
+
post_body = nil
|
232
|
+
auth_names = ['Apikey']
|
233
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
234
|
+
:header_params => header_params,
|
235
|
+
:query_params => query_params,
|
236
|
+
:form_params => form_params,
|
237
|
+
:body => post_body,
|
238
|
+
:auth_names => auth_names,
|
239
|
+
:return_type => 'ObjectDetectionResult')
|
240
|
+
if @api_client.config.debugging
|
241
|
+
@api_client.config.logger.debug "API called: RecognizeApi#recognize_detect_people\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
242
|
+
end
|
243
|
+
return data, status_code, headers
|
244
|
+
end
|
245
|
+
# Detect fine text in a photo of a document
|
246
|
+
# Identify the position, and size of small/fine text within a photograph of a document. Identify the location of small text in a photo - such as words and other forms of high density text. Can be used on a scan of a document or a photograph (e.g. smartphone camera) of a document, page or receipt. For OCR purposes - please see our Deep Learning OCR APIs.
|
247
|
+
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
248
|
+
# @param [Hash] opts the optional parameters
|
249
|
+
# @return [FineTextDetectionResult]
|
250
|
+
def recognize_detect_text_fine(image_file, opts = {})
|
251
|
+
data, _status_code, _headers = recognize_detect_text_fine_with_http_info(image_file, opts)
|
252
|
+
data
|
253
|
+
end
|
254
|
+
|
255
|
+
# Detect fine text in a photo of a document
|
256
|
+
# Identify the position, and size of small/fine text within a photograph of a document. Identify the location of small text in a photo - such as words and other forms of high density text. Can be used on a scan of a document or a photograph (e.g. smartphone camera) of a document, page or receipt. For OCR purposes - please see our Deep Learning OCR APIs.
|
257
|
+
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
258
|
+
# @param [Hash] opts the optional parameters
|
259
|
+
# @return [Array<(FineTextDetectionResult, Fixnum, Hash)>] FineTextDetectionResult data, response status code and response headers
|
260
|
+
def recognize_detect_text_fine_with_http_info(image_file, opts = {})
|
261
|
+
if @api_client.config.debugging
|
262
|
+
@api_client.config.logger.debug 'Calling API: RecognizeApi.recognize_detect_text_fine ...'
|
263
|
+
end
|
264
|
+
# verify the required parameter 'image_file' is set
|
265
|
+
if @api_client.config.client_side_validation && image_file.nil?
|
266
|
+
fail ArgumentError, "Missing the required parameter 'image_file' when calling RecognizeApi.recognize_detect_text_fine"
|
267
|
+
end
|
268
|
+
# resource path
|
269
|
+
local_var_path = '/image/recognize/detect-text/fine'
|
270
|
+
|
271
|
+
# query parameters
|
272
|
+
query_params = {}
|
273
|
+
|
274
|
+
# header parameters
|
275
|
+
header_params = {}
|
276
|
+
# HTTP header 'Accept' (if needed)
|
277
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
278
|
+
# HTTP header 'Content-Type'
|
279
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
280
|
+
|
281
|
+
# form parameters
|
282
|
+
form_params = {}
|
283
|
+
form_params['imageFile'] = image_file
|
284
|
+
|
285
|
+
# http body (model)
|
286
|
+
post_body = nil
|
287
|
+
auth_names = ['Apikey']
|
288
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
289
|
+
:header_params => header_params,
|
290
|
+
:query_params => query_params,
|
291
|
+
:form_params => form_params,
|
292
|
+
:body => post_body,
|
293
|
+
:auth_names => auth_names,
|
294
|
+
:return_type => 'FineTextDetectionResult')
|
295
|
+
if @api_client.config.debugging
|
296
|
+
@api_client.config.logger.debug "API called: RecognizeApi#recognize_detect_text_fine\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
297
|
+
end
|
298
|
+
return data, status_code, headers
|
299
|
+
end
|
300
|
+
# Detect large text in a photo
|
301
|
+
# Identify the position, and size of large text within a photograph. Identify the location of large text in a photo - such as signs, titles, etc. and other forms of large, low-density text. Not suitable for high-density text (e.g. scans of documents, receipts, etc.) for OCR purposes - for OCR, please see our Deep Learning OCR APIs.
|
302
|
+
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
303
|
+
# @param [Hash] opts the optional parameters
|
304
|
+
# @return [TextDetectionResult]
|
305
|
+
def recognize_detect_text_large(image_file, opts = {})
|
306
|
+
data, _status_code, _headers = recognize_detect_text_large_with_http_info(image_file, opts)
|
307
|
+
data
|
308
|
+
end
|
309
|
+
|
310
|
+
# Detect large text in a photo
|
311
|
+
# Identify the position, and size of large text within a photograph. Identify the location of large text in a photo - such as signs, titles, etc. and other forms of large, low-density text. Not suitable for high-density text (e.g. scans of documents, receipts, etc.) for OCR purposes - for OCR, please see our Deep Learning OCR APIs.
|
312
|
+
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
313
|
+
# @param [Hash] opts the optional parameters
|
314
|
+
# @return [Array<(TextDetectionResult, Fixnum, Hash)>] TextDetectionResult data, response status code and response headers
|
315
|
+
def recognize_detect_text_large_with_http_info(image_file, opts = {})
|
316
|
+
if @api_client.config.debugging
|
317
|
+
@api_client.config.logger.debug 'Calling API: RecognizeApi.recognize_detect_text_large ...'
|
318
|
+
end
|
319
|
+
# verify the required parameter 'image_file' is set
|
320
|
+
if @api_client.config.client_side_validation && image_file.nil?
|
321
|
+
fail ArgumentError, "Missing the required parameter 'image_file' when calling RecognizeApi.recognize_detect_text_large"
|
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
|
+
# HTTP header 'Content-Type'
|
334
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
335
|
+
|
336
|
+
# form parameters
|
337
|
+
form_params = {}
|
338
|
+
form_params['imageFile'] = image_file
|
339
|
+
|
340
|
+
# http body (model)
|
341
|
+
post_body = nil
|
342
|
+
auth_names = ['Apikey']
|
343
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
344
|
+
:header_params => header_params,
|
345
|
+
:query_params => query_params,
|
346
|
+
:form_params => form_params,
|
347
|
+
:body => post_body,
|
348
|
+
:auth_names => auth_names,
|
349
|
+
:return_type => 'TextDetectionResult')
|
350
|
+
if @api_client.config.debugging
|
351
|
+
@api_client.config.logger.debug "API called: RecognizeApi#recognize_detect_text_large\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
352
|
+
end
|
353
|
+
return data, status_code, headers
|
354
|
+
end
|
355
|
+
# Detect vehicle license plates in an image
|
356
|
+
# Identify the position, and size, and content of vehicle license plates in an image. License plates should be within 15-20 degrees on-axis to the camera. Supported image formats are JPG, PNG and BMP.
|
357
|
+
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
358
|
+
# @param [Hash] opts the optional parameters
|
359
|
+
# @return [VehicleLicensePlateDetectionResult]
|
360
|
+
def recognize_detect_vehicle_license_plates(image_file, opts = {})
|
361
|
+
data, _status_code, _headers = recognize_detect_vehicle_license_plates_with_http_info(image_file, opts)
|
362
|
+
data
|
363
|
+
end
|
364
|
+
|
365
|
+
# Detect vehicle license plates in an image
|
366
|
+
# Identify the position, and size, and content of vehicle license plates in an image. License plates should be within 15-20 degrees on-axis to the camera. Supported image formats are JPG, PNG and BMP.
|
367
|
+
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
368
|
+
# @param [Hash] opts the optional parameters
|
369
|
+
# @return [Array<(VehicleLicensePlateDetectionResult, Fixnum, Hash)>] VehicleLicensePlateDetectionResult data, response status code and response headers
|
370
|
+
def recognize_detect_vehicle_license_plates_with_http_info(image_file, opts = {})
|
371
|
+
if @api_client.config.debugging
|
372
|
+
@api_client.config.logger.debug 'Calling API: RecognizeApi.recognize_detect_vehicle_license_plates ...'
|
373
|
+
end
|
374
|
+
# verify the required parameter 'image_file' is set
|
375
|
+
if @api_client.config.client_side_validation && image_file.nil?
|
376
|
+
fail ArgumentError, "Missing the required parameter 'image_file' when calling RecognizeApi.recognize_detect_vehicle_license_plates"
|
377
|
+
end
|
378
|
+
# resource path
|
379
|
+
local_var_path = '/image/recognize/detect-vehicle-license-plates'
|
380
|
+
|
381
|
+
# query parameters
|
382
|
+
query_params = {}
|
383
|
+
|
384
|
+
# header parameters
|
385
|
+
header_params = {}
|
386
|
+
# HTTP header 'Accept' (if needed)
|
387
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
388
|
+
# HTTP header 'Content-Type'
|
389
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
390
|
+
|
391
|
+
# form parameters
|
392
|
+
form_params = {}
|
393
|
+
form_params['imageFile'] = image_file
|
394
|
+
|
395
|
+
# http body (model)
|
396
|
+
post_body = nil
|
397
|
+
auth_names = ['Apikey']
|
398
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
399
|
+
:header_params => header_params,
|
400
|
+
:query_params => query_params,
|
401
|
+
:form_params => form_params,
|
402
|
+
:body => post_body,
|
403
|
+
:auth_names => auth_names,
|
404
|
+
:return_type => 'VehicleLicensePlateDetectionResult')
|
405
|
+
if @api_client.config.debugging
|
406
|
+
@api_client.config.logger.debug "API called: RecognizeApi#recognize_detect_vehicle_license_plates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
407
|
+
end
|
408
|
+
return data, status_code, headers
|
409
|
+
end
|
410
|
+
# Find the location of a symbol in an image
|
411
|
+
# Determine if an image contains a symbol, and if so, the location of that symbol in the image.
|
412
|
+
# @param input_image Image file to search through for the target image.
|
413
|
+
# @param target_image Image to find in the input image.
|
414
|
+
# @param [Hash] opts the optional parameters
|
415
|
+
# @return [FindSymbolResult]
|
416
|
+
def recognize_find_symbol(input_image, target_image, opts = {})
|
417
|
+
data, _status_code, _headers = recognize_find_symbol_with_http_info(input_image, target_image, opts)
|
418
|
+
data
|
419
|
+
end
|
420
|
+
|
421
|
+
# Find the location of a symbol in an image
|
422
|
+
# Determine if an image contains a symbol, and if so, the location of that symbol in the image.
|
423
|
+
# @param input_image Image file to search through for the target image.
|
424
|
+
# @param target_image Image to find in the input image.
|
425
|
+
# @param [Hash] opts the optional parameters
|
426
|
+
# @return [Array<(FindSymbolResult, Fixnum, Hash)>] FindSymbolResult data, response status code and response headers
|
427
|
+
def recognize_find_symbol_with_http_info(input_image, target_image, opts = {})
|
428
|
+
if @api_client.config.debugging
|
429
|
+
@api_client.config.logger.debug 'Calling API: RecognizeApi.recognize_find_symbol ...'
|
430
|
+
end
|
431
|
+
# verify the required parameter 'input_image' is set
|
432
|
+
if @api_client.config.client_side_validation && input_image.nil?
|
433
|
+
fail ArgumentError, "Missing the required parameter 'input_image' when calling RecognizeApi.recognize_find_symbol"
|
434
|
+
end
|
435
|
+
# verify the required parameter 'target_image' is set
|
436
|
+
if @api_client.config.client_side_validation && target_image.nil?
|
437
|
+
fail ArgumentError, "Missing the required parameter 'target_image' when calling RecognizeApi.recognize_find_symbol"
|
438
|
+
end
|
439
|
+
# resource path
|
440
|
+
local_var_path = '/image/recognize/find/symbol'
|
441
|
+
|
442
|
+
# query parameters
|
443
|
+
query_params = {}
|
444
|
+
|
445
|
+
# header parameters
|
446
|
+
header_params = {}
|
447
|
+
# HTTP header 'Accept' (if needed)
|
448
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
449
|
+
# HTTP header 'Content-Type'
|
450
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
451
|
+
|
452
|
+
# form parameters
|
453
|
+
form_params = {}
|
454
|
+
form_params['inputImage'] = input_image
|
455
|
+
form_params['targetImage'] = target_image
|
456
|
+
|
457
|
+
# http body (model)
|
458
|
+
post_body = nil
|
459
|
+
auth_names = ['Apikey']
|
460
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
461
|
+
:header_params => header_params,
|
462
|
+
:query_params => query_params,
|
463
|
+
:form_params => form_params,
|
464
|
+
:body => post_body,
|
465
|
+
:auth_names => auth_names,
|
466
|
+
:return_type => 'FindSymbolResult')
|
467
|
+
if @api_client.config.debugging
|
468
|
+
@api_client.config.logger.debug "API called: RecognizeApi#recognize_find_symbol\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
469
|
+
end
|
470
|
+
return data, status_code, headers
|
471
|
+
end
|
472
|
+
end
|
473
|
+
end
|