cloudmersive-image-recognition-api-client 1.4.6 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- metadata +3 -145
- data/Gemfile +0 -7
- data/README.md +0 -184
- data/Rakefile +0 -8
- data/cloudmersive-image-recognition-api-client.gemspec +0 -45
- data/docs/AgeDetectionResult.md +0 -10
- data/docs/ArtisticApi.md +0 -66
- data/docs/ColorResult.md +0 -10
- data/docs/ConvertApi.md +0 -396
- data/docs/DetectedLicensePlate.md +0 -14
- data/docs/DetectedObject.md +0 -13
- data/docs/DominantColorResult.md +0 -9
- data/docs/DrawPolygonInstance.md +0 -11
- data/docs/DrawPolygonRequest.md +0 -10
- data/docs/DrawRectangleInstance.md +0 -14
- data/docs/DrawRectangleRequest.md +0 -10
- data/docs/DrawTextInstance.md +0 -15
- data/docs/DrawTextRequest.md +0 -10
- data/docs/EditApi.md +0 -704
- data/docs/Face.md +0 -11
- data/docs/FaceApi.md +0 -396
- data/docs/FaceCompareResponse.md +0 -11
- data/docs/FaceLocateResponse.md +0 -11
- data/docs/FaceLocateWithLandmarksResponse.md +0 -11
- data/docs/FaceMatch.md +0 -13
- data/docs/FacePoint.md +0 -9
- data/docs/FaceWithLandmarks.md +0 -20
- data/docs/FilterApi.md +0 -478
- data/docs/FindSymbolResult.md +0 -13
- data/docs/FineTextDetectionResult.md +0 -10
- data/docs/FineTextItem.md +0 -18
- data/docs/GenderDetectionResult.md +0 -10
- data/docs/ImageDescriptionResponse.md +0 -11
- data/docs/ImageMetadata.md +0 -17
- data/docs/ImageMetadataExifValue.md +0 -10
- data/docs/InfoApi.md +0 -118
- data/docs/NsfwApi.md +0 -63
- data/docs/NsfwResult.md +0 -10
- data/docs/ObjectDetectionResult.md +0 -10
- data/docs/PersonWithAge.md +0 -11
- data/docs/PersonWithGender.md +0 -10
- data/docs/PolygonPoint.md +0 -9
- data/docs/RecognitionOutcome.md +0 -9
- data/docs/RecognizeApi.md +0 -455
- data/docs/ResizeApi.md +0 -130
- data/docs/TextDetectionResult.md +0 -10
- data/docs/TextItem.md +0 -11
- data/docs/VehicleLicensePlateDetectionResult.md +0 -10
- data/git_push.sh +0 -55
- data/lib/cloudmersive-image-recognition-api-client.rb +0 -82
- data/lib/cloudmersive-image-recognition-api-client/api/artistic_api.rb +0 -85
- data/lib/cloudmersive-image-recognition-api-client/api/convert_api.rb +0 -421
- data/lib/cloudmersive-image-recognition-api-client/api/edit_api.rb +0 -765
- data/lib/cloudmersive-image-recognition-api-client/api/face_api.rb +0 -422
- data/lib/cloudmersive-image-recognition-api-client/api/filter_api.rb +0 -533
- data/lib/cloudmersive-image-recognition-api-client/api/info_api.rb +0 -135
- data/lib/cloudmersive-image-recognition-api-client/api/nsfw_api.rb +0 -79
- data/lib/cloudmersive-image-recognition-api-client/api/recognize_api.rb +0 -481
- data/lib/cloudmersive-image-recognition-api-client/api/resize_api.rb +0 -159
- data/lib/cloudmersive-image-recognition-api-client/api_client.rb +0 -389
- data/lib/cloudmersive-image-recognition-api-client/api_error.rb +0 -38
- data/lib/cloudmersive-image-recognition-api-client/configuration.rb +0 -209
- data/lib/cloudmersive-image-recognition-api-client/models/age_detection_result.rb +0 -211
- data/lib/cloudmersive-image-recognition-api-client/models/color_result.rb +0 -209
- data/lib/cloudmersive-image-recognition-api-client/models/detected_license_plate.rb +0 -249
- data/lib/cloudmersive-image-recognition-api-client/models/detected_object.rb +0 -239
- data/lib/cloudmersive-image-recognition-api-client/models/dominant_color_result.rb +0 -201
- data/lib/cloudmersive-image-recognition-api-client/models/draw_polygon_instance.rb +0 -221
- data/lib/cloudmersive-image-recognition-api-client/models/draw_polygon_request.rb +0 -227
- data/lib/cloudmersive-image-recognition-api-client/models/draw_rectangle_instance.rb +0 -249
- data/lib/cloudmersive-image-recognition-api-client/models/draw_rectangle_request.rb +0 -227
- data/lib/cloudmersive-image-recognition-api-client/models/draw_text_instance.rb +0 -259
- data/lib/cloudmersive-image-recognition-api-client/models/draw_text_request.rb +0 -227
- data/lib/cloudmersive-image-recognition-api-client/models/face.rb +0 -219
- data/lib/cloudmersive-image-recognition-api-client/models/face_compare_response.rb +0 -221
- data/lib/cloudmersive-image-recognition-api-client/models/face_locate_response.rb +0 -221
- data/lib/cloudmersive-image-recognition-api-client/models/face_locate_with_landmarks_response.rb +0 -221
- data/lib/cloudmersive-image-recognition-api-client/models/face_match.rb +0 -239
- data/lib/cloudmersive-image-recognition-api-client/models/face_point.rb +0 -199
- data/lib/cloudmersive-image-recognition-api-client/models/face_with_landmarks.rb +0 -327
- data/lib/cloudmersive-image-recognition-api-client/models/find_symbol_result.rb +0 -239
- data/lib/cloudmersive-image-recognition-api-client/models/fine_text_detection_result.rb +0 -211
- data/lib/cloudmersive-image-recognition-api-client/models/fine_text_item.rb +0 -289
- data/lib/cloudmersive-image-recognition-api-client/models/gender_detection_result.rb +0 -211
- data/lib/cloudmersive-image-recognition-api-client/models/image_description_response.rb +0 -219
- data/lib/cloudmersive-image-recognition-api-client/models/image_metadata.rb +0 -281
- data/lib/cloudmersive-image-recognition-api-client/models/image_metadata_exif_value.rb +0 -209
- data/lib/cloudmersive-image-recognition-api-client/models/nsfw_result.rb +0 -209
- data/lib/cloudmersive-image-recognition-api-client/models/object_detection_result.rb +0 -211
- data/lib/cloudmersive-image-recognition-api-client/models/person_with_age.rb +0 -218
- data/lib/cloudmersive-image-recognition-api-client/models/person_with_gender.rb +0 -209
- data/lib/cloudmersive-image-recognition-api-client/models/polygon_point.rb +0 -199
- data/lib/cloudmersive-image-recognition-api-client/models/recognition_outcome.rb +0 -199
- data/lib/cloudmersive-image-recognition-api-client/models/text_detection_result.rb +0 -211
- data/lib/cloudmersive-image-recognition-api-client/models/text_item.rb +0 -219
- data/lib/cloudmersive-image-recognition-api-client/models/vehicle_license_plate_detection_result.rb +0 -211
- data/lib/cloudmersive-image-recognition-api-client/version.rb +0 -15
- data/spec/api/artistic_api_spec.rb +0 -48
- data/spec/api/convert_api_spec.rb +0 -120
- data/spec/api/edit_api_spec.rb +0 -191
- data/spec/api/face_api_spec.rb +0 -120
- data/spec/api/filter_api_spec.rb +0 -141
- data/spec/api/info_api_spec.rb +0 -59
- data/spec/api/nsfw_api_spec.rb +0 -47
- data/spec/api/recognize_api_spec.rb +0 -133
- data/spec/api/resize_api_spec.rb +0 -63
- data/spec/api_client_spec.rb +0 -226
- data/spec/configuration_spec.rb +0 -42
- data/spec/models/age_detection_result_spec.rb +0 -54
- data/spec/models/color_result_spec.rb +0 -54
- data/spec/models/detected_license_plate_spec.rb +0 -78
- data/spec/models/detected_object_spec.rb +0 -72
- data/spec/models/dominant_color_result_spec.rb +0 -48
- data/spec/models/draw_polygon_instance_spec.rb +0 -60
- data/spec/models/draw_polygon_request_spec.rb +0 -54
- data/spec/models/draw_rectangle_instance_spec.rb +0 -78
- data/spec/models/draw_rectangle_request_spec.rb +0 -54
- data/spec/models/draw_text_instance_spec.rb +0 -84
- data/spec/models/draw_text_request_spec.rb +0 -54
- data/spec/models/face_compare_response_spec.rb +0 -60
- data/spec/models/face_locate_response_spec.rb +0 -60
- data/spec/models/face_locate_with_landmarks_response_spec.rb +0 -60
- data/spec/models/face_match_spec.rb +0 -72
- data/spec/models/face_point_spec.rb +0 -48
- data/spec/models/face_spec.rb +0 -60
- data/spec/models/face_with_landmarks_spec.rb +0 -114
- data/spec/models/find_symbol_result_spec.rb +0 -72
- data/spec/models/fine_text_detection_result_spec.rb +0 -54
- data/spec/models/fine_text_item_spec.rb +0 -102
- data/spec/models/gender_detection_result_spec.rb +0 -54
- data/spec/models/image_description_response_spec.rb +0 -60
- data/spec/models/image_metadata_exif_value_spec.rb +0 -54
- data/spec/models/image_metadata_spec.rb +0 -96
- data/spec/models/nsfw_result_spec.rb +0 -54
- data/spec/models/object_detection_result_spec.rb +0 -54
- data/spec/models/person_with_age_spec.rb +0 -60
- data/spec/models/person_with_gender_spec.rb +0 -54
- data/spec/models/polygon_point_spec.rb +0 -48
- data/spec/models/recognition_outcome_spec.rb +0 -48
- data/spec/models/text_detection_result_spec.rb +0 -54
- data/spec/models/text_item_spec.rb +0 -60
- data/spec/models/vehicle_license_plate_detection_result_spec.rb +0 -54
- data/spec/spec_helper.rb +0 -111
@@ -1,135 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
#imageapi
|
3
|
-
|
4
|
-
#Image Recognition and Processing APIs let you use Machine Learning to recognize and process images, and also perform useful image modification operations.
|
5
|
-
|
6
|
-
OpenAPI spec version: v1
|
7
|
-
|
8
|
-
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.3.1
|
10
|
-
|
11
|
-
=end
|
12
|
-
|
13
|
-
require "uri"
|
14
|
-
|
15
|
-
module CloudmersiveImageRecognitionApiClient
|
16
|
-
class InfoApi
|
17
|
-
attr_accessor :api_client
|
18
|
-
|
19
|
-
def initialize(api_client = ApiClient.default)
|
20
|
-
@api_client = api_client
|
21
|
-
end
|
22
|
-
|
23
|
-
# Returns the dominant colors of the image
|
24
|
-
# 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.
|
25
|
-
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
26
|
-
# @param [Hash] opts the optional parameters
|
27
|
-
# @return [DominantColorResult]
|
28
|
-
def info_get_dominant_color(image_file, opts = {})
|
29
|
-
data, _status_code, _headers = info_get_dominant_color_with_http_info(image_file, opts)
|
30
|
-
return data
|
31
|
-
end
|
32
|
-
|
33
|
-
# Returns the dominant colors of the image
|
34
|
-
# 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.
|
35
|
-
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
36
|
-
# @param [Hash] opts the optional parameters
|
37
|
-
# @return [Array<(DominantColorResult, Fixnum, Hash)>] DominantColorResult data, response status code and response headers
|
38
|
-
def info_get_dominant_color_with_http_info(image_file, opts = {})
|
39
|
-
if @api_client.config.debugging
|
40
|
-
@api_client.config.logger.debug "Calling API: InfoApi.info_get_dominant_color ..."
|
41
|
-
end
|
42
|
-
# verify the required parameter 'image_file' is set
|
43
|
-
if @api_client.config.client_side_validation && image_file.nil?
|
44
|
-
fail ArgumentError, "Missing the required parameter 'image_file' when calling InfoApi.info_get_dominant_color"
|
45
|
-
end
|
46
|
-
# resource path
|
47
|
-
local_var_path = "/image/get-info/dominant-color"
|
48
|
-
|
49
|
-
# query parameters
|
50
|
-
query_params = {}
|
51
|
-
|
52
|
-
# header parameters
|
53
|
-
header_params = {}
|
54
|
-
# HTTP header 'Accept' (if needed)
|
55
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
56
|
-
# HTTP header 'Content-Type'
|
57
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
58
|
-
|
59
|
-
# form parameters
|
60
|
-
form_params = {}
|
61
|
-
form_params["imageFile"] = image_file
|
62
|
-
|
63
|
-
# http body (model)
|
64
|
-
post_body = nil
|
65
|
-
auth_names = ['Apikey']
|
66
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
67
|
-
:header_params => header_params,
|
68
|
-
:query_params => query_params,
|
69
|
-
:form_params => form_params,
|
70
|
-
:body => post_body,
|
71
|
-
:auth_names => auth_names,
|
72
|
-
:return_type => 'DominantColorResult')
|
73
|
-
if @api_client.config.debugging
|
74
|
-
@api_client.config.logger.debug "API called: InfoApi#info_get_dominant_color\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
75
|
-
end
|
76
|
-
return data, status_code, headers
|
77
|
-
end
|
78
|
-
|
79
|
-
# Returns the image metadata including EXIF and resolution
|
80
|
-
# Returns the metadata information on the image, including file type, EXIF (if available), and resolution.
|
81
|
-
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
82
|
-
# @param [Hash] opts the optional parameters
|
83
|
-
# @return [ImageMetadata]
|
84
|
-
def info_get_metadata(image_file, opts = {})
|
85
|
-
data, _status_code, _headers = info_get_metadata_with_http_info(image_file, opts)
|
86
|
-
return data
|
87
|
-
end
|
88
|
-
|
89
|
-
# Returns the image metadata including EXIF and resolution
|
90
|
-
# Returns the metadata information on the image, including file type, EXIF (if available), and resolution.
|
91
|
-
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
92
|
-
# @param [Hash] opts the optional parameters
|
93
|
-
# @return [Array<(ImageMetadata, Fixnum, Hash)>] ImageMetadata data, response status code and response headers
|
94
|
-
def info_get_metadata_with_http_info(image_file, opts = {})
|
95
|
-
if @api_client.config.debugging
|
96
|
-
@api_client.config.logger.debug "Calling API: InfoApi.info_get_metadata ..."
|
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 InfoApi.info_get_metadata"
|
101
|
-
end
|
102
|
-
# resource path
|
103
|
-
local_var_path = "/image/get-info/metadata"
|
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
|
-
|
115
|
-
# form parameters
|
116
|
-
form_params = {}
|
117
|
-
form_params["imageFile"] = image_file
|
118
|
-
|
119
|
-
# http body (model)
|
120
|
-
post_body = nil
|
121
|
-
auth_names = ['Apikey']
|
122
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
123
|
-
:header_params => header_params,
|
124
|
-
:query_params => query_params,
|
125
|
-
:form_params => form_params,
|
126
|
-
:body => post_body,
|
127
|
-
:auth_names => auth_names,
|
128
|
-
:return_type => 'ImageMetadata')
|
129
|
-
if @api_client.config.debugging
|
130
|
-
@api_client.config.logger.debug "API called: InfoApi#info_get_metadata\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
131
|
-
end
|
132
|
-
return data, status_code, headers
|
133
|
-
end
|
134
|
-
end
|
135
|
-
end
|
@@ -1,79 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
#imageapi
|
3
|
-
|
4
|
-
#Image Recognition and Processing APIs let you use Machine Learning to recognize and process images, and also perform useful image modification operations.
|
5
|
-
|
6
|
-
OpenAPI spec version: v1
|
7
|
-
|
8
|
-
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.3.1
|
10
|
-
|
11
|
-
=end
|
12
|
-
|
13
|
-
require "uri"
|
14
|
-
|
15
|
-
module CloudmersiveImageRecognitionApiClient
|
16
|
-
class NsfwApi
|
17
|
-
attr_accessor :api_client
|
18
|
-
|
19
|
-
def initialize(api_client = ApiClient.default)
|
20
|
-
@api_client = api_client
|
21
|
-
end
|
22
|
-
|
23
|
-
# Not safe for work NSFW racy content classification
|
24
|
-
# Classify an image into Not Safe For Work (NSFW)/Porn/Racy content and Safe Content.
|
25
|
-
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
26
|
-
# @param [Hash] opts the optional parameters
|
27
|
-
# @return [NsfwResult]
|
28
|
-
def nsfw_classify(image_file, opts = {})
|
29
|
-
data, _status_code, _headers = nsfw_classify_with_http_info(image_file, opts)
|
30
|
-
return data
|
31
|
-
end
|
32
|
-
|
33
|
-
# Not safe for work NSFW racy content classification
|
34
|
-
# Classify an image into Not Safe For Work (NSFW)/Porn/Racy content and Safe Content.
|
35
|
-
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
36
|
-
# @param [Hash] opts the optional parameters
|
37
|
-
# @return [Array<(NsfwResult, Fixnum, Hash)>] NsfwResult data, response status code and response headers
|
38
|
-
def nsfw_classify_with_http_info(image_file, opts = {})
|
39
|
-
if @api_client.config.debugging
|
40
|
-
@api_client.config.logger.debug "Calling API: NsfwApi.nsfw_classify ..."
|
41
|
-
end
|
42
|
-
# verify the required parameter 'image_file' is set
|
43
|
-
if @api_client.config.client_side_validation && image_file.nil?
|
44
|
-
fail ArgumentError, "Missing the required parameter 'image_file' when calling NsfwApi.nsfw_classify"
|
45
|
-
end
|
46
|
-
# resource path
|
47
|
-
local_var_path = "/image/nsfw/classify"
|
48
|
-
|
49
|
-
# query parameters
|
50
|
-
query_params = {}
|
51
|
-
|
52
|
-
# header parameters
|
53
|
-
header_params = {}
|
54
|
-
# HTTP header 'Accept' (if needed)
|
55
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
56
|
-
# HTTP header 'Content-Type'
|
57
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
58
|
-
|
59
|
-
# form parameters
|
60
|
-
form_params = {}
|
61
|
-
form_params["imageFile"] = image_file
|
62
|
-
|
63
|
-
# http body (model)
|
64
|
-
post_body = nil
|
65
|
-
auth_names = ['Apikey']
|
66
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
67
|
-
:header_params => header_params,
|
68
|
-
:query_params => query_params,
|
69
|
-
:form_params => form_params,
|
70
|
-
:body => post_body,
|
71
|
-
:auth_names => auth_names,
|
72
|
-
:return_type => 'NsfwResult')
|
73
|
-
if @api_client.config.debugging
|
74
|
-
@api_client.config.logger.debug "API called: NsfwApi#nsfw_classify\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
75
|
-
end
|
76
|
-
return data, status_code, headers
|
77
|
-
end
|
78
|
-
end
|
79
|
-
end
|
@@ -1,481 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
#imageapi
|
3
|
-
|
4
|
-
#Image Recognition and Processing APIs let you use Machine Learning to recognize and process images, and also perform useful image modification operations.
|
5
|
-
|
6
|
-
OpenAPI spec version: v1
|
7
|
-
|
8
|
-
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.3.1
|
10
|
-
|
11
|
-
=end
|
12
|
-
|
13
|
-
require "uri"
|
14
|
-
|
15
|
-
module CloudmersiveImageRecognitionApiClient
|
16
|
-
class RecognizeApi
|
17
|
-
attr_accessor :api_client
|
18
|
-
|
19
|
-
def initialize(api_client = ApiClient.default)
|
20
|
-
@api_client = api_client
|
21
|
-
end
|
22
|
-
|
23
|
-
# Describe an image in natural language
|
24
|
-
# Generate an English language text description of the image as a sentence.
|
25
|
-
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
26
|
-
# @param [Hash] opts the optional parameters
|
27
|
-
# @return [ImageDescriptionResponse]
|
28
|
-
def recognize_describe(image_file, opts = {})
|
29
|
-
data, _status_code, _headers = recognize_describe_with_http_info(image_file, opts)
|
30
|
-
return data
|
31
|
-
end
|
32
|
-
|
33
|
-
# Describe an image in natural language
|
34
|
-
# Generate an English language text description of the image as a sentence.
|
35
|
-
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
36
|
-
# @param [Hash] opts the optional parameters
|
37
|
-
# @return [Array<(ImageDescriptionResponse, Fixnum, Hash)>] ImageDescriptionResponse data, response status code and response headers
|
38
|
-
def recognize_describe_with_http_info(image_file, opts = {})
|
39
|
-
if @api_client.config.debugging
|
40
|
-
@api_client.config.logger.debug "Calling API: RecognizeApi.recognize_describe ..."
|
41
|
-
end
|
42
|
-
# verify the required parameter 'image_file' is set
|
43
|
-
if @api_client.config.client_side_validation && image_file.nil?
|
44
|
-
fail ArgumentError, "Missing the required parameter 'image_file' when calling RecognizeApi.recognize_describe"
|
45
|
-
end
|
46
|
-
# resource path
|
47
|
-
local_var_path = "/image/recognize/describe"
|
48
|
-
|
49
|
-
# query parameters
|
50
|
-
query_params = {}
|
51
|
-
|
52
|
-
# header parameters
|
53
|
-
header_params = {}
|
54
|
-
# HTTP header 'Accept' (if needed)
|
55
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
56
|
-
# HTTP header 'Content-Type'
|
57
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
58
|
-
|
59
|
-
# form parameters
|
60
|
-
form_params = {}
|
61
|
-
form_params["imageFile"] = image_file
|
62
|
-
|
63
|
-
# http body (model)
|
64
|
-
post_body = nil
|
65
|
-
auth_names = ['Apikey']
|
66
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
67
|
-
:header_params => header_params,
|
68
|
-
:query_params => query_params,
|
69
|
-
:form_params => form_params,
|
70
|
-
:body => post_body,
|
71
|
-
:auth_names => auth_names,
|
72
|
-
:return_type => 'ImageDescriptionResponse')
|
73
|
-
if @api_client.config.debugging
|
74
|
-
@api_client.config.logger.debug "API called: RecognizeApi#recognize_describe\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
75
|
-
end
|
76
|
-
return data, status_code, headers
|
77
|
-
end
|
78
|
-
|
79
|
-
# Detect and unskew a photo of a document
|
80
|
-
# 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.
|
81
|
-
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
82
|
-
# @param [Hash] opts the optional parameters
|
83
|
-
# @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).
|
84
|
-
# @return [String]
|
85
|
-
def recognize_detect_and_unskew_document(image_file, opts = {})
|
86
|
-
data, _status_code, _headers = recognize_detect_and_unskew_document_with_http_info(image_file, opts)
|
87
|
-
return data
|
88
|
-
end
|
89
|
-
|
90
|
-
# Detect and unskew a photo of a document
|
91
|
-
# 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.
|
92
|
-
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
93
|
-
# @param [Hash] opts the optional parameters
|
94
|
-
# @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).
|
95
|
-
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
96
|
-
def recognize_detect_and_unskew_document_with_http_info(image_file, opts = {})
|
97
|
-
if @api_client.config.debugging
|
98
|
-
@api_client.config.logger.debug "Calling API: RecognizeApi.recognize_detect_and_unskew_document ..."
|
99
|
-
end
|
100
|
-
# verify the required parameter 'image_file' is set
|
101
|
-
if @api_client.config.client_side_validation && image_file.nil?
|
102
|
-
fail ArgumentError, "Missing the required parameter 'image_file' when calling RecognizeApi.recognize_detect_and_unskew_document"
|
103
|
-
end
|
104
|
-
# resource path
|
105
|
-
local_var_path = "/image/recognize/detect-document/unskew"
|
106
|
-
|
107
|
-
# query parameters
|
108
|
-
query_params = {}
|
109
|
-
|
110
|
-
# header parameters
|
111
|
-
header_params = {}
|
112
|
-
# HTTP header 'Accept' (if needed)
|
113
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
114
|
-
# HTTP header 'Content-Type'
|
115
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
116
|
-
header_params[:'PostProcessingEffect'] = opts[:'post_processing_effect'] if !opts[:'post_processing_effect'].nil?
|
117
|
-
|
118
|
-
# form parameters
|
119
|
-
form_params = {}
|
120
|
-
form_params["imageFile"] = image_file
|
121
|
-
|
122
|
-
# http body (model)
|
123
|
-
post_body = nil
|
124
|
-
auth_names = ['Apikey']
|
125
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
126
|
-
:header_params => header_params,
|
127
|
-
:query_params => query_params,
|
128
|
-
:form_params => form_params,
|
129
|
-
:body => post_body,
|
130
|
-
:auth_names => auth_names,
|
131
|
-
:return_type => 'String')
|
132
|
-
if @api_client.config.debugging
|
133
|
-
@api_client.config.logger.debug "API called: RecognizeApi#recognize_detect_and_unskew_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
134
|
-
end
|
135
|
-
return data, status_code, headers
|
136
|
-
end
|
137
|
-
|
138
|
-
# Detect objects including types and locations in an image
|
139
|
-
# 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.
|
140
|
-
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
141
|
-
# @param [Hash] opts the optional parameters
|
142
|
-
# @return [ObjectDetectionResult]
|
143
|
-
def recognize_detect_objects(image_file, opts = {})
|
144
|
-
data, _status_code, _headers = recognize_detect_objects_with_http_info(image_file, opts)
|
145
|
-
return data
|
146
|
-
end
|
147
|
-
|
148
|
-
# Detect objects including types and locations in an image
|
149
|
-
# 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.
|
150
|
-
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
151
|
-
# @param [Hash] opts the optional parameters
|
152
|
-
# @return [Array<(ObjectDetectionResult, Fixnum, Hash)>] ObjectDetectionResult data, response status code and response headers
|
153
|
-
def recognize_detect_objects_with_http_info(image_file, opts = {})
|
154
|
-
if @api_client.config.debugging
|
155
|
-
@api_client.config.logger.debug "Calling API: RecognizeApi.recognize_detect_objects ..."
|
156
|
-
end
|
157
|
-
# verify the required parameter 'image_file' is set
|
158
|
-
if @api_client.config.client_side_validation && image_file.nil?
|
159
|
-
fail ArgumentError, "Missing the required parameter 'image_file' when calling RecognizeApi.recognize_detect_objects"
|
160
|
-
end
|
161
|
-
# resource path
|
162
|
-
local_var_path = "/image/recognize/detect-objects"
|
163
|
-
|
164
|
-
# query parameters
|
165
|
-
query_params = {}
|
166
|
-
|
167
|
-
# header parameters
|
168
|
-
header_params = {}
|
169
|
-
# HTTP header 'Accept' (if needed)
|
170
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
171
|
-
# HTTP header 'Content-Type'
|
172
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
173
|
-
|
174
|
-
# form parameters
|
175
|
-
form_params = {}
|
176
|
-
form_params["imageFile"] = image_file
|
177
|
-
|
178
|
-
# http body (model)
|
179
|
-
post_body = nil
|
180
|
-
auth_names = ['Apikey']
|
181
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
182
|
-
:header_params => header_params,
|
183
|
-
:query_params => query_params,
|
184
|
-
:form_params => form_params,
|
185
|
-
:body => post_body,
|
186
|
-
:auth_names => auth_names,
|
187
|
-
:return_type => 'ObjectDetectionResult')
|
188
|
-
if @api_client.config.debugging
|
189
|
-
@api_client.config.logger.debug "API called: RecognizeApi#recognize_detect_objects\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
190
|
-
end
|
191
|
-
return data, status_code, headers
|
192
|
-
end
|
193
|
-
|
194
|
-
# Detect people including locations in an image
|
195
|
-
# 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.
|
196
|
-
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
197
|
-
# @param [Hash] opts the optional parameters
|
198
|
-
# @return [ObjectDetectionResult]
|
199
|
-
def recognize_detect_people(image_file, opts = {})
|
200
|
-
data, _status_code, _headers = recognize_detect_people_with_http_info(image_file, opts)
|
201
|
-
return data
|
202
|
-
end
|
203
|
-
|
204
|
-
# Detect people including locations in an image
|
205
|
-
# 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.
|
206
|
-
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
207
|
-
# @param [Hash] opts the optional parameters
|
208
|
-
# @return [Array<(ObjectDetectionResult, Fixnum, Hash)>] ObjectDetectionResult data, response status code and response headers
|
209
|
-
def recognize_detect_people_with_http_info(image_file, opts = {})
|
210
|
-
if @api_client.config.debugging
|
211
|
-
@api_client.config.logger.debug "Calling API: RecognizeApi.recognize_detect_people ..."
|
212
|
-
end
|
213
|
-
# verify the required parameter 'image_file' is set
|
214
|
-
if @api_client.config.client_side_validation && image_file.nil?
|
215
|
-
fail ArgumentError, "Missing the required parameter 'image_file' when calling RecognizeApi.recognize_detect_people"
|
216
|
-
end
|
217
|
-
# resource path
|
218
|
-
local_var_path = "/image/recognize/detect-people"
|
219
|
-
|
220
|
-
# query parameters
|
221
|
-
query_params = {}
|
222
|
-
|
223
|
-
# header parameters
|
224
|
-
header_params = {}
|
225
|
-
# HTTP header 'Accept' (if needed)
|
226
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
227
|
-
# HTTP header 'Content-Type'
|
228
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
229
|
-
|
230
|
-
# form parameters
|
231
|
-
form_params = {}
|
232
|
-
form_params["imageFile"] = image_file
|
233
|
-
|
234
|
-
# http body (model)
|
235
|
-
post_body = nil
|
236
|
-
auth_names = ['Apikey']
|
237
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
238
|
-
:header_params => header_params,
|
239
|
-
:query_params => query_params,
|
240
|
-
:form_params => form_params,
|
241
|
-
:body => post_body,
|
242
|
-
:auth_names => auth_names,
|
243
|
-
:return_type => 'ObjectDetectionResult')
|
244
|
-
if @api_client.config.debugging
|
245
|
-
@api_client.config.logger.debug "API called: RecognizeApi#recognize_detect_people\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
246
|
-
end
|
247
|
-
return data, status_code, headers
|
248
|
-
end
|
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 image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
309
|
-
# @param [Hash] opts the optional parameters
|
310
|
-
# @return [TextDetectionResult]
|
311
|
-
def recognize_detect_text_large(image_file, opts = {})
|
312
|
-
data, _status_code, _headers = recognize_detect_text_large_with_http_info(image_file, opts)
|
313
|
-
return data
|
314
|
-
end
|
315
|
-
|
316
|
-
# Detect large text in a photo
|
317
|
-
# 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.
|
318
|
-
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
319
|
-
# @param [Hash] opts the optional parameters
|
320
|
-
# @return [Array<(TextDetectionResult, Fixnum, Hash)>] TextDetectionResult data, response status code and response headers
|
321
|
-
def recognize_detect_text_large_with_http_info(image_file, opts = {})
|
322
|
-
if @api_client.config.debugging
|
323
|
-
@api_client.config.logger.debug "Calling API: RecognizeApi.recognize_detect_text_large ..."
|
324
|
-
end
|
325
|
-
# verify the required parameter 'image_file' is set
|
326
|
-
if @api_client.config.client_side_validation && image_file.nil?
|
327
|
-
fail ArgumentError, "Missing the required parameter 'image_file' when calling RecognizeApi.recognize_detect_text_large"
|
328
|
-
end
|
329
|
-
# resource path
|
330
|
-
local_var_path = "/image/recognize/detect-text/large"
|
331
|
-
|
332
|
-
# query parameters
|
333
|
-
query_params = {}
|
334
|
-
|
335
|
-
# header parameters
|
336
|
-
header_params = {}
|
337
|
-
# HTTP header 'Accept' (if needed)
|
338
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
339
|
-
# HTTP header 'Content-Type'
|
340
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
341
|
-
|
342
|
-
# form parameters
|
343
|
-
form_params = {}
|
344
|
-
form_params["imageFile"] = image_file
|
345
|
-
|
346
|
-
# http body (model)
|
347
|
-
post_body = nil
|
348
|
-
auth_names = ['Apikey']
|
349
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
350
|
-
:header_params => header_params,
|
351
|
-
:query_params => query_params,
|
352
|
-
:form_params => form_params,
|
353
|
-
:body => post_body,
|
354
|
-
:auth_names => auth_names,
|
355
|
-
:return_type => 'TextDetectionResult')
|
356
|
-
if @api_client.config.debugging
|
357
|
-
@api_client.config.logger.debug "API called: RecognizeApi#recognize_detect_text_large\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
358
|
-
end
|
359
|
-
return data, status_code, headers
|
360
|
-
end
|
361
|
-
|
362
|
-
# Detect vehicle license plates in an image
|
363
|
-
# 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.
|
364
|
-
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
365
|
-
# @param [Hash] opts the optional parameters
|
366
|
-
# @return [VehicleLicensePlateDetectionResult]
|
367
|
-
def recognize_detect_vehicle_license_plates(image_file, opts = {})
|
368
|
-
data, _status_code, _headers = recognize_detect_vehicle_license_plates_with_http_info(image_file, opts)
|
369
|
-
return data
|
370
|
-
end
|
371
|
-
|
372
|
-
# Detect vehicle license plates in an image
|
373
|
-
# 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.
|
374
|
-
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
375
|
-
# @param [Hash] opts the optional parameters
|
376
|
-
# @return [Array<(VehicleLicensePlateDetectionResult, Fixnum, Hash)>] VehicleLicensePlateDetectionResult data, response status code and response headers
|
377
|
-
def recognize_detect_vehicle_license_plates_with_http_info(image_file, opts = {})
|
378
|
-
if @api_client.config.debugging
|
379
|
-
@api_client.config.logger.debug "Calling API: RecognizeApi.recognize_detect_vehicle_license_plates ..."
|
380
|
-
end
|
381
|
-
# verify the required parameter 'image_file' is set
|
382
|
-
if @api_client.config.client_side_validation && image_file.nil?
|
383
|
-
fail ArgumentError, "Missing the required parameter 'image_file' when calling RecognizeApi.recognize_detect_vehicle_license_plates"
|
384
|
-
end
|
385
|
-
# resource path
|
386
|
-
local_var_path = "/image/recognize/detect-vehicle-license-plates"
|
387
|
-
|
388
|
-
# query parameters
|
389
|
-
query_params = {}
|
390
|
-
|
391
|
-
# header parameters
|
392
|
-
header_params = {}
|
393
|
-
# HTTP header 'Accept' (if needed)
|
394
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
395
|
-
# HTTP header 'Content-Type'
|
396
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
397
|
-
|
398
|
-
# form parameters
|
399
|
-
form_params = {}
|
400
|
-
form_params["imageFile"] = image_file
|
401
|
-
|
402
|
-
# http body (model)
|
403
|
-
post_body = nil
|
404
|
-
auth_names = ['Apikey']
|
405
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
406
|
-
:header_params => header_params,
|
407
|
-
:query_params => query_params,
|
408
|
-
:form_params => form_params,
|
409
|
-
:body => post_body,
|
410
|
-
:auth_names => auth_names,
|
411
|
-
:return_type => 'VehicleLicensePlateDetectionResult')
|
412
|
-
if @api_client.config.debugging
|
413
|
-
@api_client.config.logger.debug "API called: RecognizeApi#recognize_detect_vehicle_license_plates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
414
|
-
end
|
415
|
-
return data, status_code, headers
|
416
|
-
end
|
417
|
-
|
418
|
-
# Find the location of a symbol in an image
|
419
|
-
# Determine if an image contains a symbol, and if so, the location of that symbol in the image.
|
420
|
-
# @param input_image Image file to search through for the target image.
|
421
|
-
# @param target_image Image to find in the input image.
|
422
|
-
# @param [Hash] opts the optional parameters
|
423
|
-
# @return [FindSymbolResult]
|
424
|
-
def recognize_find_symbol(input_image, target_image, opts = {})
|
425
|
-
data, _status_code, _headers = recognize_find_symbol_with_http_info(input_image, target_image, opts)
|
426
|
-
return data
|
427
|
-
end
|
428
|
-
|
429
|
-
# Find the location of a symbol in an image
|
430
|
-
# Determine if an image contains a symbol, and if so, the location of that symbol in the image.
|
431
|
-
# @param input_image Image file to search through for the target image.
|
432
|
-
# @param target_image Image to find in the input image.
|
433
|
-
# @param [Hash] opts the optional parameters
|
434
|
-
# @return [Array<(FindSymbolResult, Fixnum, Hash)>] FindSymbolResult data, response status code and response headers
|
435
|
-
def recognize_find_symbol_with_http_info(input_image, target_image, opts = {})
|
436
|
-
if @api_client.config.debugging
|
437
|
-
@api_client.config.logger.debug "Calling API: RecognizeApi.recognize_find_symbol ..."
|
438
|
-
end
|
439
|
-
# verify the required parameter 'input_image' is set
|
440
|
-
if @api_client.config.client_side_validation && input_image.nil?
|
441
|
-
fail ArgumentError, "Missing the required parameter 'input_image' when calling RecognizeApi.recognize_find_symbol"
|
442
|
-
end
|
443
|
-
# verify the required parameter 'target_image' is set
|
444
|
-
if @api_client.config.client_side_validation && target_image.nil?
|
445
|
-
fail ArgumentError, "Missing the required parameter 'target_image' when calling RecognizeApi.recognize_find_symbol"
|
446
|
-
end
|
447
|
-
# resource path
|
448
|
-
local_var_path = "/image/recognize/find/symbol"
|
449
|
-
|
450
|
-
# query parameters
|
451
|
-
query_params = {}
|
452
|
-
|
453
|
-
# header parameters
|
454
|
-
header_params = {}
|
455
|
-
# HTTP header 'Accept' (if needed)
|
456
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
457
|
-
# HTTP header 'Content-Type'
|
458
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
459
|
-
|
460
|
-
# form parameters
|
461
|
-
form_params = {}
|
462
|
-
form_params["inputImage"] = input_image
|
463
|
-
form_params["targetImage"] = target_image
|
464
|
-
|
465
|
-
# http body (model)
|
466
|
-
post_body = nil
|
467
|
-
auth_names = ['Apikey']
|
468
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
469
|
-
:header_params => header_params,
|
470
|
-
:query_params => query_params,
|
471
|
-
:form_params => form_params,
|
472
|
-
:body => post_body,
|
473
|
-
:auth_names => auth_names,
|
474
|
-
:return_type => 'FindSymbolResult')
|
475
|
-
if @api_client.config.debugging
|
476
|
-
@api_client.config.logger.debug "API called: RecognizeApi#recognize_find_symbol\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
477
|
-
end
|
478
|
-
return data, status_code, headers
|
479
|
-
end
|
480
|
-
end
|
481
|
-
end
|