ComputerVisionClient class
- Extends
Constructors
Computer |
Initializes a new instance of the ComputerVisionClient class. |
Inherited Properties
credentials | |
endpoint |
Methods
analyze |
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. |
analyze |
|
analyze |
|
analyze |
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. |
analyze |
|
analyze |
|
analyze |
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. |
analyze |
|
analyze |
|
analyze |
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. |
analyze |
|
analyze |
|
describe |
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. |
describe |
|
describe |
|
describe |
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. |
describe |
|
describe |
|
detect |
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. |
detect |
|
detect |
|
detect |
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. |
detect |
|
detect |
|
generate |
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. |
generate |
|
generate |
|
generate |
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. |
generate |
|
generate |
|
get |
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. |
get |
|
get |
|
get |
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. |
get |
|
get |
|
get |
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. |
get |
|
get |
|
list |
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. |
list |
|
list |
|
read(string, Computer |
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, Computer |
|
read(string, Service |
|
read |
Use this interface to get the result of a Read operation, employing the state-of-the-art Optical Character Recognition (OCR) algorithms optimized for text-heavy documents. When you use the Read interface, the response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your 'GetReadResult' operation to access OCR results. |
read |
|
read |
|
recognize |
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. |
recognize |
|
recognize |
|
recognize |
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. |
recognize |
|
recognize |
|
tag |
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. |
tag |
|
tag |
|
tag |
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. |
tag |
|
tag |
Inherited Methods
send |
Send an HTTP request that is populated using the provided OperationSpec. |
send |
Send the provided httpRequest. |
Constructor Details
ComputerVisionClient(ServiceClientCredentials, string, ServiceClientOptions)
Initializes a new instance of the ComputerVisionClient class.
new ComputerVisionClient(credentials: ServiceClientCredentials, endpoint: string, options?: ServiceClientOptions)
Parameters
- credentials
- ServiceClientCredentials
Subscription credentials which uniquely identify client subscription.
- endpoint
-
string
Supported Cognitive Services endpoints.
- options
- ServiceClientOptions
The parameter options
Inherited Property Details
credentials
credentials: ServiceClientCredentials
Property Value
Inherited From ComputerVisionClientContext.credentials
endpoint
Method Details
analyzeImage(string, 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?: ComputerVisionClientAnalyzeImageOptionalParams): Promise<AnalyzeImageResponse>
Parameters
- url
-
string
Publicly reachable URL of an image.
The optional parameters
Returns
Promise<AnalyzeImageResponse>
Promise<Models.AnalyzeImageResponse>
analyzeImage(string, ComputerVisionClientAnalyzeImageOptionalParams, ServiceCallback<ImageAnalysis>)
function analyzeImage(url: string, options: ComputerVisionClientAnalyzeImageOptionalParams, callback: ServiceCallback<ImageAnalysis>)
Parameters
- url
-
string
Publicly reachable URL of an image.
The optional parameters
- callback
The callback
analyzeImage(string, ServiceCallback<ImageAnalysis>)
function analyzeImage(url: string, callback: ServiceCallback<ImageAnalysis>)
Parameters
- url
-
string
Publicly reachable URL of an image.
- callback
The callback
analyzeImageByDomain(string, string, 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?: ComputerVisionClientAnalyzeImageByDomainOptionalParams): Promise<AnalyzeImageByDomainResponse>
Parameters
- model
-
string
The domain-specific content to recognize.
- url
-
string
Publicly reachable URL of an image.
The optional parameters
Returns
Promise<AnalyzeImageByDomainResponse>
Promise<Models.AnalyzeImageByDomainResponse>
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.
The optional parameters
- callback
The callback
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
The callback
analyzeImageByDomainInStream(string, HttpRequestBody, 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: HttpRequestBody, options?: ComputerVisionClientAnalyzeImageByDomainInStreamOptionalParams): Promise<AnalyzeImageByDomainInStreamResponse>
Parameters
- model
-
string
The domain-specific content to recognize.
- image
- HttpRequestBody
An image stream.
The optional parameters
Returns
Promise<AnalyzeImageByDomainInStreamResponse>
Promise<Models.AnalyzeImageByDomainInStreamResponse>
analyzeImageByDomainInStream(string, HttpRequestBody, ComputerVisionClientAnalyzeImageByDomainInStreamOptionalParams, ServiceCallback<DomainModelResults>)
function analyzeImageByDomainInStream(model: string, image: HttpRequestBody, options: ComputerVisionClientAnalyzeImageByDomainInStreamOptionalParams, callback: ServiceCallback<DomainModelResults>)
Parameters
- model
-
string
The domain-specific content to recognize.
- image
- HttpRequestBody
An image stream.
The optional parameters
- callback
The callback
analyzeImageByDomainInStream(string, HttpRequestBody, ServiceCallback<DomainModelResults>)
function analyzeImageByDomainInStream(model: string, image: HttpRequestBody, callback: ServiceCallback<DomainModelResults>)
Parameters
- model
-
string
The domain-specific content to recognize.
- image
- HttpRequestBody
An image stream.
- callback
The callback
analyzeImageInStream(HttpRequestBody, 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: HttpRequestBody, options?: ComputerVisionClientAnalyzeImageInStreamOptionalParams): Promise<AnalyzeImageInStreamResponse>
Parameters
- image
- HttpRequestBody
An image stream.
The optional parameters
Returns
Promise<AnalyzeImageInStreamResponse>
Promise<Models.AnalyzeImageInStreamResponse>
analyzeImageInStream(HttpRequestBody, ComputerVisionClientAnalyzeImageInStreamOptionalParams, ServiceCallback<ImageAnalysis>)
function analyzeImageInStream(image: HttpRequestBody, options: ComputerVisionClientAnalyzeImageInStreamOptionalParams, callback: ServiceCallback<ImageAnalysis>)
Parameters
- image
- HttpRequestBody
An image stream.
The optional parameters
- callback
The callback
analyzeImageInStream(HttpRequestBody, ServiceCallback<ImageAnalysis>)
function analyzeImageInStream(image: HttpRequestBody, callback: ServiceCallback<ImageAnalysis>)
Parameters
- image
- HttpRequestBody
An image stream.
- callback
The callback
describeImage(string, 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?: ComputerVisionClientDescribeImageOptionalParams): Promise<DescribeImageResponse>
Parameters
- url
-
string
Publicly reachable URL of an image.
The optional parameters
Returns
Promise<DescribeImageResponse>
Promise<Models.DescribeImageResponse>
describeImage(string, ComputerVisionClientDescribeImageOptionalParams, ServiceCallback<ImageDescription>)
function describeImage(url: string, options: ComputerVisionClientDescribeImageOptionalParams, callback: ServiceCallback<ImageDescription>)
Parameters
- url
-
string
Publicly reachable URL of an image.
The optional parameters
- callback
The callback
describeImage(string, ServiceCallback<ImageDescription>)
function describeImage(url: string, callback: ServiceCallback<ImageDescription>)
Parameters
- url
-
string
Publicly reachable URL of an image.
- callback
The callback
describeImageInStream(HttpRequestBody, 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: HttpRequestBody, options?: ComputerVisionClientDescribeImageInStreamOptionalParams): Promise<DescribeImageInStreamResponse>
Parameters
- image
- HttpRequestBody
An image stream.
The optional parameters
Returns
Promise<DescribeImageInStreamResponse>
Promise<Models.DescribeImageInStreamResponse>
describeImageInStream(HttpRequestBody, ComputerVisionClientDescribeImageInStreamOptionalParams, ServiceCallback<ImageDescription>)
function describeImageInStream(image: HttpRequestBody, options: ComputerVisionClientDescribeImageInStreamOptionalParams, callback: ServiceCallback<ImageDescription>)
Parameters
- image
- HttpRequestBody
An image stream.
The optional parameters
- callback
The callback
describeImageInStream(HttpRequestBody, ServiceCallback<ImageDescription>)
function describeImageInStream(image: HttpRequestBody, callback: ServiceCallback<ImageDescription>)
Parameters
- image
- HttpRequestBody
An image stream.
- callback
The callback
detectObjects(string, 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?: ComputerVisionClientDetectObjectsOptionalParams): Promise<DetectObjectsResponse>
Parameters
- url
-
string
Publicly reachable URL of an image.
The optional parameters
Returns
Promise<DetectObjectsResponse>
Promise<Models.DetectObjectsResponse>
detectObjects(string, ComputerVisionClientDetectObjectsOptionalParams, ServiceCallback<DetectResult>)
function detectObjects(url: string, options: ComputerVisionClientDetectObjectsOptionalParams, callback: ServiceCallback<DetectResult>)
Parameters
- url
-
string
Publicly reachable URL of an image.
The optional parameters
- callback
The callback
detectObjects(string, ServiceCallback<DetectResult>)
function detectObjects(url: string, callback: ServiceCallback<DetectResult>)
Parameters
- url
-
string
Publicly reachable URL of an image.
- callback
The callback
detectObjectsInStream(HttpRequestBody, 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: HttpRequestBody, options?: ComputerVisionClientDetectObjectsInStreamOptionalParams): Promise<DetectObjectsInStreamResponse>
Parameters
- image
- HttpRequestBody
An image stream.
The optional parameters
Returns
Promise<DetectObjectsInStreamResponse>
Promise<Models.DetectObjectsInStreamResponse>
detectObjectsInStream(HttpRequestBody, ComputerVisionClientDetectObjectsInStreamOptionalParams, ServiceCallback<DetectResult>)
function detectObjectsInStream(image: HttpRequestBody, options: ComputerVisionClientDetectObjectsInStreamOptionalParams, callback: ServiceCallback<DetectResult>)
Parameters
- image
- HttpRequestBody
An image stream.
The optional parameters
- callback
The callback
detectObjectsInStream(HttpRequestBody, ServiceCallback<DetectResult>)
function detectObjectsInStream(image: HttpRequestBody, callback: ServiceCallback<DetectResult>)
Parameters
- image
- HttpRequestBody
An image stream.
- callback
The callback
generateThumbnail(number, number, string, 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?: ComputerVisionClientGenerateThumbnailOptionalParams): Promise<GenerateThumbnailResponse>
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.
The optional parameters
Returns
Promise<GenerateThumbnailResponse>
Promise<Models.GenerateThumbnailResponse>
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.
The optional parameters
- callback
-
ServiceCallback<void>
The callback
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, HttpRequestBody, 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: HttpRequestBody, options?: ComputerVisionClientGenerateThumbnailInStreamOptionalParams): Promise<GenerateThumbnailInStreamResponse>
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
- HttpRequestBody
An image stream.
The optional parameters
Returns
Promise<GenerateThumbnailInStreamResponse>
Promise<Models.GenerateThumbnailInStreamResponse>
generateThumbnailInStream(number, number, HttpRequestBody, ComputerVisionClientGenerateThumbnailInStreamOptionalParams, ServiceCallback<void>)
function generateThumbnailInStream(width: number, height: number, image: 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
- HttpRequestBody
An image stream.
The optional parameters
- callback
-
ServiceCallback<void>
The callback
generateThumbnailInStream(number, number, HttpRequestBody, ServiceCallback<void>)
function generateThumbnailInStream(width: number, height: number, image: 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
- HttpRequestBody
An image stream.
- callback
-
ServiceCallback<void>
The callback
getAreaOfInterest(string, 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?: ComputerVisionClientGetAreaOfInterestOptionalParams): Promise<GetAreaOfInterestResponse>
Parameters
- url
-
string
Publicly reachable URL of an image.
The optional parameters
Returns
Promise<GetAreaOfInterestResponse>
Promise<Models.GetAreaOfInterestResponse>
getAreaOfInterest(string, ComputerVisionClientGetAreaOfInterestOptionalParams, ServiceCallback<AreaOfInterestResult>)
function getAreaOfInterest(url: string, options: ComputerVisionClientGetAreaOfInterestOptionalParams, callback: ServiceCallback<AreaOfInterestResult>)
Parameters
- url
-
string
Publicly reachable URL of an image.
The optional parameters
- callback
The callback
getAreaOfInterest(string, ServiceCallback<AreaOfInterestResult>)
function getAreaOfInterest(url: string, callback: ServiceCallback<AreaOfInterestResult>)
Parameters
- url
-
string
Publicly reachable URL of an image.
- callback
The callback
getAreaOfInterestInStream(HttpRequestBody, 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: HttpRequestBody, options?: ComputerVisionClientGetAreaOfInterestInStreamOptionalParams): Promise<GetAreaOfInterestInStreamResponse>
Parameters
- image
- HttpRequestBody
An image stream.
The optional parameters
Returns
Promise<GetAreaOfInterestInStreamResponse>
Promise<Models.GetAreaOfInterestInStreamResponse>
getAreaOfInterestInStream(HttpRequestBody, ComputerVisionClientGetAreaOfInterestInStreamOptionalParams, ServiceCallback<AreaOfInterestResult>)
function getAreaOfInterestInStream(image: HttpRequestBody, options: ComputerVisionClientGetAreaOfInterestInStreamOptionalParams, callback: ServiceCallback<AreaOfInterestResult>)
Parameters
- image
- HttpRequestBody
An image stream.
The optional parameters
- callback
The callback
getAreaOfInterestInStream(HttpRequestBody, ServiceCallback<AreaOfInterestResult>)
function getAreaOfInterestInStream(image: HttpRequestBody, callback: ServiceCallback<AreaOfInterestResult>)
Parameters
- image
- HttpRequestBody
An image stream.
- callback
The callback
getReadResult(string, 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?: RequestOptionsBase): Promise<GetReadResultResponse>
Parameters
- operationId
-
string
Id of read operation returned in the response of the 'Read' interface.
- options
- RequestOptionsBase
The optional parameters
Returns
Promise<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
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
The callback
listModels(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?: RequestOptionsBase): Promise<ListModelsResponse>
Parameters
- options
- RequestOptionsBase
The optional parameters
Returns
Promise<ListModelsResponse>
Promise<Models.ListModelsResponse>
listModels(RequestOptionsBase, ServiceCallback<ListModelsResult>)
function listModels(options: RequestOptionsBase, callback: ServiceCallback<ListModelsResult>)
Parameters
- options
- RequestOptionsBase
The optional parameters
- callback
The callback
listModels(ServiceCallback<ListModelsResult>)
function listModels(callback: ServiceCallback<ListModelsResult>)
Parameters
- callback
The callback
read(string, 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?: ComputerVisionClientReadOptionalParams): Promise<ReadResponse>
Parameters
- url
-
string
Publicly reachable URL of an image.
The optional parameters
Returns
Promise<ReadResponse>
Promise<Models.ReadResponse>
read(string, ComputerVisionClientReadOptionalParams, ServiceCallback<void>)
function read(url: string, options: ComputerVisionClientReadOptionalParams, callback: ServiceCallback<void>)
Parameters
- url
-
string
Publicly reachable URL of an image.
The optional parameters
- callback
-
ServiceCallback<void>
The callback
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(HttpRequestBody, 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: HttpRequestBody, options?: ComputerVisionClientReadInStreamOptionalParams): Promise<ReadInStreamResponse>
Parameters
- image
- HttpRequestBody
An image stream.
The optional parameters
Returns
Promise<ReadInStreamResponse>
Promise<Models.ReadInStreamResponse>
readInStream(HttpRequestBody, ComputerVisionClientReadInStreamOptionalParams, ServiceCallback<void>)
function readInStream(image: HttpRequestBody, options: ComputerVisionClientReadInStreamOptionalParams, callback: ServiceCallback<void>)
Parameters
- image
- HttpRequestBody
An image stream.
The optional parameters
- callback
-
ServiceCallback<void>
The callback
readInStream(HttpRequestBody, ServiceCallback<void>)
function readInStream(image: HttpRequestBody, callback: ServiceCallback<void>)
Parameters
- image
- HttpRequestBody
An image stream.
- callback
-
ServiceCallback<void>
The callback
recognizePrintedText(boolean, string, 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?: ComputerVisionClientRecognizePrintedTextOptionalParams): Promise<RecognizePrintedTextResponse>
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.
The optional parameters
Returns
Promise<RecognizePrintedTextResponse>
Promise<Models.RecognizePrintedTextResponse>
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.
The optional parameters
- callback
The callback
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
The callback
recognizePrintedTextInStream(boolean, HttpRequestBody, 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: HttpRequestBody, options?: ComputerVisionClientRecognizePrintedTextInStreamOptionalParams): Promise<RecognizePrintedTextInStreamResponse>
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
- HttpRequestBody
An image stream.
The optional parameters
Returns
Promise<RecognizePrintedTextInStreamResponse>
Promise<Models.RecognizePrintedTextInStreamResponse>
recognizePrintedTextInStream(boolean, HttpRequestBody, ComputerVisionClientRecognizePrintedTextInStreamOptionalParams, ServiceCallback<OcrResult>)
function recognizePrintedTextInStream(detectOrientation: boolean, image: 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
- HttpRequestBody
An image stream.
The optional parameters
- callback
The callback
recognizePrintedTextInStream(boolean, HttpRequestBody, ServiceCallback<OcrResult>)
function recognizePrintedTextInStream(detectOrientation: boolean, image: 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
- HttpRequestBody
An image stream.
- callback
The callback
tagImage(string, 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?: ComputerVisionClientTagImageOptionalParams): Promise<TagImageResponse>
Parameters
- url
-
string
Publicly reachable URL of an image.
The optional parameters
Returns
Promise<TagImageResponse>
Promise<Models.TagImageResponse>
tagImage(string, ComputerVisionClientTagImageOptionalParams, ServiceCallback<TagResult>)
function tagImage(url: string, options: ComputerVisionClientTagImageOptionalParams, callback: ServiceCallback<TagResult>)
Parameters
- url
-
string
Publicly reachable URL of an image.
The optional parameters
- callback
The callback
tagImage(string, ServiceCallback<TagResult>)
function tagImage(url: string, callback: ServiceCallback<TagResult>)
Parameters
- url
-
string
Publicly reachable URL of an image.
- callback
The callback
tagImageInStream(HttpRequestBody, 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: HttpRequestBody, options?: ComputerVisionClientTagImageInStreamOptionalParams): Promise<TagImageInStreamResponse>
Parameters
- image
- HttpRequestBody
An image stream.
The optional parameters
Returns
Promise<TagImageInStreamResponse>
Promise<Models.TagImageInStreamResponse>
tagImageInStream(HttpRequestBody, ComputerVisionClientTagImageInStreamOptionalParams, ServiceCallback<TagResult>)
function tagImageInStream(image: HttpRequestBody, options: ComputerVisionClientTagImageInStreamOptionalParams, callback: ServiceCallback<TagResult>)
Parameters
- image
- HttpRequestBody
An image stream.
The optional parameters
- callback
The callback
tagImageInStream(HttpRequestBody, ServiceCallback<TagResult>)
function tagImageInStream(image: HttpRequestBody, callback: ServiceCallback<TagResult>)
Parameters
- image
- HttpRequestBody
An image stream.
- callback
The callback
Inherited Method Details
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>): Promise<RestResponse>
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>
Inherited From ComputerVisionClientContext.sendOperationRequest
sendRequest(RequestPrepareOptions | WebResourceLike)
Send the provided httpRequest.
function sendRequest(options: RequestPrepareOptions | WebResourceLike): Promise<HttpOperationResponse>
Parameters
- options
Returns
Promise<HttpOperationResponse>
Inherited From ComputerVisionClientContext.sendRequest