共用方式為


ComputerVision Interface

public interface ComputerVision

An instance of this class provides access to all the operations defined in ComputerVision.

Method Summary

Modifier and Type Method and Description
ComputerVisionAnalyzeImageDefinitionStages.WithUrl analyzeImage()

This operation extracts a rich set of visual features based on the image content. Two input methods are supported (1) Uploading an image or (2) specifying an image URL. Within your request, there is an optional parameter to allow you to choose which features to return. By default, image categories are returned in the response. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong.

ImageAnalysis analyzeImage(String url, AnalyzeImageOptionalParameter analyzeImageOptionalParameter)

This operation extracts a rich set of visual features based on the image content. Two input methods are supported (1) Uploading an image or (2) specifying an image URL. Within your request, there is an optional parameter to allow you to choose which features to return. By default, image categories are returned in the response. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong.

Observable<ImageAnalysis> analyzeImageAsync(String url, AnalyzeImageOptionalParameter analyzeImageOptionalParameter)

This operation extracts a rich set of visual features based on the image content. Two input methods are supported (1) Uploading an image or (2) specifying an image URL. Within your request, there is an optional parameter to allow you to choose which features to return. By default, image categories are returned in the response. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong.

ComputerVisionAnalyzeImageByDomainDefinitionStages.WithModel analyzeImageByDomain()

This operation recognizes content within an image by applying a domain-specific model. The list of domain-specific models that are supported by the Computer Vision API can be retrieved using the /models GET request. Currently, the API provides following domain-specific models: celebrities, landmarks. Two input methods are supported (1) Uploading an image or (2) specifying an image URL. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong.

DomainModelResults analyzeImageByDomain(String model, String url, AnalyzeImageByDomainOptionalParameter analyzeImageByDomainOptionalParameter)

This operation recognizes content within an image by applying a domain-specific model. The list of domain-specific models that are supported by the Computer Vision API can be retrieved using the /models GET request. Currently, the API provides following domain-specific models: celebrities, landmarks. Two input methods are supported (1) Uploading an image or (2) specifying an image URL. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong.

Observable<DomainModelResults> analyzeImageByDomainAsync(String model, String url, AnalyzeImageByDomainOptionalParameter analyzeImageByDomainOptionalParameter)

This operation recognizes content within an image by applying a domain-specific model. The list of domain-specific models that are supported by the Computer Vision API can be retrieved using the /models GET request. Currently, the API provides following domain-specific models: celebrities, landmarks. Two input methods are supported (1) Uploading an image or (2) specifying an image URL. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong.

ComputerVisionAnalyzeImageByDomainInStreamDefinitionStages.WithModel analyzeImageByDomainInStream()

This operation recognizes content within an image by applying a domain-specific model. The list of domain-specific models that are supported by the Computer Vision API can be retrieved using the /models GET request. Currently, the API provides following domain-specific models: celebrities, landmarks. Two input methods are supported (1) Uploading an image or (2) specifying an image URL. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong.

DomainModelResults analyzeImageByDomainInStream(String model, byte[] image, AnalyzeImageByDomainInStreamOptionalParameter analyzeImageByDomainInStreamOptionalParameter)

This operation recognizes content within an image by applying a domain-specific model. The list of domain-specific models that are supported by the Computer Vision API can be retrieved using the /models GET request. Currently, the API provides following domain-specific models: celebrities, landmarks. Two input methods are supported (1) Uploading an image or (2) specifying an image URL. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong.

Observable<DomainModelResults> analyzeImageByDomainInStreamAsync(String model, byte[] image, AnalyzeImageByDomainInStreamOptionalParameter analyzeImageByDomainInStreamOptionalParameter)

This operation recognizes content within an image by applying a domain-specific model. The list of domain-specific models that are supported by the Computer Vision API can be retrieved using the /models GET request. Currently, the API provides following domain-specific models: celebrities, landmarks. Two input methods are supported (1) Uploading an image or (2) specifying an image URL. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong.

ComputerVisionAnalyzeImageInStreamDefinitionStages.WithImage analyzeImageInStream()

This operation extracts a rich set of visual features based on the image content. Two input methods are supported (1) Uploading an image or (2) specifying an image URL. Within your request, there is an optional parameter to allow you to choose which features to return. By default, image categories are returned in the response. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong.

ImageAnalysis analyzeImageInStream(byte[] image, AnalyzeImageInStreamOptionalParameter analyzeImageInStreamOptionalParameter)

This operation extracts a rich set of visual features based on the image content. Two input methods are supported (1) Uploading an image or (2) specifying an image URL. Within your request, there is an optional parameter to allow you to choose which features to return. By default, image categories are returned in the response. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong.

Observable<ImageAnalysis> analyzeImageInStreamAsync(byte[] image, AnalyzeImageInStreamOptionalParameter analyzeImageInStreamOptionalParameter)

This operation extracts a rich set of visual features based on the image content. Two input methods are supported (1) Uploading an image or (2) specifying an image URL. Within your request, there is an optional parameter to allow you to choose which features to return. By default, image categories are returned in the response. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong.

ComputerVisionDescribeImageDefinitionStages.WithUrl describeImage()

This operation generates a description of an image in human readable language with complete sentences. The description is based on a collection of content tags, which are also returned by the operation. More than one description can be generated for each image. Descriptions are ordered by their confidence score. Descriptions may include results from celebrity and landmark domain models, if applicable. Two input methods are supported (1) Uploading an image or (2) specifying an image URL. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong.

ImageDescription describeImage(String url, DescribeImageOptionalParameter describeImageOptionalParameter)

This operation generates a description of an image in human readable language with complete sentences. The description is based on a collection of content tags, which are also returned by the operation. More than one description can be generated for each image. Descriptions are ordered by their confidence score. Descriptions may include results from celebrity and landmark domain models, if applicable. Two input methods are supported (1) Uploading an image or (2) specifying an image URL. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong.

Observable<ImageDescription> describeImageAsync(String url, DescribeImageOptionalParameter describeImageOptionalParameter)

This operation generates a description of an image in human readable language with complete sentences. The description is based on a collection of content tags, which are also returned by the operation. More than one description can be generated for each image. Descriptions are ordered by their confidence score. Descriptions may include results from celebrity and landmark domain models, if applicable. Two input methods are supported (1) Uploading an image or (2) specifying an image URL. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong.

ComputerVisionDescribeImageInStreamDefinitionStages.WithImage describeImageInStream()

This operation generates a description of an image in human readable language with complete sentences. The description is based on a collection of content tags, which are also returned by the operation. More than one description can be generated for each image. Descriptions are ordered by their confidence score. Descriptions may include results from celebrity and landmark domain models, if applicable. Two input methods are supported (1) Uploading an image or (2) specifying an image URL. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong.

ImageDescription describeImageInStream(byte[] image, DescribeImageInStreamOptionalParameter describeImageInStreamOptionalParameter)

This operation generates a description of an image in human readable language with complete sentences. The description is based on a collection of content tags, which are also returned by the operation. More than one description can be generated for each image. Descriptions are ordered by their confidence score. Descriptions may include results from celebrity and landmark domain models, if applicable. Two input methods are supported (1) Uploading an image or (2) specifying an image URL. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong.

Observable<ImageDescription> describeImageInStreamAsync(byte[] image, DescribeImageInStreamOptionalParameter describeImageInStreamOptionalParameter)

This operation generates a description of an image in human readable language with complete sentences. The description is based on a collection of content tags, which are also returned by the operation. More than one description can be generated for each image. Descriptions are ordered by their confidence score. Descriptions may include results from celebrity and landmark domain models, if applicable. Two input methods are supported (1) Uploading an image or (2) specifying an image URL. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong.

ComputerVisionDetectObjectsDefinitionStages.WithUrl detectObjects()

Performs object detection on the specified image. Two input methods are supported (1) Uploading an image or (2) specifying an image URL. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong.

DetectResult detectObjects(String url, DetectObjectsOptionalParameter detectObjectsOptionalParameter)

Performs object detection on the specified image. Two input methods are supported (1) Uploading an image or (2) specifying an image URL. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong.

Observable<DetectResult> detectObjectsAsync(String url, DetectObjectsOptionalParameter detectObjectsOptionalParameter)

Performs object detection on the specified image. Two input methods are supported (1) Uploading an image or (2) specifying an image URL. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong.

ComputerVisionDetectObjectsInStreamDefinitionStages.WithImage detectObjectsInStream()

Performs object detection on the specified image. Two input methods are supported (1) Uploading an image or (2) specifying an image URL. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong.

DetectResult detectObjectsInStream(byte[] image, DetectObjectsInStreamOptionalParameter detectObjectsInStreamOptionalParameter)

Performs object detection on the specified image. Two input methods are supported (1) Uploading an image or (2) specifying an image URL. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong.

Observable<DetectResult> detectObjectsInStreamAsync(byte[] image, DetectObjectsInStreamOptionalParameter detectObjectsInStreamOptionalParameter)

Performs object detection on the specified image. Two input methods are supported (1) Uploading an image or (2) specifying an image URL. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong.

ComputerVisionGenerateThumbnailDefinitionStages.WithWidth generateThumbnail()

This operation generates a thumbnail image with the user-specified width and height. By default, the service analyzes the image, identifies the region of interest (ROI), and generates smart cropping coordinates based on the ROI. Smart cropping helps when you specify an aspect ratio that differs from that of the input image. A successful response contains the thumbnail image binary. If the request failed, the response contains an error code and a message to help determine what went wrong. Upon failure, the error code and an error message are returned. The error code could be one of InvalidImageUrl, InvalidImageFormat, InvalidImageSize, InvalidThumbnailSize, NotSupportedImage, FailedToProcess, Timeout, or InternalServerError.

InputStream generateThumbnail(int width, int height, String url, GenerateThumbnailOptionalParameter generateThumbnailOptionalParameter)

This operation generates a thumbnail image with the user-specified width and height. By default, the service analyzes the image, identifies the region of interest (ROI), and generates smart cropping coordinates based on the ROI. Smart cropping helps when you specify an aspect ratio that differs from that of the input image. A successful response contains the thumbnail image binary. If the request failed, the response contains an error code and a message to help determine what went wrong. Upon failure, the error code and an error message are returned. The error code could be one of InvalidImageUrl, InvalidImageFormat, InvalidImageSize, InvalidThumbnailSize, NotSupportedImage, FailedToProcess, Timeout, or InternalServerError.

Observable<InputStream> generateThumbnailAsync(int width, int height, String url, GenerateThumbnailOptionalParameter generateThumbnailOptionalParameter)

This operation generates a thumbnail image with the user-specified width and height. By default, the service analyzes the image, identifies the region of interest (ROI), and generates smart cropping coordinates based on the ROI. Smart cropping helps when you specify an aspect ratio that differs from that of the input image. A successful response contains the thumbnail image binary. If the request failed, the response contains an error code and a message to help determine what went wrong. Upon failure, the error code and an error message are returned. The error code could be one of InvalidImageUrl, InvalidImageFormat, InvalidImageSize, InvalidThumbnailSize, NotSupportedImage, FailedToProcess, Timeout, or InternalServerError.

ComputerVisionGenerateThumbnailInStreamDefinitionStages.WithWidth generateThumbnailInStream()

This operation generates a thumbnail image with the user-specified width and height. By default, the service analyzes the image, identifies the region of interest (ROI), and generates smart cropping coordinates based on the ROI. Smart cropping helps when you specify an aspect ratio that differs from that of the input image. A successful response contains the thumbnail image binary. If the request failed, the response contains an error code and a message to help determine what went wrong. Upon failure, the error code and an error message are returned. The error code could be one of InvalidImageUrl, InvalidImageFormat, InvalidImageSize, InvalidThumbnailSize, NotSupportedImage, FailedToProcess, Timeout, or InternalServerError.

InputStream generateThumbnailInStream(int width, int height, byte[] image, GenerateThumbnailInStreamOptionalParameter generateThumbnailInStreamOptionalParameter)

This operation generates a thumbnail image with the user-specified width and height. By default, the service analyzes the image, identifies the region of interest (ROI), and generates smart cropping coordinates based on the ROI. Smart cropping helps when you specify an aspect ratio that differs from that of the input image. A successful response contains the thumbnail image binary. If the request failed, the response contains an error code and a message to help determine what went wrong. Upon failure, the error code and an error message are returned. The error code could be one of InvalidImageUrl, InvalidImageFormat, InvalidImageSize, InvalidThumbnailSize, NotSupportedImage, FailedToProcess, Timeout, or InternalServerError.

Observable<InputStream> generateThumbnailInStreamAsync(int width, int height, byte[] image, GenerateThumbnailInStreamOptionalParameter generateThumbnailInStreamOptionalParameter)

This operation generates a thumbnail image with the user-specified width and height. By default, the service analyzes the image, identifies the region of interest (ROI), and generates smart cropping coordinates based on the ROI. Smart cropping helps when you specify an aspect ratio that differs from that of the input image. A successful response contains the thumbnail image binary. If the request failed, the response contains an error code and a message to help determine what went wrong. Upon failure, the error code and an error message are returned. The error code could be one of InvalidImageUrl, InvalidImageFormat, InvalidImageSize, InvalidThumbnailSize, NotSupportedImage, FailedToProcess, Timeout, or InternalServerError.

ComputerVisionGetAreaOfInterestDefinitionStages.WithUrl getAreaOfInterest()

This operation returns a bounding box around the most important area of the image. A successful response will be returned in JSON. If the request failed, the response contains an error code and a message to help determine what went wrong. Upon failure, the error code and an error message are returned. The error code could be one of InvalidImageUrl, InvalidImageFormat, InvalidImageSize, NotSupportedImage, FailedToProcess, Timeout, or InternalServerError.

AreaOfInterestResult getAreaOfInterest(String url, GetAreaOfInterestOptionalParameter getAreaOfInterestOptionalParameter)

This operation returns a bounding box around the most important area of the image. A successful response will be returned in JSON. If the request failed, the response contains an error code and a message to help determine what went wrong. Upon failure, the error code and an error message are returned. The error code could be one of InvalidImageUrl, InvalidImageFormat, InvalidImageSize, NotSupportedImage, FailedToProcess, Timeout, or InternalServerError.

Observable<AreaOfInterestResult> getAreaOfInterestAsync(String url, GetAreaOfInterestOptionalParameter getAreaOfInterestOptionalParameter)

This operation returns a bounding box around the most important area of the image. A successful response will be returned in JSON. If the request failed, the response contains an error code and a message to help determine what went wrong. Upon failure, the error code and an error message are returned. The error code could be one of InvalidImageUrl, InvalidImageFormat, InvalidImageSize, NotSupportedImage, FailedToProcess, Timeout, or InternalServerError.

ComputerVisionGetAreaOfInterestInStreamDefinitionStages.WithImage getAreaOfInterestInStream()

This operation returns a bounding box around the most important area of the image. A successful response will be returned in JSON. If the request failed, the response contains an error code and a message to help determine what went wrong. Upon failure, the error code and an error message are returned. The error code could be one of InvalidImageUrl, InvalidImageFormat, InvalidImageSize, NotSupportedImage, FailedToProcess, Timeout, or InternalServerError.

AreaOfInterestResult getAreaOfInterestInStream(byte[] image, GetAreaOfInterestInStreamOptionalParameter getAreaOfInterestInStreamOptionalParameter)

This operation returns a bounding box around the most important area of the image. A successful response will be returned in JSON. If the request failed, the response contains an error code and a message to help determine what went wrong. Upon failure, the error code and an error message are returned. The error code could be one of InvalidImageUrl, InvalidImageFormat, InvalidImageSize, NotSupportedImage, FailedToProcess, Timeout, or InternalServerError.

Observable<AreaOfInterestResult> getAreaOfInterestInStreamAsync(byte[] image, GetAreaOfInterestInStreamOptionalParameter getAreaOfInterestInStreamOptionalParameter)

This operation returns a bounding box around the most important area of the image. A successful response will be returned in JSON. If the request failed, the response contains an error code and a message to help determine what went wrong. Upon failure, the error code and an error message are returned. The error code could be one of InvalidImageUrl, InvalidImageFormat, InvalidImageSize, NotSupportedImage, FailedToProcess, Timeout, or InternalServerError.

ReadOperationResult getReadResult(UUID operationId)

This interface is used for getting OCR results of Read operation. The URL to this interface should be retrieved from 'Operation-Location' field returned from Read interface.

Observable<ReadOperationResult> getReadResultAsync(UUID operationId)

This interface is used for getting OCR results of Read operation. The URL to this interface should be retrieved from 'Operation-Location' field returned from Read interface.

ListModelsResult listModels()

This operation returns the list of domain-specific models that are supported by the Computer Vision API. Currently, the API supports following domain-specific models: celebrity recognizer, landmark recognizer. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong.

Observable<ListModelsResult> listModelsAsync()

This operation returns the list of domain-specific models that are supported by the Computer Vision API. Currently, the API supports following domain-specific models: celebrity recognizer, landmark recognizer. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong.

ComputerVisionReadDefinitionStages.WithUrl read()

Use this interface to get the result of a Read operation, employing the state-of-the-art Optical Character Recognition (OCR) algorithms optimized for text-heavy documents. When you use the Read interface, the response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your 'GetReadResult' operation to access OCR results.​.

void read(String url, ReadOptionalParameter readOptionalParameter)

Use this interface to get the result of a Read operation, employing the state-of-the-art Optical Character Recognition (OCR) algorithms optimized for text-heavy documents. When you use the Read interface, the response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your 'GetReadResult' operation to access OCR results.​.

Observable<Void> readAsync(String url, ReadOptionalParameter readOptionalParameter)

Use this interface to get the result of a Read operation, employing the state-of-the-art Optical Character Recognition (OCR) algorithms optimized for text-heavy documents. When you use the Read interface, the response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your 'GetReadResult' operation to access OCR results.​.

ComputerVisionReadInStreamDefinitionStages.WithImage readInStream()

Use this interface to get the result of a Read operation, employing the state-of-the-art Optical Character Recognition (OCR) algorithms optimized for text-heavy documents. When you use the Read interface, the response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your 'GetReadResult' operation to access OCR results.​.

void readInStream(byte[] image, ReadInStreamOptionalParameter readInStreamOptionalParameter)

Use this interface to get the result of a Read operation, employing the state-of-the-art Optical Character Recognition (OCR) algorithms optimized for text-heavy documents. When you use the Read interface, the response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your 'GetReadResult' operation to access OCR results.​.

Observable<Void> readInStreamAsync(byte[] image, ReadInStreamOptionalParameter readInStreamOptionalParameter)

Use this interface to get the result of a Read operation, employing the state-of-the-art Optical Character Recognition (OCR) algorithms optimized for text-heavy documents. When you use the Read interface, the response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your 'GetReadResult' operation to access OCR results.​.

ComputerVisionRecognizePrintedTextDefinitionStages.WithDetectOrientation recognizePrintedText()

Optical Character Recognition (OCR) detects text in an image and extracts the recognized characters into a machine-usable character stream. Upon success, the OCR results will be returned. Upon failure, the error code together with an error message will be returned. The error code can be one of InvalidImageUrl, InvalidImageFormat, InvalidImageSize, NotSupportedImage, NotSupportedLanguage, or InternalServerError.

OcrResult recognizePrintedText(boolean detectOrientation, String url, RecognizePrintedTextOptionalParameter recognizePrintedTextOptionalParameter)

Optical Character Recognition (OCR) detects text in an image and extracts the recognized characters into a machine-usable character stream. Upon success, the OCR results will be returned. Upon failure, the error code together with an error message will be returned. The error code can be one of InvalidImageUrl, InvalidImageFormat, InvalidImageSize, NotSupportedImage, NotSupportedLanguage, or InternalServerError.

Observable<OcrResult> recognizePrintedTextAsync(boolean detectOrientation, String url, RecognizePrintedTextOptionalParameter recognizePrintedTextOptionalParameter)

Optical Character Recognition (OCR) detects text in an image and extracts the recognized characters into a machine-usable character stream. Upon success, the OCR results will be returned. Upon failure, the error code together with an error message will be returned. The error code can be one of InvalidImageUrl, InvalidImageFormat, InvalidImageSize, NotSupportedImage, NotSupportedLanguage, or InternalServerError.

ComputerVisionRecognizePrintedTextInStreamDefinitionStages.WithDetectOrientation recognizePrintedTextInStream()

Optical Character Recognition (OCR) detects text in an image and extracts the recognized characters into a machine-usable character stream. Upon success, the OCR results will be returned. Upon failure, the error code together with an error message will be returned. The error code can be one of InvalidImageUrl, InvalidImageFormat, InvalidImageSize, NotSupportedImage, NotSupportedLanguage, or InternalServerError.

OcrResult recognizePrintedTextInStream(boolean detectOrientation, byte[] image, RecognizePrintedTextInStreamOptionalParameter recognizePrintedTextInStreamOptionalParameter)

Optical Character Recognition (OCR) detects text in an image and extracts the recognized characters into a machine-usable character stream. Upon success, the OCR results will be returned. Upon failure, the error code together with an error message will be returned. The error code can be one of InvalidImageUrl, InvalidImageFormat, InvalidImageSize, NotSupportedImage, NotSupportedLanguage, or InternalServerError.

Observable<OcrResult> recognizePrintedTextInStreamAsync(boolean detectOrientation, byte[] image, RecognizePrintedTextInStreamOptionalParameter recognizePrintedTextInStreamOptionalParameter)

Optical Character Recognition (OCR) detects text in an image and extracts the recognized characters into a machine-usable character stream. Upon success, the OCR results will be returned. Upon failure, the error code together with an error message will be returned. The error code can be one of InvalidImageUrl, InvalidImageFormat, InvalidImageSize, NotSupportedImage, NotSupportedLanguage, or InternalServerError.

ComputerVisionTagImageDefinitionStages.WithUrl tagImage()

This operation generates a list of words, or tags, that are relevant to the content of the supplied image. The Computer Vision API can return tags based on objects, living beings, scenery or actions found in images. Unlike categories, tags are not organized according to a hierarchical classification system, but correspond to image content. Tags may contain hints to avoid ambiguity or provide context, for example the tag "ascomycete" may be accompanied by the hint "fungus". Two input methods are supported (1) Uploading an image or (2) specifying an image URL. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong.

TagResult tagImage(String url, TagImageOptionalParameter tagImageOptionalParameter)

This operation generates a list of words, or tags, that are relevant to the content of the supplied image. The Computer Vision API can return tags based on objects, living beings, scenery or actions found in images. Unlike categories, tags are not organized according to a hierarchical classification system, but correspond to image content. Tags may contain hints to avoid ambiguity or provide context, for example the tag "ascomycete" may be accompanied by the hint "fungus". Two input methods are supported (1) Uploading an image or (2) specifying an image URL. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong.

Observable<TagResult> tagImageAsync(String url, TagImageOptionalParameter tagImageOptionalParameter)

This operation generates a list of words, or tags, that are relevant to the content of the supplied image. The Computer Vision API can return tags based on objects, living beings, scenery or actions found in images. Unlike categories, tags are not organized according to a hierarchical classification system, but correspond to image content. Tags may contain hints to avoid ambiguity or provide context, for example the tag "ascomycete" may be accompanied by the hint "fungus". Two input methods are supported (1) Uploading an image or (2) specifying an image URL. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong.

ComputerVisionTagImageInStreamDefinitionStages.WithImage tagImageInStream()

This operation generates a list of words, or tags, that are relevant to the content of the supplied image. The Computer Vision API can return tags based on objects, living beings, scenery or actions found in images. Unlike categories, tags are not organized according to a hierarchical classification system, but correspond to image content. Tags may contain hints to avoid ambiguity or provide context, for example the tag "ascomycete" may be accompanied by the hint "fungus". Two input methods are supported (1) Uploading an image or (2) specifying an image URL. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong.

TagResult tagImageInStream(byte[] image, TagImageInStreamOptionalParameter tagImageInStreamOptionalParameter)

This operation generates a list of words, or tags, that are relevant to the content of the supplied image. The Computer Vision API can return tags based on objects, living beings, scenery or actions found in images. Unlike categories, tags are not organized according to a hierarchical classification system, but correspond to image content. Tags may contain hints to avoid ambiguity or provide context, for example the tag "ascomycete" may be accompanied by the hint "fungus". Two input methods are supported (1) Uploading an image or (2) specifying an image URL. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong.

Observable<TagResult> tagImageInStreamAsync(byte[] image, TagImageInStreamOptionalParameter tagImageInStreamOptionalParameter)

This operation generates a list of words, or tags, that are relevant to the content of the supplied image. The Computer Vision API can return tags based on objects, living beings, scenery or actions found in images. Unlike categories, tags are not organized according to a hierarchical classification system, but correspond to image content. Tags may contain hints to avoid ambiguity or provide context, for example the tag "ascomycete" may be accompanied by the hint "fungus". Two input methods are supported (1) Uploading an image or (2) specifying an image URL. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong.

Method Details

analyzeImage

public ComputerVisionAnalyzeImageDefinitionStages.WithUrl analyzeImage()

This operation extracts a rich set of visual features based on the image content. Two input methods are supported (1) Uploading an image or (2) specifying an image URL. Within your request, there is an optional parameter to allow you to choose which features to return. By default, image categories are returned in the response. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong.

Returns:

the first stage of the analyzeImage call

analyzeImage

public ImageAnalysis analyzeImage(String url, AnalyzeImageOptionalParameter analyzeImageOptionalParameter)

This operation extracts a rich set of visual features based on the image content. Two input methods are supported (1) Uploading an image or (2) specifying an image URL. Within your request, there is an optional parameter to allow you to choose which features to return. By default, image categories are returned in the response. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong.

Parameters:

url - Publicly reachable URL of an image.
analyzeImageOptionalParameter - the object representing the optional parameters to be set before calling this API

Returns:

the ImageAnalysis object if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation
ComputerVisionErrorResponseException - thrown if the request is rejected by server
RuntimeException - all other wrapped checked exceptions if the request fails to be sent

analyzeImageAsync

public Observable analyzeImageAsync(String url, AnalyzeImageOptionalParameter analyzeImageOptionalParameter)

This operation extracts a rich set of visual features based on the image content. Two input methods are supported (1) Uploading an image or (2) specifying an image URL. Within your request, there is an optional parameter to allow you to choose which features to return. By default, image categories are returned in the response. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong.

Parameters:

url - Publicly reachable URL of an image.
analyzeImageOptionalParameter - the object representing the optional parameters to be set before calling this API

Returns:

the observable to the ImageAnalysis object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

analyzeImageByDomain

public ComputerVisionAnalyzeImageByDomainDefinitionStages.WithModel analyzeImageByDomain()

This operation recognizes content within an image by applying a domain-specific model. The list of domain-specific models that are supported by the Computer Vision API can be retrieved using the /models GET request. Currently, the API provides following domain-specific models: celebrities, landmarks. Two input methods are supported (1) Uploading an image or (2) specifying an image URL. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong.

Returns:

the first stage of the analyzeImageByDomain call

analyzeImageByDomain

public DomainModelResults analyzeImageByDomain(String model, String url, AnalyzeImageByDomainOptionalParameter analyzeImageByDomainOptionalParameter)

This operation recognizes content within an image by applying a domain-specific model. The list of domain-specific models that are supported by the Computer Vision API can be retrieved using the /models GET request. Currently, the API provides following domain-specific models: celebrities, landmarks. Two input methods are supported (1) Uploading an image or (2) specifying an image URL. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong.

Parameters:

model - The domain-specific content to recognize.
url - Publicly reachable URL of an image.
analyzeImageByDomainOptionalParameter - the object representing the optional parameters to be set before calling this API

Returns:

the DomainModelResults object if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation
ComputerVisionErrorResponseException - thrown if the request is rejected by server
RuntimeException - all other wrapped checked exceptions if the request fails to be sent

analyzeImageByDomainAsync

public Observable analyzeImageByDomainAsync(String model, String url, AnalyzeImageByDomainOptionalParameter analyzeImageByDomainOptionalParameter)

This operation recognizes content within an image by applying a domain-specific model. The list of domain-specific models that are supported by the Computer Vision API can be retrieved using the /models GET request. Currently, the API provides following domain-specific models: celebrities, landmarks. Two input methods are supported (1) Uploading an image or (2) specifying an image URL. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong.

Parameters:

model - The domain-specific content to recognize.
url - Publicly reachable URL of an image.
analyzeImageByDomainOptionalParameter - the object representing the optional parameters to be set before calling this API

Returns:

the observable to the DomainModelResults object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

analyzeImageByDomainInStream

public ComputerVisionAnalyzeImageByDomainInStreamDefinitionStages.WithModel analyzeImageByDomainInStream()

This operation recognizes content within an image by applying a domain-specific model. The list of domain-specific models that are supported by the Computer Vision API can be retrieved using the /models GET request. Currently, the API provides following domain-specific models: celebrities, landmarks. Two input methods are supported (1) Uploading an image or (2) specifying an image URL. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong.

Returns:

the first stage of the analyzeImageByDomainInStream call

analyzeImageByDomainInStream

public DomainModelResults analyzeImageByDomainInStream(String model, byte[] image, AnalyzeImageByDomainInStreamOptionalParameter analyzeImageByDomainInStreamOptionalParameter)

This operation recognizes content within an image by applying a domain-specific model. The list of domain-specific models that are supported by the Computer Vision API can be retrieved using the /models GET request. Currently, the API provides following domain-specific models: celebrities, landmarks. Two input methods are supported (1) Uploading an image or (2) specifying an image URL. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong.

Parameters:

model - The domain-specific content to recognize.
image - An image stream.
analyzeImageByDomainInStreamOptionalParameter - the object representing the optional parameters to be set before calling this API

Returns:

the DomainModelResults object if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation
ComputerVisionErrorResponseException - thrown if the request is rejected by server
RuntimeException - all other wrapped checked exceptions if the request fails to be sent

analyzeImageByDomainInStreamAsync

public Observable analyzeImageByDomainInStreamAsync(String model, byte[] image, AnalyzeImageByDomainInStreamOptionalParameter analyzeImageByDomainInStreamOptionalParameter)

This operation recognizes content within an image by applying a domain-specific model. The list of domain-specific models that are supported by the Computer Vision API can be retrieved using the /models GET request. Currently, the API provides following domain-specific models: celebrities, landmarks. Two input methods are supported (1) Uploading an image or (2) specifying an image URL. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong.

Parameters:

model - The domain-specific content to recognize.
image - An image stream.
analyzeImageByDomainInStreamOptionalParameter - the object representing the optional parameters to be set before calling this API

Returns:

the observable to the DomainModelResults object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

analyzeImageInStream

public ComputerVisionAnalyzeImageInStreamDefinitionStages.WithImage analyzeImageInStream()

This operation extracts a rich set of visual features based on the image content. Two input methods are supported (1) Uploading an image or (2) specifying an image URL. Within your request, there is an optional parameter to allow you to choose which features to return. By default, image categories are returned in the response. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong.

Returns:

the first stage of the analyzeImageInStream call

analyzeImageInStream

public ImageAnalysis analyzeImageInStream(byte[] image, AnalyzeImageInStreamOptionalParameter analyzeImageInStreamOptionalParameter)

This operation extracts a rich set of visual features based on the image content. Two input methods are supported (1) Uploading an image or (2) specifying an image URL. Within your request, there is an optional parameter to allow you to choose which features to return. By default, image categories are returned in the response. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong.

Parameters:

image - An image stream.
analyzeImageInStreamOptionalParameter - the object representing the optional parameters to be set before calling this API

Returns:

the ImageAnalysis object if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation
ComputerVisionErrorResponseException - thrown if the request is rejected by server
RuntimeException - all other wrapped checked exceptions if the request fails to be sent

analyzeImageInStreamAsync

public Observable analyzeImageInStreamAsync(byte[] image, AnalyzeImageInStreamOptionalParameter analyzeImageInStreamOptionalParameter)

This operation extracts a rich set of visual features based on the image content. Two input methods are supported (1) Uploading an image or (2) specifying an image URL. Within your request, there is an optional parameter to allow you to choose which features to return. By default, image categories are returned in the response. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong.

Parameters:

image - An image stream.
analyzeImageInStreamOptionalParameter - the object representing the optional parameters to be set before calling this API

Returns:

the observable to the ImageAnalysis object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

describeImage

public ComputerVisionDescribeImageDefinitionStages.WithUrl describeImage()

This operation generates a description of an image in human readable language with complete sentences. The description is based on a collection of content tags, which are also returned by the operation. More than one description can be generated for each image. Descriptions are ordered by their confidence score. Descriptions may include results from celebrity and landmark domain models, if applicable. Two input methods are supported (1) Uploading an image or (2) specifying an image URL. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong.

Returns:

the first stage of the describeImage call

describeImage

public ImageDescription describeImage(String url, DescribeImageOptionalParameter describeImageOptionalParameter)

This operation generates a description of an image in human readable language with complete sentences. The description is based on a collection of content tags, which are also returned by the operation. More than one description can be generated for each image. Descriptions are ordered by their confidence score. Descriptions may include results from celebrity and landmark domain models, if applicable. Two input methods are supported (1) Uploading an image or (2) specifying an image URL. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong.

Parameters:

url - Publicly reachable URL of an image.
describeImageOptionalParameter - the object representing the optional parameters to be set before calling this API

Returns:

the ImageDescription object if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation
ComputerVisionErrorResponseException - thrown if the request is rejected by server
RuntimeException - all other wrapped checked exceptions if the request fails to be sent

describeImageAsync

public Observable describeImageAsync(String url, DescribeImageOptionalParameter describeImageOptionalParameter)

This operation generates a description of an image in human readable language with complete sentences. The description is based on a collection of content tags, which are also returned by the operation. More than one description can be generated for each image. Descriptions are ordered by their confidence score. Descriptions may include results from celebrity and landmark domain models, if applicable. Two input methods are supported (1) Uploading an image or (2) specifying an image URL. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong.

Parameters:

url - Publicly reachable URL of an image.
describeImageOptionalParameter - the object representing the optional parameters to be set before calling this API

Returns:

the observable to the ImageDescription object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

describeImageInStream

public ComputerVisionDescribeImageInStreamDefinitionStages.WithImage describeImageInStream()

This operation generates a description of an image in human readable language with complete sentences. The description is based on a collection of content tags, which are also returned by the operation. More than one description can be generated for each image. Descriptions are ordered by their confidence score. Descriptions may include results from celebrity and landmark domain models, if applicable. Two input methods are supported (1) Uploading an image or (2) specifying an image URL. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong.

Returns:

the first stage of the describeImageInStream call

describeImageInStream

public ImageDescription describeImageInStream(byte[] image, DescribeImageInStreamOptionalParameter describeImageInStreamOptionalParameter)

This operation generates a description of an image in human readable language with complete sentences. The description is based on a collection of content tags, which are also returned by the operation. More than one description can be generated for each image. Descriptions are ordered by their confidence score. Descriptions may include results from celebrity and landmark domain models, if applicable. Two input methods are supported (1) Uploading an image or (2) specifying an image URL. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong.

Parameters:

image - An image stream.
describeImageInStreamOptionalParameter - the object representing the optional parameters to be set before calling this API

Returns:

the ImageDescription object if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation
ComputerVisionErrorResponseException - thrown if the request is rejected by server
RuntimeException - all other wrapped checked exceptions if the request fails to be sent

describeImageInStreamAsync

public Observable describeImageInStreamAsync(byte[] image, DescribeImageInStreamOptionalParameter describeImageInStreamOptionalParameter)

This operation generates a description of an image in human readable language with complete sentences. The description is based on a collection of content tags, which are also returned by the operation. More than one description can be generated for each image. Descriptions are ordered by their confidence score. Descriptions may include results from celebrity and landmark domain models, if applicable. Two input methods are supported (1) Uploading an image or (2) specifying an image URL. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong.

Parameters:

image - An image stream.
describeImageInStreamOptionalParameter - the object representing the optional parameters to be set before calling this API

Returns:

the observable to the ImageDescription object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

detectObjects

public ComputerVisionDetectObjectsDefinitionStages.WithUrl detectObjects()

Performs object detection on the specified image. Two input methods are supported (1) Uploading an image or (2) specifying an image URL. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong.

Returns:

the first stage of the detectObjects call

detectObjects

public DetectResult detectObjects(String url, DetectObjectsOptionalParameter detectObjectsOptionalParameter)

Performs object detection on the specified image. Two input methods are supported (1) Uploading an image or (2) specifying an image URL. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong.

Parameters:

url - Publicly reachable URL of an image.
detectObjectsOptionalParameter - the object representing the optional parameters to be set before calling this API

Returns:

the DetectResult object if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation
ComputerVisionErrorResponseException - thrown if the request is rejected by server
RuntimeException - all other wrapped checked exceptions if the request fails to be sent

detectObjectsAsync

public Observable detectObjectsAsync(String url, DetectObjectsOptionalParameter detectObjectsOptionalParameter)

Performs object detection on the specified image. Two input methods are supported (1) Uploading an image or (2) specifying an image URL. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong.

Parameters:

url - Publicly reachable URL of an image.
detectObjectsOptionalParameter - the object representing the optional parameters to be set before calling this API

Returns:

the observable to the DetectResult object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

detectObjectsInStream

public ComputerVisionDetectObjectsInStreamDefinitionStages.WithImage detectObjectsInStream()

Performs object detection on the specified image. Two input methods are supported (1) Uploading an image or (2) specifying an image URL. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong.

Returns:

the first stage of the detectObjectsInStream call

detectObjectsInStream

public DetectResult detectObjectsInStream(byte[] image, DetectObjectsInStreamOptionalParameter detectObjectsInStreamOptionalParameter)

Performs object detection on the specified image. Two input methods are supported (1) Uploading an image or (2) specifying an image URL. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong.

Parameters:

image - An image stream.
detectObjectsInStreamOptionalParameter - the object representing the optional parameters to be set before calling this API

Returns:

the DetectResult object if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation
ComputerVisionErrorResponseException - thrown if the request is rejected by server
RuntimeException - all other wrapped checked exceptions if the request fails to be sent

detectObjectsInStreamAsync

public Observable detectObjectsInStreamAsync(byte[] image, DetectObjectsInStreamOptionalParameter detectObjectsInStreamOptionalParameter)

Performs object detection on the specified image. Two input methods are supported (1) Uploading an image or (2) specifying an image URL. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong.

Parameters:

image - An image stream.
detectObjectsInStreamOptionalParameter - the object representing the optional parameters to be set before calling this API

Returns:

the observable to the DetectResult object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

generateThumbnail

public ComputerVisionGenerateThumbnailDefinitionStages.WithWidth generateThumbnail()

This operation generates a thumbnail image with the user-specified width and height. By default, the service analyzes the image, identifies the region of interest (ROI), and generates smart cropping coordinates based on the ROI. Smart cropping helps when you specify an aspect ratio that differs from that of the input image. A successful response contains the thumbnail image binary. If the request failed, the response contains an error code and a message to help determine what went wrong. Upon failure, the error code and an error message are returned. The error code could be one of InvalidImageUrl, InvalidImageFormat, InvalidImageSize, InvalidThumbnailSize, NotSupportedImage, FailedToProcess, Timeout, or InternalServerError.

Returns:

the first stage of the generateThumbnail call

generateThumbnail

public InputStream generateThumbnail(int width, int height, String url, GenerateThumbnailOptionalParameter generateThumbnailOptionalParameter)

This operation generates a thumbnail image with the user-specified width and height. By default, the service analyzes the image, identifies the region of interest (ROI), and generates smart cropping coordinates based on the ROI. Smart cropping helps when you specify an aspect ratio that differs from that of the input image. A successful response contains the thumbnail image binary. If the request failed, the response contains an error code and a message to help determine what went wrong. Upon failure, the error code and an error message are returned. The error code could be one of InvalidImageUrl, InvalidImageFormat, InvalidImageSize, InvalidThumbnailSize, NotSupportedImage, FailedToProcess, Timeout, or InternalServerError.

Parameters:

width - Width of the thumbnail, in pixels. It must be between 1 and 1024. Recommended minimum of 50.
height - Height of the thumbnail, in pixels. It must be between 1 and 1024. Recommended minimum of 50.
url - Publicly reachable URL of an image.
generateThumbnailOptionalParameter - the object representing the optional parameters to be set before calling this API

Returns:

the InputStream object if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation
CloudException - thrown if the request is rejected by server
RuntimeException - all other wrapped checked exceptions if the request fails to be sent

generateThumbnailAsync

public Observable generateThumbnailAsync(int width, int height, String url, GenerateThumbnailOptionalParameter generateThumbnailOptionalParameter)

This operation generates a thumbnail image with the user-specified width and height. By default, the service analyzes the image, identifies the region of interest (ROI), and generates smart cropping coordinates based on the ROI. Smart cropping helps when you specify an aspect ratio that differs from that of the input image. A successful response contains the thumbnail image binary. If the request failed, the response contains an error code and a message to help determine what went wrong. Upon failure, the error code and an error message are returned. The error code could be one of InvalidImageUrl, InvalidImageFormat, InvalidImageSize, InvalidThumbnailSize, NotSupportedImage, FailedToProcess, Timeout, or InternalServerError.

Parameters:

width - Width of the thumbnail, in pixels. It must be between 1 and 1024. Recommended minimum of 50.
height - Height of the thumbnail, in pixels. It must be between 1 and 1024. Recommended minimum of 50.
url - Publicly reachable URL of an image.
generateThumbnailOptionalParameter - the object representing the optional parameters to be set before calling this API

Returns:

the observable to the InputStream object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

generateThumbnailInStream

public ComputerVisionGenerateThumbnailInStreamDefinitionStages.WithWidth generateThumbnailInStream()

This operation generates a thumbnail image with the user-specified width and height. By default, the service analyzes the image, identifies the region of interest (ROI), and generates smart cropping coordinates based on the ROI. Smart cropping helps when you specify an aspect ratio that differs from that of the input image. A successful response contains the thumbnail image binary. If the request failed, the response contains an error code and a message to help determine what went wrong. Upon failure, the error code and an error message are returned. The error code could be one of InvalidImageUrl, InvalidImageFormat, InvalidImageSize, InvalidThumbnailSize, NotSupportedImage, FailedToProcess, Timeout, or InternalServerError.

Returns:

the first stage of the generateThumbnailInStream call

generateThumbnailInStream

public InputStream generateThumbnailInStream(int width, int height, byte[] image, GenerateThumbnailInStreamOptionalParameter generateThumbnailInStreamOptionalParameter)

This operation generates a thumbnail image with the user-specified width and height. By default, the service analyzes the image, identifies the region of interest (ROI), and generates smart cropping coordinates based on the ROI. Smart cropping helps when you specify an aspect ratio that differs from that of the input image. A successful response contains the thumbnail image binary. If the request failed, the response contains an error code and a message to help determine what went wrong. Upon failure, the error code and an error message are returned. The error code could be one of InvalidImageUrl, InvalidImageFormat, InvalidImageSize, InvalidThumbnailSize, NotSupportedImage, FailedToProcess, Timeout, or InternalServerError.

Parameters:

width - Width of the thumbnail, in pixels. It must be between 1 and 1024. Recommended minimum of 50.
height - Height of the thumbnail, in pixels. It must be between 1 and 1024. Recommended minimum of 50.
image - An image stream.
generateThumbnailInStreamOptionalParameter - the object representing the optional parameters to be set before calling this API

Returns:

the InputStream object if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation
CloudException - thrown if the request is rejected by server
RuntimeException - all other wrapped checked exceptions if the request fails to be sent

generateThumbnailInStreamAsync

public Observable generateThumbnailInStreamAsync(int width, int height, byte[] image, GenerateThumbnailInStreamOptionalParameter generateThumbnailInStreamOptionalParameter)

This operation generates a thumbnail image with the user-specified width and height. By default, the service analyzes the image, identifies the region of interest (ROI), and generates smart cropping coordinates based on the ROI. Smart cropping helps when you specify an aspect ratio that differs from that of the input image. A successful response contains the thumbnail image binary. If the request failed, the response contains an error code and a message to help determine what went wrong. Upon failure, the error code and an error message are returned. The error code could be one of InvalidImageUrl, InvalidImageFormat, InvalidImageSize, InvalidThumbnailSize, NotSupportedImage, FailedToProcess, Timeout, or InternalServerError.

Parameters:

width - Width of the thumbnail, in pixels. It must be between 1 and 1024. Recommended minimum of 50.
height - Height of the thumbnail, in pixels. It must be between 1 and 1024. Recommended minimum of 50.
image - An image stream.
generateThumbnailInStreamOptionalParameter - the object representing the optional parameters to be set before calling this API

Returns:

the observable to the InputStream object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

getAreaOfInterest

public ComputerVisionGetAreaOfInterestDefinitionStages.WithUrl getAreaOfInterest()

This operation returns a bounding box around the most important area of the image. A successful response will be returned in JSON. If the request failed, the response contains an error code and a message to help determine what went wrong. Upon failure, the error code and an error message are returned. The error code could be one of InvalidImageUrl, InvalidImageFormat, InvalidImageSize, NotSupportedImage, FailedToProcess, Timeout, or InternalServerError.

Returns:

the first stage of the getAreaOfInterest call

getAreaOfInterest

public AreaOfInterestResult getAreaOfInterest(String url, GetAreaOfInterestOptionalParameter getAreaOfInterestOptionalParameter)

This operation returns a bounding box around the most important area of the image. A successful response will be returned in JSON. If the request failed, the response contains an error code and a message to help determine what went wrong. Upon failure, the error code and an error message are returned. The error code could be one of InvalidImageUrl, InvalidImageFormat, InvalidImageSize, NotSupportedImage, FailedToProcess, Timeout, or InternalServerError.

Parameters:

url - Publicly reachable URL of an image.
getAreaOfInterestOptionalParameter - the object representing the optional parameters to be set before calling this API

Returns:

the AreaOfInterestResult object if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation
ComputerVisionErrorResponseException - thrown if the request is rejected by server
RuntimeException - all other wrapped checked exceptions if the request fails to be sent

getAreaOfInterestAsync

public Observable getAreaOfInterestAsync(String url, GetAreaOfInterestOptionalParameter getAreaOfInterestOptionalParameter)

This operation returns a bounding box around the most important area of the image. A successful response will be returned in JSON. If the request failed, the response contains an error code and a message to help determine what went wrong. Upon failure, the error code and an error message are returned. The error code could be one of InvalidImageUrl, InvalidImageFormat, InvalidImageSize, NotSupportedImage, FailedToProcess, Timeout, or InternalServerError.

Parameters:

url - Publicly reachable URL of an image.
getAreaOfInterestOptionalParameter - the object representing the optional parameters to be set before calling this API

Returns:

the observable to the AreaOfInterestResult object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

getAreaOfInterestInStream

public ComputerVisionGetAreaOfInterestInStreamDefinitionStages.WithImage getAreaOfInterestInStream()

This operation returns a bounding box around the most important area of the image. A successful response will be returned in JSON. If the request failed, the response contains an error code and a message to help determine what went wrong. Upon failure, the error code and an error message are returned. The error code could be one of InvalidImageUrl, InvalidImageFormat, InvalidImageSize, NotSupportedImage, FailedToProcess, Timeout, or InternalServerError.

Returns:

the first stage of the getAreaOfInterestInStream call

getAreaOfInterestInStream

public AreaOfInterestResult getAreaOfInterestInStream(byte[] image, GetAreaOfInterestInStreamOptionalParameter getAreaOfInterestInStreamOptionalParameter)

This operation returns a bounding box around the most important area of the image. A successful response will be returned in JSON. If the request failed, the response contains an error code and a message to help determine what went wrong. Upon failure, the error code and an error message are returned. The error code could be one of InvalidImageUrl, InvalidImageFormat, InvalidImageSize, NotSupportedImage, FailedToProcess, Timeout, or InternalServerError.

Parameters:

image - An image stream.
getAreaOfInterestInStreamOptionalParameter - the object representing the optional parameters to be set before calling this API

Returns:

the AreaOfInterestResult object if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation
ComputerVisionErrorResponseException - thrown if the request is rejected by server
RuntimeException - all other wrapped checked exceptions if the request fails to be sent

getAreaOfInterestInStreamAsync

public Observable getAreaOfInterestInStreamAsync(byte[] image, GetAreaOfInterestInStreamOptionalParameter getAreaOfInterestInStreamOptionalParameter)

This operation returns a bounding box around the most important area of the image. A successful response will be returned in JSON. If the request failed, the response contains an error code and a message to help determine what went wrong. Upon failure, the error code and an error message are returned. The error code could be one of InvalidImageUrl, InvalidImageFormat, InvalidImageSize, NotSupportedImage, FailedToProcess, Timeout, or InternalServerError.

Parameters:

image - An image stream.
getAreaOfInterestInStreamOptionalParameter - the object representing the optional parameters to be set before calling this API

Returns:

the observable to the AreaOfInterestResult object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

getReadResult

public ReadOperationResult getReadResult(UUID operationId)

This interface is used for getting OCR results of Read operation. The URL to this interface should be retrieved from 'Operation-Location' field returned from Read interface.

Parameters:

operationId - Id of read operation returned in the response of the 'Read' interface.

Returns:

the ReadOperationResult object if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation
ComputerVisionOcrErrorException - thrown if the request is rejected by server
RuntimeException - all other wrapped checked exceptions if the request fails to be sent

getReadResultAsync

public Observable getReadResultAsync(UUID operationId)

This interface is used for getting OCR results of Read operation. The URL to this interface should be retrieved from 'Operation-Location' field returned from Read interface.

Parameters:

operationId - Id of read operation returned in the response of the 'Read' interface.

Returns:

the observable to the ReadOperationResult object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

listModels

public ListModelsResult listModels()

This operation returns the list of domain-specific models that are supported by the Computer Vision API. Currently, the API supports following domain-specific models: celebrity recognizer, landmark recognizer. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong.

Returns:

the ListModelsResult object if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation
ComputerVisionErrorResponseException - thrown if the request is rejected by server
RuntimeException - all other wrapped checked exceptions if the request fails to be sent

listModelsAsync

public Observable listModelsAsync()

This operation returns the list of domain-specific models that are supported by the Computer Vision API. Currently, the API supports following domain-specific models: celebrity recognizer, landmark recognizer. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong.

Returns:

the observable to the ListModelsResult object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

read

public ComputerVisionReadDefinitionStages.WithUrl read()

Use this interface to get the result of a Read operation, employing the state-of-the-art Optical Character Recognition (OCR) algorithms optimized for text-heavy documents. When you use the Read interface, the response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your 'GetReadResult' operation to access OCR results.​.

Returns:

the first stage of the read call

read

public void read(String url, ReadOptionalParameter readOptionalParameter)

Use this interface to get the result of a Read operation, employing the state-of-the-art Optical Character Recognition (OCR) algorithms optimized for text-heavy documents. When you use the Read interface, the response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your 'GetReadResult' operation to access OCR results.​.

Parameters:

url - Publicly reachable URL of an image.
readOptionalParameter - the object representing the optional parameters to be set before calling this API

Throws:

IllegalArgumentException - thrown if parameters fail the validation
ComputerVisionOcrErrorException - thrown if the request is rejected by server
RuntimeException - all other wrapped checked exceptions if the request fails to be sent

readAsync

public Observable readAsync(String url, ReadOptionalParameter readOptionalParameter)

Use this interface to get the result of a Read operation, employing the state-of-the-art Optical Character Recognition (OCR) algorithms optimized for text-heavy documents. When you use the Read interface, the response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your 'GetReadResult' operation to access OCR results.​.

Parameters:

url - Publicly reachable URL of an image.
readOptionalParameter - the object representing the optional parameters to be set before calling this API

Returns:

a representation of the deferred computation of this call if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation

readInStream

public ComputerVisionReadInStreamDefinitionStages.WithImage readInStream()

Use this interface to get the result of a Read operation, employing the state-of-the-art Optical Character Recognition (OCR) algorithms optimized for text-heavy documents. When you use the Read interface, the response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your 'GetReadResult' operation to access OCR results.​.

Returns:

the first stage of the readInStream call

readInStream

public void readInStream(byte[] image, ReadInStreamOptionalParameter readInStreamOptionalParameter)

Use this interface to get the result of a Read operation, employing the state-of-the-art Optical Character Recognition (OCR) algorithms optimized for text-heavy documents. When you use the Read interface, the response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your 'GetReadResult' operation to access OCR results.​.

Parameters:

image - An image stream.
readInStreamOptionalParameter - the object representing the optional parameters to be set before calling this API

Throws:

IllegalArgumentException - thrown if parameters fail the validation
ComputerVisionOcrErrorException - thrown if the request is rejected by server
RuntimeException - all other wrapped checked exceptions if the request fails to be sent

readInStreamAsync

public Observable readInStreamAsync(byte[] image, ReadInStreamOptionalParameter readInStreamOptionalParameter)

Use this interface to get the result of a Read operation, employing the state-of-the-art Optical Character Recognition (OCR) algorithms optimized for text-heavy documents. When you use the Read interface, the response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your 'GetReadResult' operation to access OCR results.​.

Parameters:

image - An image stream.
readInStreamOptionalParameter - the object representing the optional parameters to be set before calling this API

Returns:

a representation of the deferred computation of this call if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation

recognizePrintedText

public ComputerVisionRecognizePrintedTextDefinitionStages.WithDetectOrientation recognizePrintedText()

Optical Character Recognition (OCR) detects text in an image and extracts the recognized characters into a machine-usable character stream. Upon success, the OCR results will be returned. Upon failure, the error code together with an error message will be returned. The error code can be one of InvalidImageUrl, InvalidImageFormat, InvalidImageSize, NotSupportedImage, NotSupportedLanguage, or InternalServerError.

Returns:

the first stage of the recognizePrintedText call

recognizePrintedText

public OcrResult recognizePrintedText(boolean detectOrientation, String url, RecognizePrintedTextOptionalParameter recognizePrintedTextOptionalParameter)

Optical Character Recognition (OCR) detects text in an image and extracts the recognized characters into a machine-usable character stream. Upon success, the OCR results will be returned. Upon failure, the error code together with an error message will be returned. The error code can be one of InvalidImageUrl, InvalidImageFormat, InvalidImageSize, NotSupportedImage, NotSupportedLanguage, or InternalServerError.

Parameters:

detectOrientation - Whether detect the text orientation in the image. With detectOrientation=true the OCR service tries to detect the image orientation and correct it before further processing (e.g. if it's upside-down).
url - Publicly reachable URL of an image.
recognizePrintedTextOptionalParameter - the object representing the optional parameters to be set before calling this API

Returns:

the OcrResult object if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation
ComputerVisionErrorResponseException - thrown if the request is rejected by server
RuntimeException - all other wrapped checked exceptions if the request fails to be sent

recognizePrintedTextAsync

public Observable recognizePrintedTextAsync(boolean detectOrientation, String url, RecognizePrintedTextOptionalParameter recognizePrintedTextOptionalParameter)

Optical Character Recognition (OCR) detects text in an image and extracts the recognized characters into a machine-usable character stream. Upon success, the OCR results will be returned. Upon failure, the error code together with an error message will be returned. The error code can be one of InvalidImageUrl, InvalidImageFormat, InvalidImageSize, NotSupportedImage, NotSupportedLanguage, or InternalServerError.

Parameters:

detectOrientation - Whether detect the text orientation in the image. With detectOrientation=true the OCR service tries to detect the image orientation and correct it before further processing (e.g. if it's upside-down).
url - Publicly reachable URL of an image.
recognizePrintedTextOptionalParameter - the object representing the optional parameters to be set before calling this API

Returns:

the observable to the OcrResult object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

recognizePrintedTextInStream

public ComputerVisionRecognizePrintedTextInStreamDefinitionStages.WithDetectOrientation recognizePrintedTextInStream()

Optical Character Recognition (OCR) detects text in an image and extracts the recognized characters into a machine-usable character stream. Upon success, the OCR results will be returned. Upon failure, the error code together with an error message will be returned. The error code can be one of InvalidImageUrl, InvalidImageFormat, InvalidImageSize, NotSupportedImage, NotSupportedLanguage, or InternalServerError.

Returns:

the first stage of the recognizePrintedTextInStream call

recognizePrintedTextInStream

public OcrResult recognizePrintedTextInStream(boolean detectOrientation, byte[] image, RecognizePrintedTextInStreamOptionalParameter recognizePrintedTextInStreamOptionalParameter)

Optical Character Recognition (OCR) detects text in an image and extracts the recognized characters into a machine-usable character stream. Upon success, the OCR results will be returned. Upon failure, the error code together with an error message will be returned. The error code can be one of InvalidImageUrl, InvalidImageFormat, InvalidImageSize, NotSupportedImage, NotSupportedLanguage, or InternalServerError.

Parameters:

detectOrientation - Whether detect the text orientation in the image. With detectOrientation=true the OCR service tries to detect the image orientation and correct it before further processing (e.g. if it's upside-down).
image - An image stream.
recognizePrintedTextInStreamOptionalParameter - the object representing the optional parameters to be set before calling this API

Returns:

the OcrResult object if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation
ComputerVisionErrorResponseException - thrown if the request is rejected by server
RuntimeException - all other wrapped checked exceptions if the request fails to be sent

recognizePrintedTextInStreamAsync

public Observable recognizePrintedTextInStreamAsync(boolean detectOrientation, byte[] image, RecognizePrintedTextInStreamOptionalParameter recognizePrintedTextInStreamOptionalParameter)

Optical Character Recognition (OCR) detects text in an image and extracts the recognized characters into a machine-usable character stream. Upon success, the OCR results will be returned. Upon failure, the error code together with an error message will be returned. The error code can be one of InvalidImageUrl, InvalidImageFormat, InvalidImageSize, NotSupportedImage, NotSupportedLanguage, or InternalServerError.

Parameters:

detectOrientation - Whether detect the text orientation in the image. With detectOrientation=true the OCR service tries to detect the image orientation and correct it before further processing (e.g. if it's upside-down).
image - An image stream.
recognizePrintedTextInStreamOptionalParameter - the object representing the optional parameters to be set before calling this API

Returns:

the observable to the OcrResult object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

tagImage

public ComputerVisionTagImageDefinitionStages.WithUrl tagImage()

This operation generates a list of words, or tags, that are relevant to the content of the supplied image. The Computer Vision API can return tags based on objects, living beings, scenery or actions found in images. Unlike categories, tags are not organized according to a hierarchical classification system, but correspond to image content. Tags may contain hints to avoid ambiguity or provide context, for example the tag "ascomycete" may be accompanied by the hint "fungus". Two input methods are supported (1) Uploading an image or (2) specifying an image URL. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong.

Returns:

the first stage of the tagImage call

tagImage

public TagResult tagImage(String url, TagImageOptionalParameter tagImageOptionalParameter)

This operation generates a list of words, or tags, that are relevant to the content of the supplied image. The Computer Vision API can return tags based on objects, living beings, scenery or actions found in images. Unlike categories, tags are not organized according to a hierarchical classification system, but correspond to image content. Tags may contain hints to avoid ambiguity or provide context, for example the tag "ascomycete" may be accompanied by the hint "fungus". Two input methods are supported (1) Uploading an image or (2) specifying an image URL. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong.

Parameters:

url - Publicly reachable URL of an image.
tagImageOptionalParameter - the object representing the optional parameters to be set before calling this API

Returns:

the TagResult object if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation
ComputerVisionErrorResponseException - thrown if the request is rejected by server
RuntimeException - all other wrapped checked exceptions if the request fails to be sent

tagImageAsync

public Observable tagImageAsync(String url, TagImageOptionalParameter tagImageOptionalParameter)

This operation generates a list of words, or tags, that are relevant to the content of the supplied image. The Computer Vision API can return tags based on objects, living beings, scenery or actions found in images. Unlike categories, tags are not organized according to a hierarchical classification system, but correspond to image content. Tags may contain hints to avoid ambiguity or provide context, for example the tag "ascomycete" may be accompanied by the hint "fungus". Two input methods are supported (1) Uploading an image or (2) specifying an image URL. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong.

Parameters:

url - Publicly reachable URL of an image.
tagImageOptionalParameter - the object representing the optional parameters to be set before calling this API

Returns:

the observable to the TagResult object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

tagImageInStream

public ComputerVisionTagImageInStreamDefinitionStages.WithImage tagImageInStream()

This operation generates a list of words, or tags, that are relevant to the content of the supplied image. The Computer Vision API can return tags based on objects, living beings, scenery or actions found in images. Unlike categories, tags are not organized according to a hierarchical classification system, but correspond to image content. Tags may contain hints to avoid ambiguity or provide context, for example the tag "ascomycete" may be accompanied by the hint "fungus". Two input methods are supported (1) Uploading an image or (2) specifying an image URL. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong.

Returns:

the first stage of the tagImageInStream call

tagImageInStream

public TagResult tagImageInStream(byte[] image, TagImageInStreamOptionalParameter tagImageInStreamOptionalParameter)

This operation generates a list of words, or tags, that are relevant to the content of the supplied image. The Computer Vision API can return tags based on objects, living beings, scenery or actions found in images. Unlike categories, tags are not organized according to a hierarchical classification system, but correspond to image content. Tags may contain hints to avoid ambiguity or provide context, for example the tag "ascomycete" may be accompanied by the hint "fungus". Two input methods are supported (1) Uploading an image or (2) specifying an image URL. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong.

Parameters:

image - An image stream.
tagImageInStreamOptionalParameter - the object representing the optional parameters to be set before calling this API

Returns:

the TagResult object if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation
ComputerVisionErrorResponseException - thrown if the request is rejected by server
RuntimeException - all other wrapped checked exceptions if the request fails to be sent

tagImageInStreamAsync

public Observable tagImageInStreamAsync(byte[] image, TagImageInStreamOptionalParameter tagImageInStreamOptionalParameter)

This operation generates a list of words, or tags, that are relevant to the content of the supplied image. The Computer Vision API can return tags based on objects, living beings, scenery or actions found in images. Unlike categories, tags are not organized according to a hierarchical classification system, but correspond to image content. Tags may contain hints to avoid ambiguity or provide context, for example the tag "ascomycete" may be accompanied by the hint "fungus". Two input methods are supported (1) Uploading an image or (2) specifying an image URL. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong.

Parameters:

image - An image stream.
tagImageInStreamOptionalParameter - the object representing the optional parameters to be set before calling this API

Returns:

the observable to the TagResult object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

Applies to