ComputerVisionClient class

Extends

Constructors

ComputerVisionClient(ServiceClientCredentials, string, msRest.ServiceClientOptions)

Initializes a new instance of the ComputerVisionClient class.

Properties

credentials
endpoint

Methods

analyzeImage(string, ComputerVisionClientAnalyzeImageOptionalParams, ServiceCallback<ImageAnalysis>)
analyzeImage(string, Models.ComputerVisionClientAnalyzeImageOptionalParams)

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.

analyzeImage(string, ServiceCallback<ImageAnalysis>)
analyzeImageByDomain(string, string, ComputerVisionClientAnalyzeImageByDomainOptionalParams, ServiceCallback<DomainModelResults>)
analyzeImageByDomain(string, string, Models.ComputerVisionClientAnalyzeImageByDomainOptionalParams)

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.

analyzeImageByDomain(string, string, ServiceCallback<DomainModelResults>)
analyzeImageByDomainInStream(string, msRest.HttpRequestBody, ComputerVisionClientAnalyzeImageByDomainInStreamOptionalParams, ServiceCallback<DomainModelResults>)
analyzeImageByDomainInStream(string, msRest.HttpRequestBody, Models.ComputerVisionClientAnalyzeImageByDomainInStreamOptionalParams)

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.

analyzeImageByDomainInStream(string, msRest.HttpRequestBody, ServiceCallback<DomainModelResults>)
analyzeImageInStream(msRest.HttpRequestBody, ComputerVisionClientAnalyzeImageInStreamOptionalParams, ServiceCallback<ImageAnalysis>)
analyzeImageInStream(msRest.HttpRequestBody, Models.ComputerVisionClientAnalyzeImageInStreamOptionalParams)

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.

analyzeImageInStream(msRest.HttpRequestBody, ServiceCallback<ImageAnalysis>)
describeImage(string, ComputerVisionClientDescribeImageOptionalParams, ServiceCallback<ImageDescription>)
describeImage(string, Models.ComputerVisionClientDescribeImageOptionalParams)

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.

describeImage(string, ServiceCallback<ImageDescription>)
describeImageInStream(msRest.HttpRequestBody, ComputerVisionClientDescribeImageInStreamOptionalParams, ServiceCallback<ImageDescription>)
describeImageInStream(msRest.HttpRequestBody, Models.ComputerVisionClientDescribeImageInStreamOptionalParams)

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.

describeImageInStream(msRest.HttpRequestBody, ServiceCallback<ImageDescription>)
detectObjects(string, ComputerVisionClientDetectObjectsOptionalParams, ServiceCallback<DetectResult>)
detectObjects(string, Models.ComputerVisionClientDetectObjectsOptionalParams)

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.

detectObjects(string, ServiceCallback<DetectResult>)
detectObjectsInStream(msRest.HttpRequestBody, ComputerVisionClientDetectObjectsInStreamOptionalParams, ServiceCallback<DetectResult>)
detectObjectsInStream(msRest.HttpRequestBody, Models.ComputerVisionClientDetectObjectsInStreamOptionalParams)

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.

detectObjectsInStream(msRest.HttpRequestBody, ServiceCallback<DetectResult>)
generateThumbnail(number, number, string, ComputerVisionClientGenerateThumbnailOptionalParams, ServiceCallback<void>)
generateThumbnail(number, number, string, Models.ComputerVisionClientGenerateThumbnailOptionalParams)

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.

generateThumbnail(number, number, string, ServiceCallback<void>)
generateThumbnailInStream(number, number, msRest.HttpRequestBody, ComputerVisionClientGenerateThumbnailInStreamOptionalParams, ServiceCallback<void>)
generateThumbnailInStream(number, number, msRest.HttpRequestBody, Models.ComputerVisionClientGenerateThumbnailInStreamOptionalParams)

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.

generateThumbnailInStream(number, number, msRest.HttpRequestBody, ServiceCallback<void>)
getAreaOfInterest(string, ComputerVisionClientGetAreaOfInterestOptionalParams, ServiceCallback<AreaOfInterestResult>)
getAreaOfInterest(string, Models.ComputerVisionClientGetAreaOfInterestOptionalParams)

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.

getAreaOfInterest(string, ServiceCallback<AreaOfInterestResult>)
getAreaOfInterestInStream(msRest.HttpRequestBody, ComputerVisionClientGetAreaOfInterestInStreamOptionalParams, ServiceCallback<AreaOfInterestResult>)
getAreaOfInterestInStream(msRest.HttpRequestBody, Models.ComputerVisionClientGetAreaOfInterestInStreamOptionalParams)

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.

getAreaOfInterestInStream(msRest.HttpRequestBody, ServiceCallback<AreaOfInterestResult>)
getReadResult(string, msRest.RequestOptionsBase)

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.

getReadResult(string, RequestOptionsBase, ServiceCallback<ReadOperationResult>)
getReadResult(string, ServiceCallback<ReadOperationResult>)
listModels(msRest.RequestOptionsBase)

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.

listModels(RequestOptionsBase, ServiceCallback<ListModelsResult>)
listModels(ServiceCallback<ListModelsResult>)
read(string, ComputerVisionClientReadOptionalParams, ServiceCallback<void>)
read(string, Models.ComputerVisionClientReadOptionalParams)

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

read(string, ServiceCallback<void>)
readInStream(msRest.HttpRequestBody, ComputerVisionClientReadInStreamOptionalParams, ServiceCallback<void>)
readInStream(msRest.HttpRequestBody, Models.ComputerVisionClientReadInStreamOptionalParams)

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

readInStream(msRest.HttpRequestBody, ServiceCallback<void>)
recognizePrintedText(boolean, string, ComputerVisionClientRecognizePrintedTextOptionalParams, ServiceCallback<OcrResult>)
recognizePrintedText(boolean, string, Models.ComputerVisionClientRecognizePrintedTextOptionalParams)

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.

recognizePrintedText(boolean, string, ServiceCallback<OcrResult>)
recognizePrintedTextInStream(boolean, msRest.HttpRequestBody, ComputerVisionClientRecognizePrintedTextInStreamOptionalParams, ServiceCallback<OcrResult>)
recognizePrintedTextInStream(boolean, msRest.HttpRequestBody, Models.ComputerVisionClientRecognizePrintedTextInStreamOptionalParams)

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.

recognizePrintedTextInStream(boolean, msRest.HttpRequestBody, ServiceCallback<OcrResult>)
sendOperationRequest(OperationArguments, OperationSpec, ServiceCallback<any>)

Send an HTTP request that is populated using the provided OperationSpec.

sendRequest(RequestPrepareOptions | WebResourceLike)

Send the provided httpRequest.

tagImage(string, ComputerVisionClientTagImageOptionalParams, ServiceCallback<TagResult>)
tagImage(string, Models.ComputerVisionClientTagImageOptionalParams)

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.

tagImage(string, ServiceCallback<TagResult>)
tagImageInStream(msRest.HttpRequestBody, ComputerVisionClientTagImageInStreamOptionalParams, ServiceCallback<TagResult>)
tagImageInStream(msRest.HttpRequestBody, Models.ComputerVisionClientTagImageInStreamOptionalParams)

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.

tagImageInStream(msRest.HttpRequestBody, ServiceCallback<TagResult>)

Constructor Details

ComputerVisionClient(ServiceClientCredentials, string, msRest.ServiceClientOptions)

Initializes a new instance of the ComputerVisionClient class.

new ComputerVisionClient(credentials: ServiceClientCredentials, endpoint: string, options?: msRest.ServiceClientOptions)

Parameters

credentials

ServiceClientCredentials

Subscription credentials which uniquely identify client subscription.

endpoint

string

Supported Cognitive Services endpoints.

options
msRest.ServiceClientOptions

Property Details

credentials

credentials: ServiceClientCredentials

Property Value

ServiceClientCredentials

endpoint

endpoint: string

Property Value

string

Method Details

analyzeImage(string, ComputerVisionClientAnalyzeImageOptionalParams, ServiceCallback<ImageAnalysis>)

function analyzeImage(url: string, options: ComputerVisionClientAnalyzeImageOptionalParams, callback: ServiceCallback<ImageAnalysis>)

Parameters

url

string

Publicly reachable URL of an image.

options
ComputerVisionClientAnalyzeImageOptionalParams

The optional parameters

callback

ServiceCallback<ImageAnalysis>

The callback

analyzeImage(string, Models.ComputerVisionClientAnalyzeImageOptionalParams)

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.

function analyzeImage(url: string, options?: Models.ComputerVisionClientAnalyzeImageOptionalParams)

Parameters

url

string

Publicly reachable URL of an image.

options
Models.ComputerVisionClientAnalyzeImageOptionalParams

Returns

Promise<Models.AnalyzeImageResponse>

Promise<Models.AnalyzeImageResponse>

analyzeImage(string, ServiceCallback<ImageAnalysis>)

function analyzeImage(url: string, callback: ServiceCallback<ImageAnalysis>)

Parameters

url

string

Publicly reachable URL of an image.

callback

ServiceCallback<ImageAnalysis>

The callback

analyzeImageByDomain(string, string, ComputerVisionClientAnalyzeImageByDomainOptionalParams, ServiceCallback<DomainModelResults>)

function analyzeImageByDomain(model: string, url: string, options: ComputerVisionClientAnalyzeImageByDomainOptionalParams, callback: ServiceCallback<DomainModelResults>)

Parameters

model

string

The domain-specific content to recognize.

url

string

Publicly reachable URL of an image.

callback

ServiceCallback<DomainModelResults>

The callback

analyzeImageByDomain(string, string, Models.ComputerVisionClientAnalyzeImageByDomainOptionalParams)

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.

function analyzeImageByDomain(model: string, url: string, options?: Models.ComputerVisionClientAnalyzeImageByDomainOptionalParams)

Parameters

model

string

The domain-specific content to recognize.

url

string

Publicly reachable URL of an image.

options
Models.ComputerVisionClientAnalyzeImageByDomainOptionalParams

Returns

Promise<Models.AnalyzeImageByDomainResponse>

Promise<Models.AnalyzeImageByDomainResponse>

analyzeImageByDomain(string, string, ServiceCallback<DomainModelResults>)

function analyzeImageByDomain(model: string, url: string, callback: ServiceCallback<DomainModelResults>)

Parameters

model

string

The domain-specific content to recognize.

url

string

Publicly reachable URL of an image.

callback

ServiceCallback<DomainModelResults>

The callback

analyzeImageByDomainInStream(string, msRest.HttpRequestBody, ComputerVisionClientAnalyzeImageByDomainInStreamOptionalParams, ServiceCallback<DomainModelResults>)

function analyzeImageByDomainInStream(model: string, image: msRest.HttpRequestBody, options: ComputerVisionClientAnalyzeImageByDomainInStreamOptionalParams, callback: ServiceCallback<DomainModelResults>)

Parameters

model

string

The domain-specific content to recognize.

image
msRest.HttpRequestBody

An image stream.

callback

ServiceCallback<DomainModelResults>

The callback

analyzeImageByDomainInStream(string, msRest.HttpRequestBody, Models.ComputerVisionClientAnalyzeImageByDomainInStreamOptionalParams)

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.

function analyzeImageByDomainInStream(model: string, image: msRest.HttpRequestBody, options?: Models.ComputerVisionClientAnalyzeImageByDomainInStreamOptionalParams)

Parameters

model

string

The domain-specific content to recognize.

image
msRest.HttpRequestBody

An image stream.

options
Models.ComputerVisionClientAnalyzeImageByDomainInStreamOptionalParams

Returns

Promise<Models.AnalyzeImageByDomainInStreamResponse>

Promise<Models.AnalyzeImageByDomainInStreamResponse>

analyzeImageByDomainInStream(string, msRest.HttpRequestBody, ServiceCallback<DomainModelResults>)

function analyzeImageByDomainInStream(model: string, image: msRest.HttpRequestBody, callback: ServiceCallback<DomainModelResults>)

Parameters

model

string

The domain-specific content to recognize.

image
msRest.HttpRequestBody

An image stream.

callback

ServiceCallback<DomainModelResults>

The callback

analyzeImageInStream(msRest.HttpRequestBody, ComputerVisionClientAnalyzeImageInStreamOptionalParams, ServiceCallback<ImageAnalysis>)

function analyzeImageInStream(image: msRest.HttpRequestBody, options: ComputerVisionClientAnalyzeImageInStreamOptionalParams, callback: ServiceCallback<ImageAnalysis>)

Parameters

image
msRest.HttpRequestBody

An image stream.

callback

ServiceCallback<ImageAnalysis>

The callback

analyzeImageInStream(msRest.HttpRequestBody, Models.ComputerVisionClientAnalyzeImageInStreamOptionalParams)

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.

function analyzeImageInStream(image: msRest.HttpRequestBody, options?: Models.ComputerVisionClientAnalyzeImageInStreamOptionalParams)

Parameters

image
msRest.HttpRequestBody

An image stream.

options
Models.ComputerVisionClientAnalyzeImageInStreamOptionalParams

Returns

Promise<Models.AnalyzeImageInStreamResponse>

Promise<Models.AnalyzeImageInStreamResponse>

analyzeImageInStream(msRest.HttpRequestBody, ServiceCallback<ImageAnalysis>)

function analyzeImageInStream(image: msRest.HttpRequestBody, callback: ServiceCallback<ImageAnalysis>)

Parameters

image
msRest.HttpRequestBody

An image stream.

callback

ServiceCallback<ImageAnalysis>

The callback

describeImage(string, ComputerVisionClientDescribeImageOptionalParams, ServiceCallback<ImageDescription>)

function describeImage(url: string, options: ComputerVisionClientDescribeImageOptionalParams, callback: ServiceCallback<ImageDescription>)

Parameters

url

string

Publicly reachable URL of an image.

options
ComputerVisionClientDescribeImageOptionalParams

The optional parameters

callback

ServiceCallback<ImageDescription>

The callback

describeImage(string, Models.ComputerVisionClientDescribeImageOptionalParams)

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.

function describeImage(url: string, options?: Models.ComputerVisionClientDescribeImageOptionalParams)

Parameters

url

string

Publicly reachable URL of an image.

options
Models.ComputerVisionClientDescribeImageOptionalParams

Returns

Promise<Models.DescribeImageResponse>

Promise<Models.DescribeImageResponse>

describeImage(string, ServiceCallback<ImageDescription>)

function describeImage(url: string, callback: ServiceCallback<ImageDescription>)

Parameters

url

string

Publicly reachable URL of an image.

callback

ServiceCallback<ImageDescription>

The callback

describeImageInStream(msRest.HttpRequestBody, ComputerVisionClientDescribeImageInStreamOptionalParams, ServiceCallback<ImageDescription>)

function describeImageInStream(image: msRest.HttpRequestBody, options: ComputerVisionClientDescribeImageInStreamOptionalParams, callback: ServiceCallback<ImageDescription>)

Parameters

image
msRest.HttpRequestBody

An image stream.

callback

ServiceCallback<ImageDescription>

The callback

describeImageInStream(msRest.HttpRequestBody, Models.ComputerVisionClientDescribeImageInStreamOptionalParams)

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.

function describeImageInStream(image: msRest.HttpRequestBody, options?: Models.ComputerVisionClientDescribeImageInStreamOptionalParams)

Parameters

image
msRest.HttpRequestBody

An image stream.

options
Models.ComputerVisionClientDescribeImageInStreamOptionalParams

Returns

Promise<Models.DescribeImageInStreamResponse>

Promise<Models.DescribeImageInStreamResponse>

describeImageInStream(msRest.HttpRequestBody, ServiceCallback<ImageDescription>)

function describeImageInStream(image: msRest.HttpRequestBody, callback: ServiceCallback<ImageDescription>)

Parameters

image
msRest.HttpRequestBody

An image stream.

callback

ServiceCallback<ImageDescription>

The callback

detectObjects(string, ComputerVisionClientDetectObjectsOptionalParams, ServiceCallback<DetectResult>)

function detectObjects(url: string, options: ComputerVisionClientDetectObjectsOptionalParams, callback: ServiceCallback<DetectResult>)

Parameters

url

string

Publicly reachable URL of an image.

options
ComputerVisionClientDetectObjectsOptionalParams

The optional parameters

callback

ServiceCallback<DetectResult>

The callback

detectObjects(string, Models.ComputerVisionClientDetectObjectsOptionalParams)

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.

function detectObjects(url: string, options?: Models.ComputerVisionClientDetectObjectsOptionalParams)

Parameters

url

string

Publicly reachable URL of an image.

options
Models.ComputerVisionClientDetectObjectsOptionalParams

Returns

Promise<Models.DetectObjectsResponse>

Promise<Models.DetectObjectsResponse>

detectObjects(string, ServiceCallback<DetectResult>)

function detectObjects(url: string, callback: ServiceCallback<DetectResult>)

Parameters

url

string

Publicly reachable URL of an image.

callback

ServiceCallback<DetectResult>

The callback

detectObjectsInStream(msRest.HttpRequestBody, ComputerVisionClientDetectObjectsInStreamOptionalParams, ServiceCallback<DetectResult>)

function detectObjectsInStream(image: msRest.HttpRequestBody, options: ComputerVisionClientDetectObjectsInStreamOptionalParams, callback: ServiceCallback<DetectResult>)

Parameters

image
msRest.HttpRequestBody

An image stream.

callback

ServiceCallback<DetectResult>

The callback

detectObjectsInStream(msRest.HttpRequestBody, Models.ComputerVisionClientDetectObjectsInStreamOptionalParams)

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.

function detectObjectsInStream(image: msRest.HttpRequestBody, options?: Models.ComputerVisionClientDetectObjectsInStreamOptionalParams)

Parameters

image
msRest.HttpRequestBody

An image stream.

options
Models.ComputerVisionClientDetectObjectsInStreamOptionalParams

Returns

Promise<Models.DetectObjectsInStreamResponse>

Promise<Models.DetectObjectsInStreamResponse>

detectObjectsInStream(msRest.HttpRequestBody, ServiceCallback<DetectResult>)

function detectObjectsInStream(image: msRest.HttpRequestBody, callback: ServiceCallback<DetectResult>)

Parameters

image
msRest.HttpRequestBody

An image stream.

callback

ServiceCallback<DetectResult>

The callback

generateThumbnail(number, number, string, ComputerVisionClientGenerateThumbnailOptionalParams, ServiceCallback<void>)

function generateThumbnail(width: number, height: number, url: string, options: ComputerVisionClientGenerateThumbnailOptionalParams, callback: ServiceCallback<void>)

Parameters

width

number

Width of the thumbnail, in pixels. It must be between 1 and 1024. Recommended minimum of 50.

height

number

Height of the thumbnail, in pixels. It must be between 1 and 1024. Recommended minimum of 50.

url

string

Publicly reachable URL of an image.

options
ComputerVisionClientGenerateThumbnailOptionalParams

The optional parameters

callback

ServiceCallback<void>

The callback

generateThumbnail(number, number, string, Models.ComputerVisionClientGenerateThumbnailOptionalParams)

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.

function generateThumbnail(width: number, height: number, url: string, options?: Models.ComputerVisionClientGenerateThumbnailOptionalParams)

Parameters

width

number

Width of the thumbnail, in pixels. It must be between 1 and 1024. Recommended minimum of 50.

height

number

Height of the thumbnail, in pixels. It must be between 1 and 1024. Recommended minimum of 50.

url

string

Publicly reachable URL of an image.

options
Models.ComputerVisionClientGenerateThumbnailOptionalParams

Returns

Promise<Models.GenerateThumbnailResponse>

Promise<Models.GenerateThumbnailResponse>

generateThumbnail(number, number, string, ServiceCallback<void>)

function generateThumbnail(width: number, height: number, url: string, callback: ServiceCallback<void>)

Parameters

width

number

Width of the thumbnail, in pixels. It must be between 1 and 1024. Recommended minimum of 50.

height

number

Height of the thumbnail, in pixels. It must be between 1 and 1024. Recommended minimum of 50.

url

string

Publicly reachable URL of an image.

callback

ServiceCallback<void>

The callback

generateThumbnailInStream(number, number, msRest.HttpRequestBody, ComputerVisionClientGenerateThumbnailInStreamOptionalParams, ServiceCallback<void>)

function generateThumbnailInStream(width: number, height: number, image: msRest.HttpRequestBody, options: ComputerVisionClientGenerateThumbnailInStreamOptionalParams, callback: ServiceCallback<void>)

Parameters

width

number

Width of the thumbnail, in pixels. It must be between 1 and 1024. Recommended minimum of 50.

height

number

Height of the thumbnail, in pixels. It must be between 1 and 1024. Recommended minimum of 50.

image
msRest.HttpRequestBody

An image stream.

callback

ServiceCallback<void>

The callback

generateThumbnailInStream(number, number, msRest.HttpRequestBody, Models.ComputerVisionClientGenerateThumbnailInStreamOptionalParams)

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.

function generateThumbnailInStream(width: number, height: number, image: msRest.HttpRequestBody, options?: Models.ComputerVisionClientGenerateThumbnailInStreamOptionalParams)

Parameters

width

number

Width of the thumbnail, in pixels. It must be between 1 and 1024. Recommended minimum of 50.

height

number

Height of the thumbnail, in pixels. It must be between 1 and 1024. Recommended minimum of 50.

image
msRest.HttpRequestBody

An image stream.

options
Models.ComputerVisionClientGenerateThumbnailInStreamOptionalParams

Returns

Promise<Models.GenerateThumbnailInStreamResponse>

Promise<Models.GenerateThumbnailInStreamResponse>

generateThumbnailInStream(number, number, msRest.HttpRequestBody, ServiceCallback<void>)

function generateThumbnailInStream(width: number, height: number, image: msRest.HttpRequestBody, callback: ServiceCallback<void>)

Parameters

width

number

Width of the thumbnail, in pixels. It must be between 1 and 1024. Recommended minimum of 50.

height

number

Height of the thumbnail, in pixels. It must be between 1 and 1024. Recommended minimum of 50.

image
msRest.HttpRequestBody

An image stream.

callback

ServiceCallback<void>

The callback

getAreaOfInterest(string, ComputerVisionClientGetAreaOfInterestOptionalParams, ServiceCallback<AreaOfInterestResult>)

function getAreaOfInterest(url: string, options: ComputerVisionClientGetAreaOfInterestOptionalParams, callback: ServiceCallback<AreaOfInterestResult>)

Parameters

url

string

Publicly reachable URL of an image.

options
ComputerVisionClientGetAreaOfInterestOptionalParams

The optional parameters

callback

ServiceCallback<AreaOfInterestResult>

The callback

getAreaOfInterest(string, Models.ComputerVisionClientGetAreaOfInterestOptionalParams)

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.

function getAreaOfInterest(url: string, options?: Models.ComputerVisionClientGetAreaOfInterestOptionalParams)

Parameters

url

string

Publicly reachable URL of an image.

options
Models.ComputerVisionClientGetAreaOfInterestOptionalParams

Returns

Promise<Models.GetAreaOfInterestResponse>

Promise<Models.GetAreaOfInterestResponse>

getAreaOfInterest(string, ServiceCallback<AreaOfInterestResult>)

function getAreaOfInterest(url: string, callback: ServiceCallback<AreaOfInterestResult>)

Parameters

url

string

Publicly reachable URL of an image.

callback

ServiceCallback<AreaOfInterestResult>

The callback

getAreaOfInterestInStream(msRest.HttpRequestBody, ComputerVisionClientGetAreaOfInterestInStreamOptionalParams, ServiceCallback<AreaOfInterestResult>)

function getAreaOfInterestInStream(image: msRest.HttpRequestBody, options: ComputerVisionClientGetAreaOfInterestInStreamOptionalParams, callback: ServiceCallback<AreaOfInterestResult>)

Parameters

image
msRest.HttpRequestBody

An image stream.

callback

ServiceCallback<AreaOfInterestResult>

The callback

getAreaOfInterestInStream(msRest.HttpRequestBody, Models.ComputerVisionClientGetAreaOfInterestInStreamOptionalParams)

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.

function getAreaOfInterestInStream(image: msRest.HttpRequestBody, options?: Models.ComputerVisionClientGetAreaOfInterestInStreamOptionalParams)

Parameters

image
msRest.HttpRequestBody

An image stream.

options
Models.ComputerVisionClientGetAreaOfInterestInStreamOptionalParams

Returns

Promise<Models.GetAreaOfInterestInStreamResponse>

Promise<Models.GetAreaOfInterestInStreamResponse>

getAreaOfInterestInStream(msRest.HttpRequestBody, ServiceCallback<AreaOfInterestResult>)

function getAreaOfInterestInStream(image: msRest.HttpRequestBody, callback: ServiceCallback<AreaOfInterestResult>)

Parameters

image
msRest.HttpRequestBody

An image stream.

callback

ServiceCallback<AreaOfInterestResult>

The callback

getReadResult(string, msRest.RequestOptionsBase)

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.

function getReadResult(operationId: string, options?: msRest.RequestOptionsBase)

Parameters

operationId

string

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

options
msRest.RequestOptionsBase

Returns

Promise<Models.GetReadResultResponse>

Promise<Models.GetReadResultResponse>

getReadResult(string, RequestOptionsBase, ServiceCallback<ReadOperationResult>)

function getReadResult(operationId: string, options: RequestOptionsBase, callback: ServiceCallback<ReadOperationResult>)

Parameters

operationId

string

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

options

RequestOptionsBase

The optional parameters

callback

ServiceCallback<ReadOperationResult>

The callback

getReadResult(string, ServiceCallback<ReadOperationResult>)

function getReadResult(operationId: string, callback: ServiceCallback<ReadOperationResult>)

Parameters

operationId

string

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

callback

ServiceCallback<ReadOperationResult>

The callback

listModels(msRest.RequestOptionsBase)

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.

function listModels(options?: msRest.RequestOptionsBase)

Parameters

options
msRest.RequestOptionsBase

Returns

Promise<Models.ListModelsResponse>

Promise<Models.ListModelsResponse>

listModels(RequestOptionsBase, ServiceCallback<ListModelsResult>)

function listModels(options: RequestOptionsBase, callback: ServiceCallback<ListModelsResult>)

Parameters

options

RequestOptionsBase

The optional parameters

callback

ServiceCallback<ListModelsResult>

The callback

listModels(ServiceCallback<ListModelsResult>)

function listModels(callback: ServiceCallback<ListModelsResult>)

Parameters

callback

ServiceCallback<ListModelsResult>

The callback

read(string, ComputerVisionClientReadOptionalParams, ServiceCallback<void>)

function read(url: string, options: ComputerVisionClientReadOptionalParams, callback: ServiceCallback<void>)

Parameters

url

string

Publicly reachable URL of an image.

options
ComputerVisionClientReadOptionalParams

The optional parameters

callback

ServiceCallback<void>

The callback

read(string, Models.ComputerVisionClientReadOptionalParams)

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

function read(url: string, options?: Models.ComputerVisionClientReadOptionalParams)

Parameters

url

string

Publicly reachable URL of an image.

options
Models.ComputerVisionClientReadOptionalParams

Returns

Promise<Models.ReadResponse>

Promise<Models.ReadResponse>

read(string, ServiceCallback<void>)

function read(url: string, callback: ServiceCallback<void>)

Parameters

url

string

Publicly reachable URL of an image.

callback

ServiceCallback<void>

The callback

readInStream(msRest.HttpRequestBody, ComputerVisionClientReadInStreamOptionalParams, ServiceCallback<void>)

function readInStream(image: msRest.HttpRequestBody, options: ComputerVisionClientReadInStreamOptionalParams, callback: ServiceCallback<void>)

Parameters

image
msRest.HttpRequestBody

An image stream.

options
ComputerVisionClientReadInStreamOptionalParams

The optional parameters

callback

ServiceCallback<void>

The callback

readInStream(msRest.HttpRequestBody, Models.ComputerVisionClientReadInStreamOptionalParams)

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

function readInStream(image: msRest.HttpRequestBody, options?: Models.ComputerVisionClientReadInStreamOptionalParams)

Parameters

image
msRest.HttpRequestBody

An image stream.

options
Models.ComputerVisionClientReadInStreamOptionalParams

Returns

Promise<Models.ReadInStreamResponse>

Promise<Models.ReadInStreamResponse>

readInStream(msRest.HttpRequestBody, ServiceCallback<void>)

function readInStream(image: msRest.HttpRequestBody, callback: ServiceCallback<void>)

Parameters

image
msRest.HttpRequestBody

An image stream.

callback

ServiceCallback<void>

The callback

recognizePrintedText(boolean, string, ComputerVisionClientRecognizePrintedTextOptionalParams, ServiceCallback<OcrResult>)

function recognizePrintedText(detectOrientation: boolean, url: string, options: ComputerVisionClientRecognizePrintedTextOptionalParams, callback: ServiceCallback<OcrResult>)

Parameters

detectOrientation

boolean

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

string

Publicly reachable URL of an image.

callback

ServiceCallback<OcrResult>

The callback

recognizePrintedText(boolean, string, Models.ComputerVisionClientRecognizePrintedTextOptionalParams)

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.

function recognizePrintedText(detectOrientation: boolean, url: string, options?: Models.ComputerVisionClientRecognizePrintedTextOptionalParams)

Parameters

detectOrientation

boolean

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

string

Publicly reachable URL of an image.

options
Models.ComputerVisionClientRecognizePrintedTextOptionalParams

Returns

Promise<Models.RecognizePrintedTextResponse>

Promise<Models.RecognizePrintedTextResponse>

recognizePrintedText(boolean, string, ServiceCallback<OcrResult>)

function recognizePrintedText(detectOrientation: boolean, url: string, callback: ServiceCallback<OcrResult>)

Parameters

detectOrientation

boolean

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

string

Publicly reachable URL of an image.

callback

ServiceCallback<OcrResult>

The callback

recognizePrintedTextInStream(boolean, msRest.HttpRequestBody, ComputerVisionClientRecognizePrintedTextInStreamOptionalParams, ServiceCallback<OcrResult>)

function recognizePrintedTextInStream(detectOrientation: boolean, image: msRest.HttpRequestBody, options: ComputerVisionClientRecognizePrintedTextInStreamOptionalParams, callback: ServiceCallback<OcrResult>)

Parameters

detectOrientation

boolean

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
msRest.HttpRequestBody

An image stream.

callback

ServiceCallback<OcrResult>

The callback

recognizePrintedTextInStream(boolean, msRest.HttpRequestBody, Models.ComputerVisionClientRecognizePrintedTextInStreamOptionalParams)

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.

function recognizePrintedTextInStream(detectOrientation: boolean, image: msRest.HttpRequestBody, options?: Models.ComputerVisionClientRecognizePrintedTextInStreamOptionalParams)

Parameters

detectOrientation

boolean

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
msRest.HttpRequestBody

An image stream.

options
Models.ComputerVisionClientRecognizePrintedTextInStreamOptionalParams

Returns

Promise<Models.RecognizePrintedTextInStreamResponse>

Promise<Models.RecognizePrintedTextInStreamResponse>

recognizePrintedTextInStream(boolean, msRest.HttpRequestBody, ServiceCallback<OcrResult>)

function recognizePrintedTextInStream(detectOrientation: boolean, image: msRest.HttpRequestBody, callback: ServiceCallback<OcrResult>)

Parameters

detectOrientation

boolean

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
msRest.HttpRequestBody

An image stream.

callback

ServiceCallback<OcrResult>

The callback

sendOperationRequest(OperationArguments, OperationSpec, ServiceCallback<any>)

Send an HTTP request that is populated using the provided OperationSpec.

function sendOperationRequest(operationArguments: OperationArguments, operationSpec: OperationSpec, callback?: ServiceCallback<any>)

Parameters

operationArguments

OperationArguments

The arguments that the HTTP request's templated values will be populated from.

operationSpec

OperationSpec

The OperationSpec to use to populate the httpRequest.

callback

ServiceCallback<any>

The callback to call when the response is received.

Returns

Promise<RestResponse>

sendRequest(RequestPrepareOptions | WebResourceLike)

Send the provided httpRequest.

function sendRequest(options: RequestPrepareOptions | WebResourceLike)

Parameters

options

RequestPrepareOptions | WebResourceLike

Returns

Promise<HttpOperationResponse>

tagImage(string, ComputerVisionClientTagImageOptionalParams, ServiceCallback<TagResult>)

function tagImage(url: string, options: ComputerVisionClientTagImageOptionalParams, callback: ServiceCallback<TagResult>)

Parameters

url

string

Publicly reachable URL of an image.

options
ComputerVisionClientTagImageOptionalParams

The optional parameters

callback

ServiceCallback<TagResult>

The callback

tagImage(string, Models.ComputerVisionClientTagImageOptionalParams)

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.

function tagImage(url: string, options?: Models.ComputerVisionClientTagImageOptionalParams)

Parameters

url

string

Publicly reachable URL of an image.

options
Models.ComputerVisionClientTagImageOptionalParams

Returns

Promise<Models.TagImageResponse>

Promise<Models.TagImageResponse>

tagImage(string, ServiceCallback<TagResult>)

function tagImage(url: string, callback: ServiceCallback<TagResult>)

Parameters

url

string

Publicly reachable URL of an image.

callback

ServiceCallback<TagResult>

The callback

tagImageInStream(msRest.HttpRequestBody, ComputerVisionClientTagImageInStreamOptionalParams, ServiceCallback<TagResult>)

function tagImageInStream(image: msRest.HttpRequestBody, options: ComputerVisionClientTagImageInStreamOptionalParams, callback: ServiceCallback<TagResult>)

Parameters

image
msRest.HttpRequestBody

An image stream.

options
ComputerVisionClientTagImageInStreamOptionalParams

The optional parameters

callback

ServiceCallback<TagResult>

The callback

tagImageInStream(msRest.HttpRequestBody, Models.ComputerVisionClientTagImageInStreamOptionalParams)

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.

function tagImageInStream(image: msRest.HttpRequestBody, options?: Models.ComputerVisionClientTagImageInStreamOptionalParams)

Parameters

image
msRest.HttpRequestBody

An image stream.

options
Models.ComputerVisionClientTagImageInStreamOptionalParams

Returns

Promise<Models.TagImageInStreamResponse>

Promise<Models.TagImageInStreamResponse>

tagImageInStream(msRest.HttpRequestBody, ServiceCallback<TagResult>)

function tagImageInStream(image: msRest.HttpRequestBody, callback: ServiceCallback<TagResult>)

Parameters

image
msRest.HttpRequestBody

An image stream.

callback

ServiceCallback<TagResult>

The callback