Class ComputerVisionImpl

  • All Implemented Interfaces:
    ComputerVision

    public class ComputerVisionImpl
    extends Object
    implements ComputerVision
    An instance of this class provides access to all the operations defined in ComputerVision.
    • Constructor Detail

      • ComputerVisionImpl

        public ComputerVisionImpl​(retrofit2.Retrofit retrofit,
                                  ComputerVisionClientImpl client)
        Initializes an instance of ComputerVisionImpl.
        Parameters:
        retrofit - the Retrofit instance built from a Retrofit Builder.
        client - the instance of the service client containing this operation class.
    • Method Detail

      • 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.​.
        Specified by:
        readInStream in interface ComputerVision
        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 com.microsoft.rest.ServiceFuture<Void> readInStreamAsync​(byte[] image,
                                                                        ReadInStreamOptionalParameter readInStreamOptionalParameter,
                                                                        com.microsoft.rest.ServiceCallback<Void> serviceCallback)
        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
        serviceCallback - the async ServiceCallback to handle successful and failed responses.
        Returns:
        the ServiceFuture object
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • readInStreamAsync

        public 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.​.
        Specified by:
        readInStreamAsync in interface ComputerVision
        Parameters:
        image - An image stream.
        readInStreamOptionalParameter - the object representing the optional parameters to be set before calling this API
        Returns:
        the ServiceResponseWithHeaders object if successful.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • readInStreamWithServiceResponseAsync

        public rx.Observable<com.microsoft.rest.ServiceResponseWithHeaders<Void,​ReadInStreamHeaders>> readInStreamWithServiceResponseAsync​(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:
        the ServiceResponseWithHeaders object if successful.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • readInStreamWithServiceResponseAsync

        public rx.Observable<com.microsoft.rest.ServiceResponseWithHeaders<Void,​ReadInStreamHeaders>> readInStreamWithServiceResponseAsync​(byte[] image,
                                                                                                                                                 OcrDetectionLanguage language,
                                                                                                                                                 List<String> pages,
                                                                                                                                                 String modelVersion,
                                                                                                                                                 String readingOrder)
        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.
        language - The BCP-47 language code of the text in the document. Read supports auto language identification and multi-language documents, so only provide a language code if you would like to force the document to be processed in that specific language. See https://aka.ms/ocr-languages for list of supported languages. Possible values include: 'af', 'ast', 'bi', 'br', 'ca', 'ceb', 'ch', 'co', 'crh', 'cs', 'csb', 'da', 'de', 'en', 'es', 'et', 'eu', 'fi', 'fil', 'fj', 'fr', 'fur', 'fy', 'ga', 'gd', 'gil', 'gl', 'gv', 'hni', 'hsb', 'ht', 'hu', 'ia', 'id', 'it', 'iu', 'ja', 'jv', 'kaa', 'kac', 'kea', 'kha', 'kl', 'ko', 'ku', 'kw', 'lb', 'ms', 'mww', 'nap', 'nl', 'no', 'oc', 'pl', 'pt', 'quc', 'rm', 'sco', 'sl', 'sq', 'sv', 'sw', 'tet', 'tr', 'tt', 'uz', 'vo', 'wae', 'yua', 'za', 'zh-Hans', 'zh-Hant', 'zu'
        pages - Custom page numbers for multi-page documents(PDF/TIFF), input the number of the pages you want to get OCR result. For a range of pages, use a hyphen. Separate each page or range with a comma.
        modelVersion - Optional parameter to specify the version of the OCR model used for text extraction. Accepted values are: "latest", "latest-preview", "2021-04-12". Defaults to "latest".
        readingOrder - Optional parameter to specify which reading order algorithm should be applied when ordering the extract text elements. Can be either 'basic' or 'natural'. Will default to 'basic' if not specified
        Returns:
        the ServiceResponseWithHeaders object if successful.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • readInStream

        public com.microsoft.azure.cognitiveservices.vision.computervision.implementation.ComputerVisionImpl.ComputerVisionReadInStreamParameters readInStream()
        Description copied from interface: ComputerVision
        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.​.
        Specified by:
        readInStream in interface ComputerVision
        Returns:
        the first stage of the readInStream 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.
        Specified by:
        tagImageInStream in interface ComputerVision
        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 com.microsoft.rest.ServiceFuture<TagResult> tagImageInStreamAsync​(byte[] image,
                                                                                 TagImageInStreamOptionalParameter tagImageInStreamOptionalParameter,
                                                                                 com.microsoft.rest.ServiceCallback<TagResult> serviceCallback)
        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
        serviceCallback - the async ServiceCallback to handle successful and failed responses.
        Returns:
        the ServiceFuture object
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • tagImageInStreamAsync

        public 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.
        Specified by:
        tagImageInStreamAsync in interface ComputerVision
        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
      • tagImageInStreamWithServiceResponseAsync

        public rx.Observable<com.microsoft.rest.ServiceResponse<TagResult>> tagImageInStreamWithServiceResponseAsync​(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
      • tagImageInStreamWithServiceResponseAsync

        public rx.Observable<com.microsoft.rest.ServiceResponse<TagResult>> tagImageInStreamWithServiceResponseAsync​(byte[] image,
                                                                                                                     String language,
                                                                                                                     String modelVersion)
        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.
        language - The desired language for output generation. If this parameter is not specified, the default value is &quot;en&quot;.Supported languages:en - English, Default. es - Spanish, ja - Japanese, pt - Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es', 'ja', 'pt', 'zh'
        modelVersion - Optional parameter to specify the version of the AI model. Accepted values are: "latest", "2021-04-01". Defaults to "latest".
        Returns:
        the observable to the TagResult object
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • tagImageInStream

        public com.microsoft.azure.cognitiveservices.vision.computervision.implementation.ComputerVisionImpl.ComputerVisionTagImageInStreamParameters tagImageInStream()
        Description copied from interface: ComputerVision
        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.
        Specified by:
        tagImageInStream in interface ComputerVision
        Returns:
        the first stage of the tagImageInStream 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.
        Specified by:
        recognizePrintedTextInStream in interface ComputerVision
        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 com.microsoft.rest.ServiceFuture<OcrResult> recognizePrintedTextInStreamAsync​(boolean detectOrientation,
                                                                                             byte[] image,
                                                                                             RecognizePrintedTextInStreamOptionalParameter recognizePrintedTextInStreamOptionalParameter,
                                                                                             com.microsoft.rest.ServiceCallback<OcrResult> serviceCallback)
        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
        serviceCallback - the async ServiceCallback to handle successful and failed responses.
        Returns:
        the ServiceFuture object
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • recognizePrintedTextInStreamAsync

        public 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.
        Specified by:
        recognizePrintedTextInStreamAsync in interface ComputerVision
        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
      • recognizePrintedTextInStreamWithServiceResponseAsync

        public rx.Observable<com.microsoft.rest.ServiceResponse<OcrResult>> recognizePrintedTextInStreamWithServiceResponseAsync​(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
      • recognizePrintedTextInStreamWithServiceResponseAsync

        public rx.Observable<com.microsoft.rest.ServiceResponse<OcrResult>> recognizePrintedTextInStreamWithServiceResponseAsync​(boolean detectOrientation,
                                                                                                                                 byte[] image,
                                                                                                                                 OcrLanguages language,
                                                                                                                                 String modelVersion)
        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.
        language - The BCP-47 language code of the text to be detected in the image. The default value is 'unk'. Possible values include: 'unk', 'zh-Hans', 'zh-Hant', 'cs', 'da', 'nl', 'en', 'fi', 'fr', 'de', 'el', 'hu', 'it', 'ja', 'ko', 'nb', 'pl', 'pt', 'ru', 'es', 'sv', 'tr', 'ar', 'ro', 'sr-Cyrl', 'sr-Latn', 'sk'
        modelVersion - Optional parameter to specify the version of the AI model. Accepted values are: "latest", "2021-04-01". Defaults to "latest".
        Returns:
        the observable to the OcrResult object
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • recognizePrintedTextInStream

        public com.microsoft.azure.cognitiveservices.vision.computervision.implementation.ComputerVisionImpl.ComputerVisionRecognizePrintedTextInStreamParameters recognizePrintedTextInStream()
        Description copied from interface: ComputerVision
        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.
        Specified by:
        recognizePrintedTextInStream in interface ComputerVision
        Returns:
        the first stage of the recognizePrintedTextInStream 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.
        Specified by:
        analyzeImageByDomainInStream in interface ComputerVision
        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 com.microsoft.rest.ServiceFuture<DomainModelResults> analyzeImageByDomainInStreamAsync​(String model,
                                                                                                      byte[] image,
                                                                                                      AnalyzeImageByDomainInStreamOptionalParameter analyzeImageByDomainInStreamOptionalParameter,
                                                                                                      com.microsoft.rest.ServiceCallback<DomainModelResults> serviceCallback)
        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
        serviceCallback - the async ServiceCallback to handle successful and failed responses.
        Returns:
        the ServiceFuture object
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • analyzeImageByDomainInStreamAsync

        public 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.
        Specified by:
        analyzeImageByDomainInStreamAsync in interface ComputerVision
        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
      • analyzeImageByDomainInStreamWithServiceResponseAsync

        public rx.Observable<com.microsoft.rest.ServiceResponse<DomainModelResults>> analyzeImageByDomainInStreamWithServiceResponseAsync​(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
      • analyzeImageByDomainInStreamWithServiceResponseAsync

        public rx.Observable<com.microsoft.rest.ServiceResponse<DomainModelResults>> analyzeImageByDomainInStreamWithServiceResponseAsync​(String model,
                                                                                                                                          byte[] image,
                                                                                                                                          String language,
                                                                                                                                          String modelVersion)
        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.
        language - The desired language for output generation. If this parameter is not specified, the default value is &quot;en&quot;.Supported languages:en - English, Default. es - Spanish, ja - Japanese, pt - Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es', 'ja', 'pt', 'zh'
        modelVersion - Optional parameter to specify the version of the AI model. Accepted values are: "latest", "2021-04-01". Defaults to "latest".
        Returns:
        the observable to the DomainModelResults object
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • analyzeImageByDomainInStream

        public com.microsoft.azure.cognitiveservices.vision.computervision.implementation.ComputerVisionImpl.ComputerVisionAnalyzeImageByDomainInStreamParameters analyzeImageByDomainInStream()
        Description copied from interface: ComputerVision
        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.
        Specified by:
        analyzeImageByDomainInStream in interface ComputerVision
        Returns:
        the first stage of the analyzeImageByDomainInStream 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.
        Specified by:
        generateThumbnailInStream in interface ComputerVision
        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

        public com.microsoft.rest.ServiceFuture<InputStream> generateThumbnailInStreamAsync​(int width,
                                                                                            int height,
                                                                                            byte[] image,
                                                                                            GenerateThumbnailInStreamOptionalParameter generateThumbnailInStreamOptionalParameter,
                                                                                            com.microsoft.rest.ServiceCallback<InputStream> serviceCallback)
        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
        serviceCallback - the async ServiceCallback to handle successful and failed responses.
        Returns:
        the ServiceFuture object
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • generateThumbnailInStreamAsync

        public 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.
        Specified by:
        generateThumbnailInStreamAsync in interface ComputerVision
        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
      • generateThumbnailInStreamWithServiceResponseAsync

        public rx.Observable<com.microsoft.rest.ServiceResponse<InputStream>> generateThumbnailInStreamWithServiceResponseAsync​(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
      • generateThumbnailInStreamWithServiceResponseAsync

        public rx.Observable<com.microsoft.rest.ServiceResponse<InputStream>> generateThumbnailInStreamWithServiceResponseAsync​(int width,
                                                                                                                                int height,
                                                                                                                                byte[] image,
                                                                                                                                Boolean smartCropping,
                                                                                                                                String modelVersion)
        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.
        smartCropping - Boolean flag for enabling smart cropping.
        modelVersion - Optional parameter to specify the version of the AI model. Accepted values are: "latest", "2021-04-01". Defaults to "latest".
        Returns:
        the observable to the InputStream object
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • generateThumbnailInStream

        public com.microsoft.azure.cognitiveservices.vision.computervision.implementation.ComputerVisionImpl.ComputerVisionGenerateThumbnailInStreamParameters generateThumbnailInStream()
        Description copied from interface: ComputerVision
        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.
        Specified by:
        generateThumbnailInStream in interface ComputerVision
        Returns:
        the first stage of the generateThumbnailInStream 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.
        Specified by:
        detectObjectsInStream in interface ComputerVision
        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 com.microsoft.rest.ServiceFuture<DetectResult> detectObjectsInStreamAsync​(byte[] image,
                                                                                         DetectObjectsInStreamOptionalParameter detectObjectsInStreamOptionalParameter,
                                                                                         com.microsoft.rest.ServiceCallback<DetectResult> serviceCallback)
        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
        serviceCallback - the async ServiceCallback to handle successful and failed responses.
        Returns:
        the ServiceFuture object
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • detectObjectsInStreamAsync

        public 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.
        Specified by:
        detectObjectsInStreamAsync in interface ComputerVision
        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
      • detectObjectsInStreamWithServiceResponseAsync

        public rx.Observable<com.microsoft.rest.ServiceResponse<DetectResult>> detectObjectsInStreamWithServiceResponseAsync​(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
      • detectObjectsInStreamWithServiceResponseAsync

        public rx.Observable<com.microsoft.rest.ServiceResponse<DetectResult>> detectObjectsInStreamWithServiceResponseAsync​(byte[] image,
                                                                                                                             String modelVersion)
        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.
        modelVersion - Optional parameter to specify the version of the AI model. Accepted values are: "latest", "2021-04-01". Defaults to "latest".
        Returns:
        the observable to the DetectResult object
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • detectObjectsInStream

        public com.microsoft.azure.cognitiveservices.vision.computervision.implementation.ComputerVisionImpl.ComputerVisionDetectObjectsInStreamParameters detectObjectsInStream()
        Description copied from interface: ComputerVision
        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.
        Specified by:
        detectObjectsInStream in interface ComputerVision
        Returns:
        the first stage of the detectObjectsInStream 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.
        Specified by:
        describeImageInStream in interface ComputerVision
        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 com.microsoft.rest.ServiceFuture<ImageDescription> describeImageInStreamAsync​(byte[] image,
                                                                                             DescribeImageInStreamOptionalParameter describeImageInStreamOptionalParameter,
                                                                                             com.microsoft.rest.ServiceCallback<ImageDescription> serviceCallback)
        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
        serviceCallback - the async ServiceCallback to handle successful and failed responses.
        Returns:
        the ServiceFuture object
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • describeImageInStreamAsync

        public 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.
        Specified by:
        describeImageInStreamAsync in interface ComputerVision
        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
      • describeImageInStreamWithServiceResponseAsync

        public rx.Observable<com.microsoft.rest.ServiceResponse<ImageDescription>> describeImageInStreamWithServiceResponseAsync​(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
      • describeImageInStreamWithServiceResponseAsync

        public rx.Observable<com.microsoft.rest.ServiceResponse<ImageDescription>> describeImageInStreamWithServiceResponseAsync​(byte[] image,
                                                                                                                                 Integer maxCandidates,
                                                                                                                                 String language,
                                                                                                                                 List<DescriptionExclude> descriptionExclude,
                                                                                                                                 String modelVersion)
        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.
        maxCandidates - Maximum number of candidate descriptions to be returned. The default is 1.
        language - The desired language for output generation. If this parameter is not specified, the default value is &quot;en&quot;.Supported languages:en - English, Default. es - Spanish, ja - Japanese, pt - Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es', 'ja', 'pt', 'zh'
        descriptionExclude - Turn off specified domain models when generating the description.
        modelVersion - Optional parameter to specify the version of the AI model. Accepted values are: "latest", "2021-04-01". Defaults to "latest".
        Returns:
        the observable to the ImageDescription object
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • describeImageInStream

        public com.microsoft.azure.cognitiveservices.vision.computervision.implementation.ComputerVisionImpl.ComputerVisionDescribeImageInStreamParameters describeImageInStream()
        Description copied from interface: ComputerVision
        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.
        Specified by:
        describeImageInStream in interface ComputerVision
        Returns:
        the first stage of the describeImageInStream 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.
        Specified by:
        getAreaOfInterestInStream in interface ComputerVision
        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 com.microsoft.rest.ServiceFuture<AreaOfInterestResult> getAreaOfInterestInStreamAsync​(byte[] image,
                                                                                                     GetAreaOfInterestInStreamOptionalParameter getAreaOfInterestInStreamOptionalParameter,
                                                                                                     com.microsoft.rest.ServiceCallback<AreaOfInterestResult> serviceCallback)
        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
        serviceCallback - the async ServiceCallback to handle successful and failed responses.
        Returns:
        the ServiceFuture object
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • getAreaOfInterestInStreamAsync

        public 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.
        Specified by:
        getAreaOfInterestInStreamAsync in interface ComputerVision
        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
      • getAreaOfInterestInStreamWithServiceResponseAsync

        public rx.Observable<com.microsoft.rest.ServiceResponse<AreaOfInterestResult>> getAreaOfInterestInStreamWithServiceResponseAsync​(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
      • getAreaOfInterestInStreamWithServiceResponseAsync

        public rx.Observable<com.microsoft.rest.ServiceResponse<AreaOfInterestResult>> getAreaOfInterestInStreamWithServiceResponseAsync​(byte[] image,
                                                                                                                                         String modelVersion)
        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.
        modelVersion - Optional parameter to specify the version of the AI model. Accepted values are: "latest", "2021-04-01". Defaults to "latest".
        Returns:
        the observable to the AreaOfInterestResult object
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • getAreaOfInterestInStream

        public com.microsoft.azure.cognitiveservices.vision.computervision.implementation.ComputerVisionImpl.ComputerVisionGetAreaOfInterestInStreamParameters getAreaOfInterestInStream()
        Description copied from interface: ComputerVision
        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.
        Specified by:
        getAreaOfInterestInStream in interface ComputerVision
        Returns:
        the first stage of the getAreaOfInterestInStream 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.
        Specified by:
        analyzeImageInStream in interface ComputerVision
        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 com.microsoft.rest.ServiceFuture<ImageAnalysis> analyzeImageInStreamAsync​(byte[] image,
                                                                                         AnalyzeImageInStreamOptionalParameter analyzeImageInStreamOptionalParameter,
                                                                                         com.microsoft.rest.ServiceCallback<ImageAnalysis> serviceCallback)
        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
        serviceCallback - the async ServiceCallback to handle successful and failed responses.
        Returns:
        the ServiceFuture object
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • analyzeImageInStreamAsync

        public 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.
        Specified by:
        analyzeImageInStreamAsync in interface ComputerVision
        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
      • analyzeImageInStreamWithServiceResponseAsync

        public rx.Observable<com.microsoft.rest.ServiceResponse<ImageAnalysis>> analyzeImageInStreamWithServiceResponseAsync​(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
      • analyzeImageInStreamWithServiceResponseAsync

        public rx.Observable<com.microsoft.rest.ServiceResponse<ImageAnalysis>> analyzeImageInStreamWithServiceResponseAsync​(byte[] image,
                                                                                                                             List<VisualFeatureTypes> visualFeatures,
                                                                                                                             List<Details> details,
                                                                                                                             String language,
                                                                                                                             List<DescriptionExclude> descriptionExclude,
                                                                                                                             String modelVersion)
        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.
        visualFeatures - A string indicating what visual feature types to return. Multiple values should be comma-separated. Valid visual feature types include: Categories - categorizes image content according to a taxonomy defined in documentation. Tags - tags the image with a detailed list of words related to the image content. Description - describes the image content with a complete English sentence. Faces - detects if faces are present. If present, generate coordinates, gender and age. ImageType - detects if image is clipart or a line drawing. Color - determines the accent color, dominant color, and whether an image is black&white. Adult - detects if the image is pornographic in nature (depicts nudity or a sex act), or is gory (depicts extreme violence or blood). Sexually suggestive content (aka racy content) is also detected. Objects - detects various objects within an image, including the approximate location. The Objects argument is only available in English. Brands - detects various brands within an image, including the approximate location. The Brands argument is only available in English.
        details - A string indicating which domain-specific details to return. Multiple values should be comma-separated. Valid visual feature types include: Celebrities - identifies celebrities if detected in the image, Landmarks - identifies notable landmarks in the image.
        language - The desired language for output generation. If this parameter is not specified, the default value is &quot;en&quot;.Supported languages:en - English, Default. es - Spanish, ja - Japanese, pt - Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es', 'ja', 'pt', 'zh'
        descriptionExclude - Turn off specified domain models when generating the description.
        modelVersion - Optional parameter to specify the version of the AI model. Accepted values are: "latest", "2021-04-01". Defaults to "latest".
        Returns:
        the observable to the ImageAnalysis object
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • analyzeImageInStream

        public com.microsoft.azure.cognitiveservices.vision.computervision.implementation.ComputerVisionImpl.ComputerVisionAnalyzeImageInStreamParameters analyzeImageInStream()
        Description copied from interface: ComputerVision
        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.
        Specified by:
        analyzeImageInStream in interface ComputerVision
        Returns:
        the first stage of the analyzeImageInStream call
      • 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.
        Specified by:
        getReadResult in interface ComputerVision
        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 com.microsoft.rest.ServiceFuture<ReadOperationResult> getReadResultAsync​(UUID operationId,
                                                                                        com.microsoft.rest.ServiceCallback<ReadOperationResult> serviceCallback)
        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.
        serviceCallback - the async ServiceCallback to handle successful and failed responses.
        Returns:
        the ServiceFuture object
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • getReadResultAsync

        public 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.
        Specified by:
        getReadResultAsync in interface ComputerVision
        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
      • getReadResultWithServiceResponseAsync

        public rx.Observable<com.microsoft.rest.ServiceResponse<ReadOperationResult>> getReadResultWithServiceResponseAsync​(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

        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.​.
        Specified by:
        read in interface ComputerVision
        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 com.microsoft.rest.ServiceFuture<Void> readAsync​(String url,
                                                                ReadOptionalParameter readOptionalParameter,
                                                                com.microsoft.rest.ServiceCallback<Void> serviceCallback)
        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
        serviceCallback - the async ServiceCallback to handle successful and failed responses.
        Returns:
        the ServiceFuture object
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • readAsync

        public 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.​.
        Specified by:
        readAsync in interface ComputerVision
        Parameters:
        url - Publicly reachable URL of an image.
        readOptionalParameter - the object representing the optional parameters to be set before calling this API
        Returns:
        the ServiceResponseWithHeaders object if successful.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • readWithServiceResponseAsync

        public rx.Observable<com.microsoft.rest.ServiceResponseWithHeaders<Void,​ReadHeaders>> readWithServiceResponseAsync​(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:
        the ServiceResponseWithHeaders object if successful.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • readWithServiceResponseAsync

        public rx.Observable<com.microsoft.rest.ServiceResponseWithHeaders<Void,​ReadHeaders>> readWithServiceResponseAsync​(String url,
                                                                                                                                 OcrDetectionLanguage language,
                                                                                                                                 List<String> pages,
                                                                                                                                 String modelVersion,
                                                                                                                                 String readingOrder)
        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.
        language - The BCP-47 language code of the text in the document. Read supports auto language identification and multi-language documents, so only provide a language code if you would like to force the document to be processed in that specific language. See https://aka.ms/ocr-languages for list of supported languages. Possible values include: 'af', 'ast', 'bi', 'br', 'ca', 'ceb', 'ch', 'co', 'crh', 'cs', 'csb', 'da', 'de', 'en', 'es', 'et', 'eu', 'fi', 'fil', 'fj', 'fr', 'fur', 'fy', 'ga', 'gd', 'gil', 'gl', 'gv', 'hni', 'hsb', 'ht', 'hu', 'ia', 'id', 'it', 'iu', 'ja', 'jv', 'kaa', 'kac', 'kea', 'kha', 'kl', 'ko', 'ku', 'kw', 'lb', 'ms', 'mww', 'nap', 'nl', 'no', 'oc', 'pl', 'pt', 'quc', 'rm', 'sco', 'sl', 'sq', 'sv', 'sw', 'tet', 'tr', 'tt', 'uz', 'vo', 'wae', 'yua', 'za', 'zh-Hans', 'zh-Hant', 'zu'
        pages - Custom page numbers for multi-page documents(PDF/TIFF), input the number of the pages you want to get OCR result. For a range of pages, use a hyphen. Separate each page or range with a comma.
        modelVersion - Optional parameter to specify the version of the OCR model used for text extraction. Accepted values are: "latest", "latest-preview", "2021-04-12". Defaults to "latest".
        readingOrder - Optional parameter to specify which reading order algorithm should be applied when ordering the extract text elements. Can be either 'basic' or 'natural'. Will default to 'basic' if not specified
        Returns:
        the ServiceResponseWithHeaders object if successful.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • read

        public com.microsoft.azure.cognitiveservices.vision.computervision.implementation.ComputerVisionImpl.ComputerVisionReadParameters read()
        Description copied from interface: ComputerVision
        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.​.
        Specified by:
        read in interface ComputerVision
        Returns:
        the first stage of the read 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.
        Specified by:
        getAreaOfInterest in interface ComputerVision
        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 com.microsoft.rest.ServiceFuture<AreaOfInterestResult> getAreaOfInterestAsync​(String url,
                                                                                             GetAreaOfInterestOptionalParameter getAreaOfInterestOptionalParameter,
                                                                                             com.microsoft.rest.ServiceCallback<AreaOfInterestResult> serviceCallback)
        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
        serviceCallback - the async ServiceCallback to handle successful and failed responses.
        Returns:
        the ServiceFuture object
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • getAreaOfInterestAsync

        public 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.
        Specified by:
        getAreaOfInterestAsync in interface ComputerVision
        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
      • getAreaOfInterestWithServiceResponseAsync

        public rx.Observable<com.microsoft.rest.ServiceResponse<AreaOfInterestResult>> getAreaOfInterestWithServiceResponseAsync​(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
      • getAreaOfInterestWithServiceResponseAsync

        public rx.Observable<com.microsoft.rest.ServiceResponse<AreaOfInterestResult>> getAreaOfInterestWithServiceResponseAsync​(String url,
                                                                                                                                 String modelVersion)
        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.
        modelVersion - Optional parameter to specify the version of the AI model. Accepted values are: "latest", "2021-04-01". Defaults to "latest".
        Returns:
        the observable to the AreaOfInterestResult object
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • getAreaOfInterest

        public com.microsoft.azure.cognitiveservices.vision.computervision.implementation.ComputerVisionImpl.ComputerVisionGetAreaOfInterestParameters getAreaOfInterest()
        Description copied from interface: ComputerVision
        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.
        Specified by:
        getAreaOfInterest in interface ComputerVision
        Returns:
        the first stage of the getAreaOfInterest 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.
        Specified by:
        generateThumbnail in interface ComputerVision
        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

        public com.microsoft.rest.ServiceFuture<InputStream> generateThumbnailAsync​(int width,
                                                                                    int height,
                                                                                    String url,
                                                                                    GenerateThumbnailOptionalParameter generateThumbnailOptionalParameter,
                                                                                    com.microsoft.rest.ServiceCallback<InputStream> serviceCallback)
        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
        serviceCallback - the async ServiceCallback to handle successful and failed responses.
        Returns:
        the ServiceFuture object
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • generateThumbnailAsync

        public 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.
        Specified by:
        generateThumbnailAsync in interface ComputerVision
        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
      • generateThumbnailWithServiceResponseAsync

        public rx.Observable<com.microsoft.rest.ServiceResponse<InputStream>> generateThumbnailWithServiceResponseAsync​(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
      • generateThumbnailWithServiceResponseAsync

        public rx.Observable<com.microsoft.rest.ServiceResponse<InputStream>> generateThumbnailWithServiceResponseAsync​(int width,
                                                                                                                        int height,
                                                                                                                        String url,
                                                                                                                        Boolean smartCropping,
                                                                                                                        String modelVersion)
        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.
        smartCropping - Boolean flag for enabling smart cropping.
        modelVersion - Optional parameter to specify the version of the AI model. Accepted values are: "latest", "2021-04-01". Defaults to "latest".
        Returns:
        the observable to the InputStream object
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • generateThumbnail

        public com.microsoft.azure.cognitiveservices.vision.computervision.implementation.ComputerVisionImpl.ComputerVisionGenerateThumbnailParameters generateThumbnail()
        Description copied from interface: ComputerVision
        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.
        Specified by:
        generateThumbnail in interface ComputerVision
        Returns:
        the first stage of the generateThumbnail 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.
        Specified by:
        tagImage in interface ComputerVision
        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 com.microsoft.rest.ServiceFuture<TagResult> tagImageAsync​(String url,
                                                                         TagImageOptionalParameter tagImageOptionalParameter,
                                                                         com.microsoft.rest.ServiceCallback<TagResult> serviceCallback)
        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
        serviceCallback - the async ServiceCallback to handle successful and failed responses.
        Returns:
        the ServiceFuture object
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • tagImageAsync

        public 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.
        Specified by:
        tagImageAsync in interface ComputerVision
        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
      • tagImageWithServiceResponseAsync

        public rx.Observable<com.microsoft.rest.ServiceResponse<TagResult>> tagImageWithServiceResponseAsync​(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
      • tagImageWithServiceResponseAsync

        public rx.Observable<com.microsoft.rest.ServiceResponse<TagResult>> tagImageWithServiceResponseAsync​(String url,
                                                                                                             String language,
                                                                                                             String modelVersion)
        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.
        language - The desired language for output generation. If this parameter is not specified, the default value is &quot;en&quot;.Supported languages:en - English, Default. es - Spanish, ja - Japanese, pt - Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es', 'ja', 'pt', 'zh'
        modelVersion - Optional parameter to specify the version of the AI model. Accepted values are: "latest", "2021-04-01". Defaults to "latest".
        Returns:
        the observable to the TagResult object
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • tagImage

        public com.microsoft.azure.cognitiveservices.vision.computervision.implementation.ComputerVisionImpl.ComputerVisionTagImageParameters tagImage()
        Description copied from interface: ComputerVision
        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.
        Specified by:
        tagImage in interface ComputerVision
        Returns:
        the first stage of the tagImage 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.
        Specified by:
        recognizePrintedText in interface ComputerVision
        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 com.microsoft.rest.ServiceFuture<OcrResult> recognizePrintedTextAsync​(boolean detectOrientation,
                                                                                     String url,
                                                                                     RecognizePrintedTextOptionalParameter recognizePrintedTextOptionalParameter,
                                                                                     com.microsoft.rest.ServiceCallback<OcrResult> serviceCallback)
        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
        serviceCallback - the async ServiceCallback to handle successful and failed responses.
        Returns:
        the ServiceFuture object
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • recognizePrintedTextAsync

        public 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.
        Specified by:
        recognizePrintedTextAsync in interface ComputerVision
        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
      • recognizePrintedTextWithServiceResponseAsync

        public rx.Observable<com.microsoft.rest.ServiceResponse<OcrResult>> recognizePrintedTextWithServiceResponseAsync​(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
      • recognizePrintedTextWithServiceResponseAsync

        public rx.Observable<com.microsoft.rest.ServiceResponse<OcrResult>> recognizePrintedTextWithServiceResponseAsync​(boolean detectOrientation,
                                                                                                                         String url,
                                                                                                                         OcrLanguages language,
                                                                                                                         String modelVersion)
        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.
        language - The BCP-47 language code of the text to be detected in the image. The default value is 'unk'. Possible values include: 'unk', 'zh-Hans', 'zh-Hant', 'cs', 'da', 'nl', 'en', 'fi', 'fr', 'de', 'el', 'hu', 'it', 'ja', 'ko', 'nb', 'pl', 'pt', 'ru', 'es', 'sv', 'tr', 'ar', 'ro', 'sr-Cyrl', 'sr-Latn', 'sk'
        modelVersion - Optional parameter to specify the version of the AI model. Accepted values are: "latest", "2021-04-01". Defaults to "latest".
        Returns:
        the observable to the OcrResult object
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • recognizePrintedText

        public com.microsoft.azure.cognitiveservices.vision.computervision.implementation.ComputerVisionImpl.ComputerVisionRecognizePrintedTextParameters recognizePrintedText()
        Description copied from interface: ComputerVision
        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.
        Specified by:
        recognizePrintedText in interface ComputerVision
        Returns:
        the first stage of the recognizePrintedText 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.
        Specified by:
        analyzeImageByDomain in interface ComputerVision
        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 com.microsoft.rest.ServiceFuture<DomainModelResults> analyzeImageByDomainAsync​(String model,
                                                                                              String url,
                                                                                              AnalyzeImageByDomainOptionalParameter analyzeImageByDomainOptionalParameter,
                                                                                              com.microsoft.rest.ServiceCallback<DomainModelResults> serviceCallback)
        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
        serviceCallback - the async ServiceCallback to handle successful and failed responses.
        Returns:
        the ServiceFuture object
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • analyzeImageByDomainAsync

        public 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.
        Specified by:
        analyzeImageByDomainAsync in interface ComputerVision
        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
      • analyzeImageByDomainWithServiceResponseAsync

        public rx.Observable<com.microsoft.rest.ServiceResponse<DomainModelResults>> analyzeImageByDomainWithServiceResponseAsync​(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
      • analyzeImageByDomainWithServiceResponseAsync

        public rx.Observable<com.microsoft.rest.ServiceResponse<DomainModelResults>> analyzeImageByDomainWithServiceResponseAsync​(String model,
                                                                                                                                  String url,
                                                                                                                                  String language,
                                                                                                                                  String modelVersion)
        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.
        language - The desired language for output generation. If this parameter is not specified, the default value is &quot;en&quot;.Supported languages:en - English, Default. es - Spanish, ja - Japanese, pt - Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es', 'ja', 'pt', 'zh'
        modelVersion - Optional parameter to specify the version of the AI model. Accepted values are: "latest", "2021-04-01". Defaults to "latest".
        Returns:
        the observable to the DomainModelResults object
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • analyzeImageByDomain

        public com.microsoft.azure.cognitiveservices.vision.computervision.implementation.ComputerVisionImpl.ComputerVisionAnalyzeImageByDomainParameters analyzeImageByDomain()
        Description copied from interface: ComputerVision
        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.
        Specified by:
        analyzeImageByDomain in interface ComputerVision
        Returns:
        the first stage of the analyzeImageByDomain call
      • 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.
        Specified by:
        listModels in interface ComputerVision
        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 com.microsoft.rest.ServiceFuture<ListModelsResult> listModelsAsync​(com.microsoft.rest.ServiceCallback<ListModelsResult> serviceCallback)
        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.
        Parameters:
        serviceCallback - the async ServiceCallback to handle successful and failed responses.
        Returns:
        the ServiceFuture object
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • listModelsAsync

        public 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.
        Specified by:
        listModelsAsync in interface ComputerVision
        Returns:
        the observable to the ListModelsResult object
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • listModelsWithServiceResponseAsync

        public rx.Observable<com.microsoft.rest.ServiceResponse<ListModelsResult>> listModelsWithServiceResponseAsync()
        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

        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.
        Specified by:
        detectObjects in interface ComputerVision
        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 com.microsoft.rest.ServiceFuture<DetectResult> detectObjectsAsync​(String url,
                                                                                 DetectObjectsOptionalParameter detectObjectsOptionalParameter,
                                                                                 com.microsoft.rest.ServiceCallback<DetectResult> serviceCallback)
        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
        serviceCallback - the async ServiceCallback to handle successful and failed responses.
        Returns:
        the ServiceFuture object
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • detectObjectsAsync

        public 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.
        Specified by:
        detectObjectsAsync in interface ComputerVision
        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
      • detectObjectsWithServiceResponseAsync

        public rx.Observable<com.microsoft.rest.ServiceResponse<DetectResult>> detectObjectsWithServiceResponseAsync​(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
      • detectObjectsWithServiceResponseAsync

        public rx.Observable<com.microsoft.rest.ServiceResponse<DetectResult>> detectObjectsWithServiceResponseAsync​(String url,
                                                                                                                     String modelVersion)
        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.
        modelVersion - Optional parameter to specify the version of the AI model. Accepted values are: "latest", "2021-04-01". Defaults to "latest".
        Returns:
        the observable to the DetectResult object
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • detectObjects

        public com.microsoft.azure.cognitiveservices.vision.computervision.implementation.ComputerVisionImpl.ComputerVisionDetectObjectsParameters detectObjects()
        Description copied from interface: ComputerVision
        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.
        Specified by:
        detectObjects in interface ComputerVision
        Returns:
        the first stage of the detectObjects 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.
        Specified by:
        describeImage in interface ComputerVision
        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 com.microsoft.rest.ServiceFuture<ImageDescription> describeImageAsync​(String url,
                                                                                     DescribeImageOptionalParameter describeImageOptionalParameter,
                                                                                     com.microsoft.rest.ServiceCallback<ImageDescription> serviceCallback)
        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
        serviceCallback - the async ServiceCallback to handle successful and failed responses.
        Returns:
        the ServiceFuture object
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • describeImageAsync

        public 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.
        Specified by:
        describeImageAsync in interface ComputerVision
        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
      • describeImageWithServiceResponseAsync

        public rx.Observable<com.microsoft.rest.ServiceResponse<ImageDescription>> describeImageWithServiceResponseAsync​(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
      • describeImageWithServiceResponseAsync

        public rx.Observable<com.microsoft.rest.ServiceResponse<ImageDescription>> describeImageWithServiceResponseAsync​(String url,
                                                                                                                         Integer maxCandidates,
                                                                                                                         String language,
                                                                                                                         List<DescriptionExclude> descriptionExclude,
                                                                                                                         String modelVersion)
        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.
        maxCandidates - Maximum number of candidate descriptions to be returned. The default is 1.
        language - The desired language for output generation. If this parameter is not specified, the default value is &quot;en&quot;.Supported languages:en - English, Default. es - Spanish, ja - Japanese, pt - Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es', 'ja', 'pt', 'zh'
        descriptionExclude - Turn off specified domain models when generating the description.
        modelVersion - Optional parameter to specify the version of the AI model. Accepted values are: "latest", "2021-04-01". Defaults to "latest".
        Returns:
        the observable to the ImageDescription object
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • describeImage

        public com.microsoft.azure.cognitiveservices.vision.computervision.implementation.ComputerVisionImpl.ComputerVisionDescribeImageParameters describeImage()
        Description copied from interface: ComputerVision
        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.
        Specified by:
        describeImage in interface ComputerVision
        Returns:
        the first stage of the describeImage 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.
        Specified by:
        analyzeImage in interface ComputerVision
        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 com.microsoft.rest.ServiceFuture<ImageAnalysis> analyzeImageAsync​(String url,
                                                                                 AnalyzeImageOptionalParameter analyzeImageOptionalParameter,
                                                                                 com.microsoft.rest.ServiceCallback<ImageAnalysis> serviceCallback)
        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
        serviceCallback - the async ServiceCallback to handle successful and failed responses.
        Returns:
        the ServiceFuture object
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • analyzeImageAsync

        public 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.
        Specified by:
        analyzeImageAsync in interface ComputerVision
        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
      • analyzeImageWithServiceResponseAsync

        public rx.Observable<com.microsoft.rest.ServiceResponse<ImageAnalysis>> analyzeImageWithServiceResponseAsync​(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
      • analyzeImageWithServiceResponseAsync

        public rx.Observable<com.microsoft.rest.ServiceResponse<ImageAnalysis>> analyzeImageWithServiceResponseAsync​(String url,
                                                                                                                     List<VisualFeatureTypes> visualFeatures,
                                                                                                                     List<Details> details,
                                                                                                                     String language,
                                                                                                                     List<DescriptionExclude> descriptionExclude,
                                                                                                                     String modelVersion)
        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.
        visualFeatures - A string indicating what visual feature types to return. Multiple values should be comma-separated. Valid visual feature types include: Categories - categorizes image content according to a taxonomy defined in documentation. Tags - tags the image with a detailed list of words related to the image content. Description - describes the image content with a complete English sentence. Faces - detects if faces are present. If present, generate coordinates, gender and age. ImageType - detects if image is clipart or a line drawing. Color - determines the accent color, dominant color, and whether an image is black&white. Adult - detects if the image is pornographic in nature (depicts nudity or a sex act), or is gory (depicts extreme violence or blood). Sexually suggestive content (aka racy content) is also detected. Objects - detects various objects within an image, including the approximate location. The Objects argument is only available in English. Brands - detects various brands within an image, including the approximate location. The Brands argument is only available in English.
        details - A string indicating which domain-specific details to return. Multiple values should be comma-separated. Valid visual feature types include: Celebrities - identifies celebrities if detected in the image, Landmarks - identifies notable landmarks in the image.
        language - The desired language for output generation. If this parameter is not specified, the default value is &quot;en&quot;.Supported languages:en - English, Default. es - Spanish, ja - Japanese, pt - Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es', 'ja', 'pt', 'zh'
        descriptionExclude - Turn off specified domain models when generating the description.
        modelVersion - Optional parameter to specify the version of the AI model. Accepted values are: "latest", "2021-04-01". Defaults to "latest".
        Returns:
        the observable to the ImageAnalysis object
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • analyzeImage

        public com.microsoft.azure.cognitiveservices.vision.computervision.implementation.ComputerVisionImpl.ComputerVisionAnalyzeImageParameters analyzeImage()
        Description copied from interface: ComputerVision
        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.
        Specified by:
        analyzeImage in interface ComputerVision
        Returns:
        the first stage of the analyzeImage call