Interface ComputerVision

  • All Known Implementing Classes:
    ComputerVisionImpl

    public interface ComputerVision
    An instance of this class provides access to all the operations defined in ComputerVision.
    • Method Detail

      • readInStream

        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

        rx.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.​.
        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
      • readInStream

        ComputerVision.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
      • tagImageInStream

        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

        rx.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.
        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
      • tagImageInStream

        ComputerVision.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
      • recognizePrintedTextInStream

        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

        rx.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.
        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
      • recognizePrintedTextInStream

        ComputerVision.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
      • analyzeImageByDomainInStream

        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

        rx.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.
        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
      • analyzeImageByDomainInStream

        ComputerVision.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
      • generateThumbnailInStream

        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
        com.microsoft.azure.CloudException - thrown if the request is rejected by server
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent
      • generateThumbnailInStreamAsync

        rx.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.
        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
      • generateThumbnailInStream

        ComputerVision.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
      • detectObjectsInStream

        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

        rx.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.
        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
      • detectObjectsInStream

        ComputerVision.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
      • describeImageInStream

        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

        rx.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.
        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
      • describeImageInStream

        ComputerVision.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
      • getAreaOfInterestInStream

        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

        rx.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.
        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
      • getAreaOfInterestInStream

        ComputerVision.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
      • analyzeImageInStream

        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

        rx.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.
        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
      • analyzeImageInStream

        ComputerVision.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
      • getReadResult

        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

        rx.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.
        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
      • read

        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

        rx.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.​.
        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
      • read

        ComputerVision.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
      • getAreaOfInterest

        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

        rx.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.
        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
      • getAreaOfInterest

        ComputerVision.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
      • generateThumbnail

        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
        com.microsoft.azure.CloudException - thrown if the request is rejected by server
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent
      • generateThumbnailAsync

        rx.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.
        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
      • generateThumbnail

        ComputerVision.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
      • tagImage

        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

        rx.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.
        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
      • tagImage

        ComputerVision.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
      • recognizePrintedText

        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

        rx.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.
        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
      • recognizePrintedText

        ComputerVision.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
      • analyzeImageByDomain

        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

        rx.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.
        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
      • analyzeImageByDomain

        ComputerVision.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
      • listModels

        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

        rx.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.
        Returns:
        the observable to the ListModelsResult object
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • detectObjects

        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

        rx.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.
        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
      • detectObjects

        ComputerVision.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
      • describeImage

        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

        rx.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.
        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
      • describeImage

        ComputerVision.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
      • analyzeImage

        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

        rx.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.
        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
      • analyzeImage

        ComputerVision.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