cloudmersive-image-recognition-api-client 1.4.2 → 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.
Files changed (138) hide show
  1. checksums.yaml +4 -4
  2. metadata +3 -139
  3. data/Gemfile +0 -7
  4. data/README.md +0 -174
  5. data/Rakefile +0 -8
  6. data/cloudmersive-image-recognition-api-client.gemspec +0 -45
  7. data/docs/AgeDetectionResult.md +0 -10
  8. data/docs/ArtisticApi.md +0 -66
  9. data/docs/ColorResult.md +0 -10
  10. data/docs/ConvertApi.md +0 -176
  11. data/docs/DetectedLicensePlate.md +0 -14
  12. data/docs/DetectedObject.md +0 -13
  13. data/docs/DominantColorResult.md +0 -9
  14. data/docs/DrawPolygonInstance.md +0 -11
  15. data/docs/DrawPolygonRequest.md +0 -10
  16. data/docs/DrawRectangleInstance.md +0 -14
  17. data/docs/DrawRectangleRequest.md +0 -10
  18. data/docs/DrawTextInstance.md +0 -15
  19. data/docs/DrawTextRequest.md +0 -10
  20. data/docs/EditApi.md +0 -539
  21. data/docs/Face.md +0 -11
  22. data/docs/FaceApi.md +0 -396
  23. data/docs/FaceCompareResponse.md +0 -11
  24. data/docs/FaceLocateResponse.md +0 -11
  25. data/docs/FaceLocateWithLandmarksResponse.md +0 -11
  26. data/docs/FaceMatch.md +0 -13
  27. data/docs/FacePoint.md +0 -9
  28. data/docs/FaceWithLandmarks.md +0 -20
  29. data/docs/FilterApi.md +0 -478
  30. data/docs/FindSymbolResult.md +0 -13
  31. data/docs/FineTextDetectionResult.md +0 -10
  32. data/docs/FineTextItem.md +0 -18
  33. data/docs/GenderDetectionResult.md +0 -10
  34. data/docs/ImageDescriptionResponse.md +0 -11
  35. data/docs/InfoApi.md +0 -63
  36. data/docs/NsfwApi.md +0 -63
  37. data/docs/NsfwResult.md +0 -10
  38. data/docs/ObjectDetectionResult.md +0 -10
  39. data/docs/PersonWithAge.md +0 -11
  40. data/docs/PersonWithGender.md +0 -10
  41. data/docs/PolygonPoint.md +0 -9
  42. data/docs/RecognitionOutcome.md +0 -9
  43. data/docs/RecognizeApi.md +0 -455
  44. data/docs/ResizeApi.md +0 -130
  45. data/docs/TextDetectionResult.md +0 -10
  46. data/docs/TextItem.md +0 -11
  47. data/docs/VehicleLicensePlateDetectionResult.md +0 -10
  48. data/git_push.sh +0 -55
  49. data/lib/cloudmersive-image-recognition-api-client.rb +0 -80
  50. data/lib/cloudmersive-image-recognition-api-client/api/artistic_api.rb +0 -85
  51. data/lib/cloudmersive-image-recognition-api-client/api/convert_api.rb +0 -197
  52. data/lib/cloudmersive-image-recognition-api-client/api/edit_api.rb +0 -597
  53. data/lib/cloudmersive-image-recognition-api-client/api/face_api.rb +0 -422
  54. data/lib/cloudmersive-image-recognition-api-client/api/filter_api.rb +0 -533
  55. data/lib/cloudmersive-image-recognition-api-client/api/info_api.rb +0 -79
  56. data/lib/cloudmersive-image-recognition-api-client/api/nsfw_api.rb +0 -79
  57. data/lib/cloudmersive-image-recognition-api-client/api/recognize_api.rb +0 -481
  58. data/lib/cloudmersive-image-recognition-api-client/api/resize_api.rb +0 -159
  59. data/lib/cloudmersive-image-recognition-api-client/api_client.rb +0 -389
  60. data/lib/cloudmersive-image-recognition-api-client/api_error.rb +0 -38
  61. data/lib/cloudmersive-image-recognition-api-client/configuration.rb +0 -209
  62. data/lib/cloudmersive-image-recognition-api-client/models/age_detection_result.rb +0 -211
  63. data/lib/cloudmersive-image-recognition-api-client/models/color_result.rb +0 -209
  64. data/lib/cloudmersive-image-recognition-api-client/models/detected_license_plate.rb +0 -249
  65. data/lib/cloudmersive-image-recognition-api-client/models/detected_object.rb +0 -239
  66. data/lib/cloudmersive-image-recognition-api-client/models/dominant_color_result.rb +0 -201
  67. data/lib/cloudmersive-image-recognition-api-client/models/draw_polygon_instance.rb +0 -221
  68. data/lib/cloudmersive-image-recognition-api-client/models/draw_polygon_request.rb +0 -227
  69. data/lib/cloudmersive-image-recognition-api-client/models/draw_rectangle_instance.rb +0 -249
  70. data/lib/cloudmersive-image-recognition-api-client/models/draw_rectangle_request.rb +0 -227
  71. data/lib/cloudmersive-image-recognition-api-client/models/draw_text_instance.rb +0 -259
  72. data/lib/cloudmersive-image-recognition-api-client/models/draw_text_request.rb +0 -227
  73. data/lib/cloudmersive-image-recognition-api-client/models/face.rb +0 -219
  74. data/lib/cloudmersive-image-recognition-api-client/models/face_compare_response.rb +0 -221
  75. data/lib/cloudmersive-image-recognition-api-client/models/face_locate_response.rb +0 -220
  76. data/lib/cloudmersive-image-recognition-api-client/models/face_locate_with_landmarks_response.rb +0 -221
  77. data/lib/cloudmersive-image-recognition-api-client/models/face_match.rb +0 -239
  78. data/lib/cloudmersive-image-recognition-api-client/models/face_point.rb +0 -199
  79. data/lib/cloudmersive-image-recognition-api-client/models/face_with_landmarks.rb +0 -327
  80. data/lib/cloudmersive-image-recognition-api-client/models/find_symbol_result.rb +0 -239
  81. data/lib/cloudmersive-image-recognition-api-client/models/fine_text_detection_result.rb +0 -211
  82. data/lib/cloudmersive-image-recognition-api-client/models/fine_text_item.rb +0 -289
  83. data/lib/cloudmersive-image-recognition-api-client/models/gender_detection_result.rb +0 -211
  84. data/lib/cloudmersive-image-recognition-api-client/models/image_description_response.rb +0 -219
  85. data/lib/cloudmersive-image-recognition-api-client/models/nsfw_result.rb +0 -209
  86. data/lib/cloudmersive-image-recognition-api-client/models/object_detection_result.rb +0 -211
  87. data/lib/cloudmersive-image-recognition-api-client/models/person_with_age.rb +0 -218
  88. data/lib/cloudmersive-image-recognition-api-client/models/person_with_gender.rb +0 -209
  89. data/lib/cloudmersive-image-recognition-api-client/models/polygon_point.rb +0 -199
  90. data/lib/cloudmersive-image-recognition-api-client/models/recognition_outcome.rb +0 -199
  91. data/lib/cloudmersive-image-recognition-api-client/models/text_detection_result.rb +0 -211
  92. data/lib/cloudmersive-image-recognition-api-client/models/text_item.rb +0 -219
  93. data/lib/cloudmersive-image-recognition-api-client/models/vehicle_license_plate_detection_result.rb +0 -211
  94. data/lib/cloudmersive-image-recognition-api-client/version.rb +0 -15
  95. data/spec/api/artistic_api_spec.rb +0 -48
  96. data/spec/api/convert_api_spec.rb +0 -72
  97. data/spec/api/edit_api_spec.rb +0 -155
  98. data/spec/api/face_api_spec.rb +0 -120
  99. data/spec/api/filter_api_spec.rb +0 -141
  100. data/spec/api/info_api_spec.rb +0 -47
  101. data/spec/api/nsfw_api_spec.rb +0 -47
  102. data/spec/api/recognize_api_spec.rb +0 -133
  103. data/spec/api/resize_api_spec.rb +0 -63
  104. data/spec/api_client_spec.rb +0 -226
  105. data/spec/configuration_spec.rb +0 -42
  106. data/spec/models/age_detection_result_spec.rb +0 -54
  107. data/spec/models/color_result_spec.rb +0 -54
  108. data/spec/models/detected_license_plate_spec.rb +0 -78
  109. data/spec/models/detected_object_spec.rb +0 -72
  110. data/spec/models/dominant_color_result_spec.rb +0 -48
  111. data/spec/models/draw_polygon_instance_spec.rb +0 -60
  112. data/spec/models/draw_polygon_request_spec.rb +0 -54
  113. data/spec/models/draw_rectangle_instance_spec.rb +0 -78
  114. data/spec/models/draw_rectangle_request_spec.rb +0 -54
  115. data/spec/models/draw_text_instance_spec.rb +0 -84
  116. data/spec/models/draw_text_request_spec.rb +0 -54
  117. data/spec/models/face_compare_response_spec.rb +0 -60
  118. data/spec/models/face_locate_response_spec.rb +0 -60
  119. data/spec/models/face_locate_with_landmarks_response_spec.rb +0 -60
  120. data/spec/models/face_match_spec.rb +0 -72
  121. data/spec/models/face_point_spec.rb +0 -48
  122. data/spec/models/face_spec.rb +0 -60
  123. data/spec/models/face_with_landmarks_spec.rb +0 -114
  124. data/spec/models/find_symbol_result_spec.rb +0 -72
  125. data/spec/models/fine_text_detection_result_spec.rb +0 -54
  126. data/spec/models/fine_text_item_spec.rb +0 -102
  127. data/spec/models/gender_detection_result_spec.rb +0 -54
  128. data/spec/models/image_description_response_spec.rb +0 -60
  129. data/spec/models/nsfw_result_spec.rb +0 -54
  130. data/spec/models/object_detection_result_spec.rb +0 -54
  131. data/spec/models/person_with_age_spec.rb +0 -60
  132. data/spec/models/person_with_gender_spec.rb +0 -54
  133. data/spec/models/polygon_point_spec.rb +0 -48
  134. data/spec/models/recognition_outcome_spec.rb +0 -48
  135. data/spec/models/text_detection_result_spec.rb +0 -54
  136. data/spec/models/text_item_spec.rb +0 -60
  137. data/spec/models/vehicle_license_plate_detection_result_spec.rb +0 -54
  138. data/spec/spec_helper.rb +0 -111
@@ -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 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
- end
79
- 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