ComputerVisionClient class

Extends

建構函式

ComputerVisionClient(ServiceClientCredentials, string, ServiceClientOptions)

初始化 ComputerVisionClient 類別的新實例。

繼承的屬性

credentials
endpoint

方法

analyzeImage(string, ComputerVisionClientAnalyzeImageOptionalParams)

這項作業會根據影像內容擷取一組豐富的視覺功能。 支援兩個輸入法 -- (1) 上傳影像或 (2) 指定影像 URL。 在您的要求中,有選擇性參數可讓您選擇要傳回的功能。 根據預設,影像類別會在回應中傳回。 成功的回應將會以 JSON 傳回。 如果要求失敗,回應會包含錯誤碼和訊息,以協助瞭解發生錯誤的原因。

analyzeImage(string, ComputerVisionClientAnalyzeImageOptionalParams, ServiceCallback<ImageAnalysis>)
analyzeImage(string, ServiceCallback<ImageAnalysis>)
analyzeImageByDomain(string, string, ComputerVisionClientAnalyzeImageByDomainOptionalParams)

此作業會套用特定領域模型來辨識影像中的內容。 您可以使用 /models GET 要求來擷取電腦視覺 API 所支援的網域特定模型清單。 目前,API 提供下列領域特定模型:名人、地標。 支援兩個輸入法 -- (1) 上傳影像或 (2) 指定影像 URL。 成功的回應將會以 JSON 傳回。 如果要求失敗,回應會包含錯誤碼和訊息,以協助瞭解發生錯誤的原因。

analyzeImageByDomain(string, string, ComputerVisionClientAnalyzeImageByDomainOptionalParams, ServiceCallback<DomainModelResults>)
analyzeImageByDomain(string, string, ServiceCallback<DomainModelResults>)
analyzeImageByDomainInStream(string, HttpRequestBody, ComputerVisionClientAnalyzeImageByDomainInStreamOptionalParams)

此作業會套用特定領域模型來辨識影像中的內容。 您可以使用 /models GET 要求來擷取電腦視覺 API 所支援的網域特定模型清單。 目前,API 提供下列領域特定模型:名人、地標。 支援兩個輸入法 -- (1) 上傳影像或 (2) 指定影像 URL。 成功的回應將會以 JSON 傳回。 如果要求失敗,回應會包含錯誤碼和訊息,以協助瞭解發生錯誤的原因。

analyzeImageByDomainInStream(string, HttpRequestBody, ComputerVisionClientAnalyzeImageByDomainInStreamOptionalParams, ServiceCallback<DomainModelResults>)
analyzeImageByDomainInStream(string, HttpRequestBody, ServiceCallback<DomainModelResults>)
analyzeImageInStream(HttpRequestBody, ComputerVisionClientAnalyzeImageInStreamOptionalParams)

這項作業會根據影像內容擷取一組豐富的視覺功能。 支援兩個輸入法 -- (1) 上傳影像或 (2) 指定影像 URL。 在您的要求中,有選擇性參數可讓您選擇要傳回的功能。 根據預設,影像類別會在回應中傳回。 成功的回應將會以 JSON 傳回。 如果要求失敗,回應會包含錯誤碼和訊息,以協助瞭解發生錯誤的原因。

analyzeImageInStream(HttpRequestBody, ComputerVisionClientAnalyzeImageInStreamOptionalParams, ServiceCallback<ImageAnalysis>)
analyzeImageInStream(HttpRequestBody, ServiceCallback<ImageAnalysis>)
describeImage(string, ComputerVisionClientDescribeImageOptionalParams)

此作業會產生具有完整句子的人類可讀語言影像的描述。 描述是以作業所傳回的內容標籤集合為基礎。 每個影像可以產生一個以上的描述。 描述會依信賴分數排序。 如果適用,描述可能包含名人和地標領域模型的結果。 支援兩個輸入法 -- (1) 上傳影像或 (2) 指定影像 URL。 成功的回應將會以 JSON 傳回。 如果要求失敗,回應將包含錯誤碼和訊息,以協助瞭解發生錯誤的原因。

describeImage(string, ComputerVisionClientDescribeImageOptionalParams, ServiceCallback<ImageDescription>)
describeImage(string, ServiceCallback<ImageDescription>)
describeImageInStream(HttpRequestBody, ComputerVisionClientDescribeImageInStreamOptionalParams)

此作業會產生具有完整句子的人類可讀語言影像的描述。 描述是以作業所傳回的內容標記集合為基礎。 您可以為每個影像產生一個以上的描述。 描述會依信賴分數排序。 如果適用,描述可能包含名人和地標領域模型的結果。 支援兩個輸入方法: (1) 上傳影像或 (2) 指定影像 URL。 成功回應會在 JSON 中傳回。 如果要求失敗,回應將包含錯誤碼和訊息,以協助瞭解發生錯誤的原因。

describeImageInStream(HttpRequestBody, ComputerVisionClientDescribeImageInStreamOptionalParams, ServiceCallback<ImageDescription>)
describeImageInStream(HttpRequestBody, ServiceCallback<ImageDescription>)
detectObjects(string, ComputerVisionClientDetectObjectsOptionalParams)

在指定的影像上執行物件偵測。 支援兩個輸入方法: (1) 上傳影像或 (2) 指定影像 URL。 成功回應會在 JSON 中傳回。 如果要求失敗,回應將包含錯誤碼和訊息,以協助瞭解發生錯誤的原因。

detectObjects(string, ComputerVisionClientDetectObjectsOptionalParams, ServiceCallback<DetectResult>)
detectObjects(string, ServiceCallback<DetectResult>)
detectObjectsInStream(HttpRequestBody, ComputerVisionClientDetectObjectsInStreamOptionalParams)

在指定的影像上執行物件偵測。 支援兩個輸入方法: (1) 上傳影像或 (2) 指定影像 URL。 成功回應會在 JSON 中傳回。 如果要求失敗,回應將包含錯誤碼和訊息,以協助瞭解發生錯誤的原因。

detectObjectsInStream(HttpRequestBody, ComputerVisionClientDetectObjectsInStreamOptionalParams, ServiceCallback<DetectResult>)
detectObjectsInStream(HttpRequestBody, ServiceCallback<DetectResult>)
generateThumbnail(number, number, string, ComputerVisionClientGenerateThumbnailOptionalParams)

這項作業會產生具有使用者指定寬度和高度的縮圖影像。 根據預設,此服務會分析影像、識別相關區域 (ROI),並根據 ROI 產生智慧裁剪的座標。 當您指定與輸入影像不同的外觀比例時,智慧裁剪有助於。 成功的回應會包含縮圖影像二進位檔。 如果要求失敗,回應會包含錯誤碼和訊息,以協助判斷發生錯誤的原因。 失敗時,會傳回錯誤碼和錯誤訊息。 錯誤碼可能是 InvalidImageUrl、InvalidImageFormat、InvalidImageSize、InvalidThumbnailSize、NotSupportedImage、FailedToProcess、Timeout 或 InternalServerError 的其中一個。

generateThumbnail(number, number, string, ComputerVisionClientGenerateThumbnailOptionalParams, ServiceCallback<void>)
generateThumbnail(number, number, string, ServiceCallback<void>)
generateThumbnailInStream(number, number, HttpRequestBody, ComputerVisionClientGenerateThumbnailInStreamOptionalParams)

這項作業會產生具有使用者指定寬度和高度的縮圖影像。 根據預設,此服務會分析影像、識別相關區域 (ROI),並根據 ROI 產生智慧裁剪的座標。 當您指定與輸入影像不同的外觀比例時,智慧裁剪有助於。 成功的回應會包含縮圖影像二進位檔。 如果要求失敗,回應會包含錯誤碼和訊息,以協助判斷發生錯誤的原因。 失敗時,會傳回錯誤碼和錯誤訊息。 錯誤碼可能是 InvalidImageUrl、InvalidImageFormat、InvalidImageSize、InvalidThumbnailSize、NotSupportedImage、FailedToProcess、Timeout 或 InternalServerError 的其中一個。

generateThumbnailInStream(number, number, HttpRequestBody, ComputerVisionClientGenerateThumbnailInStreamOptionalParams, ServiceCallback<void>)
generateThumbnailInStream(number, number, HttpRequestBody, ServiceCallback<void>)
getAreaOfInterest(string, ComputerVisionClientGetAreaOfInterestOptionalParams)

此作業會在影像最重要的區域周圍傳回周框方塊。 成功回應會在 JSON 中傳回。 如果要求失敗,回應會包含錯誤碼和訊息,以協助判斷發生錯誤的原因。 失敗時,會傳回錯誤碼和錯誤訊息。 錯誤碼可能是 InvalidImageUrl、InvalidImageFormat、InvalidImageSize、NotSupportedImage、FailedToProcess、Timeout 或 InternalServerError 的其中一個。

getAreaOfInterest(string, ComputerVisionClientGetAreaOfInterestOptionalParams, ServiceCallback<AreaOfInterestResult>)
getAreaOfInterest(string, ServiceCallback<AreaOfInterestResult>)
getAreaOfInterestInStream(HttpRequestBody, ComputerVisionClientGetAreaOfInterestInStreamOptionalParams)

此作業會在影像最重要的區域周圍傳回周框方塊。 成功回應會在 JSON 中傳回。 如果要求失敗,回應會包含錯誤碼和訊息,以協助判斷發生錯誤的原因。 失敗時,會傳回錯誤碼和錯誤訊息。 錯誤碼可能是 InvalidImageUrl、InvalidImageFormat、InvalidImageSize、NotSupportedImage、FailedToProcess、Timeout 或 InternalServerError 的其中一個。

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

此介面用於取得讀取作業的 OCR 結果。 此介面的 URL 應該從讀取介面傳回的 [作業位置] 欄位擷取。

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

此作業會傳回電腦視覺 API 所支援之領域特定模型的清單。 目前,API 支援下列領域特定模型:名人辨識器、地標辨識器。 成功回應會在 JSON 中傳回。 如果要求失敗,回應將包含錯誤碼和訊息,以協助瞭解發生錯誤的原因。

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

使用此介面來取得讀取作業的結果,採用針對大量文字檔優化的光學字元辨識 (OCR) 演算法。 當您使用讀取介面時,回應會包含名為 'Operation-Location' 的欄位。 [作業位置] 欄位包含您必須用於 'GetReadResult' 作業才能存取 OCR 結果的 URL。

read(string, ComputerVisionClientReadOptionalParams, ServiceCallback<void>)
read(string, ServiceCallback<void>)
readInStream(HttpRequestBody, ComputerVisionClientReadInStreamOptionalParams)

使用此介面來取得讀取作業的結果,採用針對大量文字檔優化的光學字元辨識 (OCR) 演算法。 當您使用讀取介面時,回應會包含名為 'Operation-Location' 的欄位。 [作業位置] 欄位包含您必須用於 'GetReadResult' 作業才能存取 OCR 結果的 URL。

readInStream(HttpRequestBody, ComputerVisionClientReadInStreamOptionalParams, ServiceCallback<void>)
readInStream(HttpRequestBody, ServiceCallback<void>)
recognizePrintedText(boolean, string, ComputerVisionClientRecognizePrintedTextOptionalParams)

光學字元辨識 (OCR) 偵測影像中的文字,並將辨識的字元擷取到機器可用的字元資料流。 成功時,將會傳回 OCR 結果。 失敗時,將會傳回錯誤碼與錯誤訊息。 錯誤碼可以是 InvalidImageUrl、InvalidImageFormat、InvalidImageSize、NotSupportedImage、NotSupportedLanguage 或 InternalServerError 的其中一個。

recognizePrintedText(boolean, string, ComputerVisionClientRecognizePrintedTextOptionalParams, ServiceCallback<OcrResult>)
recognizePrintedText(boolean, string, ServiceCallback<OcrResult>)
recognizePrintedTextInStream(boolean, HttpRequestBody, ComputerVisionClientRecognizePrintedTextInStreamOptionalParams)

光學字元辨識 (OCR) 偵測影像中的文字,並將辨識的字元擷取到機器可用的字元資料流。 成功時,將會傳回 OCR 結果。 失敗時,將會傳回錯誤碼與錯誤訊息。 錯誤碼可以是 InvalidImageUrl、InvalidImageFormat、InvalidImageSize、NotSupportedImage、NotSupportedLanguage 或 InternalServerError 的其中一個。

recognizePrintedTextInStream(boolean, HttpRequestBody, ComputerVisionClientRecognizePrintedTextInStreamOptionalParams, ServiceCallback<OcrResult>)
recognizePrintedTextInStream(boolean, HttpRequestBody, ServiceCallback<OcrResult>)
tagImage(string, ComputerVisionClientTagImageOptionalParams)

此作業會產生與所提供影像內容相關的單字或標記清單。 電腦視覺 API 可以根據影像中找到的物件、生物、生活或動作來傳回標記。 不同于類別,標籤不會根據階層式分類系統進行組織,而是對應至影像內容。 標記可能包含可避免不明確或提供內容的提示,例如 "ascomycete" 標記可能伴隨提示 "fungus"。 支援兩個輸入方法: (1) 上傳影像或 (2) 指定影像 URL。 成功回應會在 JSON 中傳回。 如果要求失敗,回應將包含錯誤碼和訊息,以協助瞭解發生錯誤的原因。

tagImage(string, ComputerVisionClientTagImageOptionalParams, ServiceCallback<TagResult>)
tagImage(string, ServiceCallback<TagResult>)
tagImageInStream(HttpRequestBody, ComputerVisionClientTagImageInStreamOptionalParams)

此作業會產生與所提供影像內容相關的單字或標記清單。 電腦視覺 API 可以根據影像中找到的物件、生物、生活或動作來傳回標記。 不同于類別,標籤不會根據階層式分類系統進行組織,而是對應至影像內容。 標記可能包含可避免不明確或提供內容的提示,例如 "ascomycete" 標記可能伴隨提示 "fungus"。 支援兩個輸入方法: (1) 上傳影像或 (2) 指定影像 URL。 成功回應會在 JSON 中傳回。 如果要求失敗,回應將包含錯誤碼和訊息,以協助瞭解發生錯誤的原因。

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

繼承的方法

sendOperationRequest(OperationArguments, OperationSpec, ServiceCallback<any>)

傳送使用提供的 OperationSpec 填入的 HTTP 要求。

sendRequest(RequestPrepareOptions | WebResourceLike)

傳送提供的 HTTPRequest。

建構函式詳細資料

ComputerVisionClient(ServiceClientCredentials, string, ServiceClientOptions)

初始化 ComputerVisionClient 類別的新實例。

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

參數

credentials
ServiceClientCredentials

可唯一識別用戶端訂用帳戶的訂用帳號憑證。

endpoint

string

支援的認知服務端點。

options
ServiceClientOptions

參數選項

繼承的屬性詳細資料

credentials

credentials: ServiceClientCredentials

屬性值

繼承自ComputerVisionClientCoNtext.credentials

endpoint

endpoint: string

屬性值

string

繼承自ComputerVisionClientCoNtext.endpoint

方法詳細資料

analyzeImage(string, ComputerVisionClientAnalyzeImageOptionalParams)

這項作業會根據影像內容擷取一組豐富的視覺功能。 支援兩個輸入法 -- (1) 上傳影像或 (2) 指定影像 URL。 在您的要求中,有選擇性參數可讓您選擇要傳回的功能。 根據預設,影像類別會在回應中傳回。 成功的回應將會以 JSON 傳回。 如果要求失敗,回應會包含錯誤碼和訊息,以協助瞭解發生錯誤的原因。

function analyzeImage(url: string, options?: ComputerVisionClientAnalyzeImageOptionalParams): Promise<AnalyzeImageResponse>

參數

url

string

影像的可公開連線 URL。

傳回

Promise < Models.AnalyzeImageResponse>

analyzeImage(string, ComputerVisionClientAnalyzeImageOptionalParams, ServiceCallback<ImageAnalysis>)

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

參數

url

string

影像的可公開連線 URL。

callback

ServiceCallback<ImageAnalysis>

回呼

analyzeImage(string, ServiceCallback<ImageAnalysis>)

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

參數

url

string

影像的可公開連線 URL。

callback

ServiceCallback<ImageAnalysis>

回呼

analyzeImageByDomain(string, string, ComputerVisionClientAnalyzeImageByDomainOptionalParams)

此作業會套用特定領域模型來辨識影像中的內容。 您可以使用 /models GET 要求來擷取電腦視覺 API 所支援的網域特定模型清單。 目前,API 提供下列領域特定模型:名人、地標。 支援兩個輸入法 -- (1) 上傳影像或 (2) 指定影像 URL。 成功的回應將會以 JSON 傳回。 如果要求失敗,回應會包含錯誤碼和訊息,以協助瞭解發生錯誤的原因。

function analyzeImageByDomain(model: string, url: string, options?: ComputerVisionClientAnalyzeImageByDomainOptionalParams): Promise<AnalyzeImageByDomainResponse>

參數

model

string

要辨識的網域特定內容。

url

string

影像的可公開連線 URL。

傳回

Promise < Models.AnalyzeImageByDomainResponse>

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

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

參數

model

string

要辨識的網域特定內容。

url

string

影像的可公開連線 URL。

analyzeImageByDomain(string, string, ServiceCallback<DomainModelResults>)

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

參數

model

string

要辨識的網域特定內容。

url

string

影像的可公開連線 URL。

analyzeImageByDomainInStream(string, HttpRequestBody, ComputerVisionClientAnalyzeImageByDomainInStreamOptionalParams)

此作業會套用特定領域模型來辨識影像中的內容。 您可以使用 /models GET 要求來擷取電腦視覺 API 所支援的網域特定模型清單。 目前,API 提供下列領域特定模型:名人、地標。 支援兩個輸入法 -- (1) 上傳影像或 (2) 指定影像 URL。 成功的回應將會以 JSON 傳回。 如果要求失敗,回應會包含錯誤碼和訊息,以協助瞭解發生錯誤的原因。

function analyzeImageByDomainInStream(model: string, image: HttpRequestBody, options?: ComputerVisionClientAnalyzeImageByDomainInStreamOptionalParams): Promise<AnalyzeImageByDomainInStreamResponse>

參數

model

string

要辨識的網域特定內容。

image
HttpRequestBody

影像資料流程。

傳回

Promise < Models.AnalyzeImageByDomainInStreamResponse>

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

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

參數

model

string

要辨識的網域特定內容。

image
HttpRequestBody

影像資料流程。

analyzeImageByDomainInStream(string, HttpRequestBody, ServiceCallback<DomainModelResults>)

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

參數

model

string

要辨識的網域特定內容。

image
HttpRequestBody

影像資料流程。

analyzeImageInStream(HttpRequestBody, ComputerVisionClientAnalyzeImageInStreamOptionalParams)

這項作業會根據影像內容擷取一組豐富的視覺功能。 支援兩個輸入法 -- (1) 上傳影像或 (2) 指定影像 URL。 在您的要求中,有選擇性參數可讓您選擇要傳回的功能。 根據預設,影像類別會在回應中傳回。 成功的回應將會以 JSON 傳回。 如果要求失敗,回應會包含錯誤碼和訊息,以協助瞭解發生錯誤的原因。

function analyzeImageInStream(image: HttpRequestBody, options?: ComputerVisionClientAnalyzeImageInStreamOptionalParams): Promise<AnalyzeImageInStreamResponse>

參數

image
HttpRequestBody

影像資料流程。

傳回

Promise < Models.AnalyzeImageInStreamResponse>

analyzeImageInStream(HttpRequestBody, ComputerVisionClientAnalyzeImageInStreamOptionalParams, ServiceCallback<ImageAnalysis>)

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

參數

image
HttpRequestBody

影像資料流程。

callback

ServiceCallback<ImageAnalysis>

回呼

analyzeImageInStream(HttpRequestBody, ServiceCallback<ImageAnalysis>)

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

參數

image
HttpRequestBody

影像資料流程。

callback

ServiceCallback<ImageAnalysis>

回呼

describeImage(string, ComputerVisionClientDescribeImageOptionalParams)

此作業會產生具有完整句子的人類可讀語言影像的描述。 描述是以作業所傳回的內容標籤集合為基礎。 每個影像可以產生一個以上的描述。 描述會依信賴分數排序。 如果適用,描述可能包含名人和地標領域模型的結果。 支援兩個輸入法 -- (1) 上傳影像或 (2) 指定影像 URL。 成功的回應將會以 JSON 傳回。 如果要求失敗,回應將包含錯誤碼和訊息,以協助瞭解發生錯誤的原因。

function describeImage(url: string, options?: ComputerVisionClientDescribeImageOptionalParams): Promise<DescribeImageResponse>

參數

url

string

影像的可公開連線 URL。

傳回

Promise < Models.DescribeImageResponse>

describeImage(string, ComputerVisionClientDescribeImageOptionalParams, ServiceCallback<ImageDescription>)

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

參數

url

string

影像的可公開連線 URL。

describeImage(string, ServiceCallback<ImageDescription>)

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

參數

url

string

影像的可公開連線 URL。

describeImageInStream(HttpRequestBody, ComputerVisionClientDescribeImageInStreamOptionalParams)

此作業會產生具有完整句子的人類可讀語言影像的描述。 描述是以作業所傳回的內容標記集合為基礎。 您可以為每個影像產生一個以上的描述。 描述會依信賴分數排序。 如果適用,描述可能包含名人和地標領域模型的結果。 支援兩個輸入方法: (1) 上傳影像或 (2) 指定影像 URL。 成功回應會在 JSON 中傳回。 如果要求失敗,回應將包含錯誤碼和訊息,以協助瞭解發生錯誤的原因。

function describeImageInStream(image: HttpRequestBody, options?: ComputerVisionClientDescribeImageInStreamOptionalParams): Promise<DescribeImageInStreamResponse>

參數

image
HttpRequestBody

影像資料流程。

傳回

Promise < Models.DescribeImageInStreamResponse>

describeImageInStream(HttpRequestBody, ComputerVisionClientDescribeImageInStreamOptionalParams, ServiceCallback<ImageDescription>)

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

參數

image
HttpRequestBody

影像資料流程。

describeImageInStream(HttpRequestBody, ServiceCallback<ImageDescription>)

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

參數

image
HttpRequestBody

影像資料流程。

detectObjects(string, ComputerVisionClientDetectObjectsOptionalParams)

在指定的影像上執行物件偵測。 支援兩個輸入方法: (1) 上傳影像或 (2) 指定影像 URL。 成功回應會在 JSON 中傳回。 如果要求失敗,回應將包含錯誤碼和訊息,以協助瞭解發生錯誤的原因。

function detectObjects(url: string, options?: ComputerVisionClientDetectObjectsOptionalParams): Promise<DetectObjectsResponse>

參數

url

string

影像的可公開連線 URL。

傳回

Promise < Models.DetectObjectsResponse>

detectObjects(string, ComputerVisionClientDetectObjectsOptionalParams, ServiceCallback<DetectResult>)

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

參數

url

string

影像的可公開連線 URL。

callback

ServiceCallback<DetectResult>

回呼

detectObjects(string, ServiceCallback<DetectResult>)

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

參數

url

string

影像的可公開連線 URL。

callback

ServiceCallback<DetectResult>

回呼

detectObjectsInStream(HttpRequestBody, ComputerVisionClientDetectObjectsInStreamOptionalParams)

在指定的影像上執行物件偵測。 支援兩個輸入方法: (1) 上傳影像或 (2) 指定影像 URL。 成功回應會在 JSON 中傳回。 如果要求失敗,回應將包含錯誤碼和訊息,以協助瞭解發生錯誤的原因。

function detectObjectsInStream(image: HttpRequestBody, options?: ComputerVisionClientDetectObjectsInStreamOptionalParams): Promise<DetectObjectsInStreamResponse>

參數

image
HttpRequestBody

影像資料流程。

傳回

Promise < Models.DetectObjectsInStreamResponse>

detectObjectsInStream(HttpRequestBody, ComputerVisionClientDetectObjectsInStreamOptionalParams, ServiceCallback<DetectResult>)

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

參數

image
HttpRequestBody

影像資料流程。

callback

ServiceCallback<DetectResult>

回呼

detectObjectsInStream(HttpRequestBody, ServiceCallback<DetectResult>)

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

參數

image
HttpRequestBody

影像資料流程。

callback

ServiceCallback<DetectResult>

回呼

generateThumbnail(number, number, string, ComputerVisionClientGenerateThumbnailOptionalParams)

這項作業會產生具有使用者指定寬度和高度的縮圖影像。 根據預設,此服務會分析影像、識別相關區域 (ROI),並根據 ROI 產生智慧裁剪的座標。 當您指定與輸入影像不同的外觀比例時,智慧裁剪有助於。 成功的回應會包含縮圖影像二進位檔。 如果要求失敗,回應會包含錯誤碼和訊息,以協助判斷發生錯誤的原因。 失敗時,會傳回錯誤碼和錯誤訊息。 錯誤碼可能是 InvalidImageUrl、InvalidImageFormat、InvalidImageSize、InvalidThumbnailSize、NotSupportedImage、FailedToProcess、Timeout 或 InternalServerError 的其中一個。

function generateThumbnail(width: number, height: number, url: string, options?: ComputerVisionClientGenerateThumbnailOptionalParams): Promise<GenerateThumbnailResponse>

參數

width

number

縮圖的寬度,以圖元為單位。 它必須介於 1 到 1024 之間。 建議的最小值為 50。

height

number

縮圖的高度,以圖元為單位。 它必須介於 1 到 1024 之間。 建議的最小值為 50。

url

string

影像的可公開連線 URL。

傳回

Promise < Models.GenerateThumbnailResponse>

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

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

參數

width

number

縮圖的寬度,以圖元為單位。 它必須介於 1 到 1024 之間。 建議的最小值為 50。

height

number

縮圖的高度,以圖元為單位。 它必須介於 1 到 1024 之間。 建議的最小值為 50。

url

string

影像的可公開連線 URL。

callback

ServiceCallback<void>

回呼

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

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

參數

width

number

縮圖的寬度,以圖元為單位。 它必須介於 1 到 1024 之間。 建議的最小值為 50。

height

number

縮圖的高度,以圖元為單位。 它必須介於 1 到 1024 之間。 建議的最小值為 50。

url

string

影像的可公開連線 URL。

callback

ServiceCallback<void>

回呼

generateThumbnailInStream(number, number, HttpRequestBody, ComputerVisionClientGenerateThumbnailInStreamOptionalParams)

這項作業會產生具有使用者指定寬度和高度的縮圖影像。 根據預設,此服務會分析影像、識別相關區域 (ROI),並根據 ROI 產生智慧裁剪的座標。 當您指定與輸入影像不同的外觀比例時,智慧裁剪有助於。 成功的回應會包含縮圖影像二進位檔。 如果要求失敗,回應會包含錯誤碼和訊息,以協助判斷發生錯誤的原因。 失敗時,會傳回錯誤碼和錯誤訊息。 錯誤碼可能是 InvalidImageUrl、InvalidImageFormat、InvalidImageSize、InvalidThumbnailSize、NotSupportedImage、FailedToProcess、Timeout 或 InternalServerError 的其中一個。

function generateThumbnailInStream(width: number, height: number, image: HttpRequestBody, options?: ComputerVisionClientGenerateThumbnailInStreamOptionalParams): Promise<GenerateThumbnailInStreamResponse>

參數

width

number

縮圖的寬度,以圖元為單位。 它必須介於 1 到 1024 之間。 建議的最小值為 50。

height

number

縮圖的高度,以圖元為單位。 它必須介於 1 到 1024 之間。 建議的最小值為 50。

image
HttpRequestBody

影像資料流程。

傳回

Promise < Models.GenerateThumbnailInStreamResponse>

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

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

參數

width

number

縮圖的寬度,以圖元為單位。 它必須介於 1 到 1024 之間。 建議的最小值為 50。

height

number

縮圖的高度,以圖元為單位。 它必須介於 1 到 1024 之間。 建議的最小值為 50。

image
HttpRequestBody

影像資料流程。

callback

ServiceCallback<void>

回呼

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

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

參數

width

number

縮圖的寬度,以圖元為單位。 它必須介於 1 到 1024 之間。 建議的最小值為 50。

height

number

縮圖的高度,以圖元為單位。 它必須介於 1 到 1024 之間。 建議的最小值為 50。

image
HttpRequestBody

影像資料流程。

callback

ServiceCallback<void>

回呼

getAreaOfInterest(string, ComputerVisionClientGetAreaOfInterestOptionalParams)

此作業會在影像最重要的區域周圍傳回周框方塊。 成功回應會在 JSON 中傳回。 如果要求失敗,回應會包含錯誤碼和訊息,以協助判斷發生錯誤的原因。 失敗時,會傳回錯誤碼和錯誤訊息。 錯誤碼可能是 InvalidImageUrl、InvalidImageFormat、InvalidImageSize、NotSupportedImage、FailedToProcess、Timeout 或 InternalServerError 的其中一個。

function getAreaOfInterest(url: string, options?: ComputerVisionClientGetAreaOfInterestOptionalParams): Promise<GetAreaOfInterestResponse>

參數

url

string

影像的可公開連線 URL。

傳回

Promise < Models.GetAreaOfInterestResponse>

getAreaOfInterest(string, ComputerVisionClientGetAreaOfInterestOptionalParams, ServiceCallback<AreaOfInterestResult>)

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

參數

url

string

影像的可公開連線 URL。

getAreaOfInterest(string, ServiceCallback<AreaOfInterestResult>)

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

參數

url

string

影像的可公開連線 URL。

getAreaOfInterestInStream(HttpRequestBody, ComputerVisionClientGetAreaOfInterestInStreamOptionalParams)

此作業會在影像最重要的區域周圍傳回周框方塊。 成功回應會在 JSON 中傳回。 如果要求失敗,回應會包含錯誤碼和訊息,以協助判斷發生錯誤的原因。 失敗時,會傳回錯誤碼和錯誤訊息。 錯誤碼可能是 InvalidImageUrl、InvalidImageFormat、InvalidImageSize、NotSupportedImage、FailedToProcess、Timeout 或 InternalServerError 的其中一個。

function getAreaOfInterestInStream(image: HttpRequestBody, options?: ComputerVisionClientGetAreaOfInterestInStreamOptionalParams): Promise<GetAreaOfInterestInStreamResponse>

參數

image
HttpRequestBody

影像資料流程。

傳回

Promise < Models.GetAreaOfInterestInStreamResponse>

getAreaOfInterestInStream(HttpRequestBody, ComputerVisionClientGetAreaOfInterestInStreamOptionalParams, ServiceCallback<AreaOfInterestResult>)

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

參數

image
HttpRequestBody

影像資料流程。

getAreaOfInterestInStream(HttpRequestBody, ServiceCallback<AreaOfInterestResult>)

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

參數

image
HttpRequestBody

影像資料流程。

getReadResult(string, RequestOptionsBase)

此介面用於取得讀取作業的 OCR 結果。 此介面的 URL 應該從讀取介面傳回的 [作業位置] 欄位擷取。

function getReadResult(operationId: string, options?: RequestOptionsBase): Promise<GetReadResultResponse>

參數

operationId

string

在 'Read' 介面的回應中傳回的讀取作業識別碼。

options
RequestOptionsBase

選擇性參數

傳回

Promise < Models.GetReadResultResponse>

getReadResult(string, RequestOptionsBase, ServiceCallback<ReadOperationResult>)

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

參數

operationId

string

在 'Read' 介面的回應中傳回的讀取作業識別碼。

options
RequestOptionsBase

選擇性參數

getReadResult(string, ServiceCallback<ReadOperationResult>)

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

參數

operationId

string

在 'Read' 介面的回應中傳回的讀取作業識別碼。

listModels(RequestOptionsBase)

此作業會傳回電腦視覺 API 所支援之領域特定模型的清單。 目前,API 支援下列領域特定模型:名人辨識器、地標辨識器。 成功回應會在 JSON 中傳回。 如果要求失敗,回應將包含錯誤碼和訊息,以協助瞭解發生錯誤的原因。

function listModels(options?: RequestOptionsBase): Promise<ListModelsResponse>

參數

options
RequestOptionsBase

選擇性參數

傳回

Promise < Models.ListModelsResponse>

listModels(RequestOptionsBase, ServiceCallback<ListModelsResult>)

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

參數

options
RequestOptionsBase

選擇性參數

listModels(ServiceCallback<ListModelsResult>)

function listModels(callback: ServiceCallback<ListModelsResult>)

參數

read(string, ComputerVisionClientReadOptionalParams)

使用此介面來取得讀取作業的結果,採用針對大量文字檔優化的光學字元辨識 (OCR) 演算法。 當您使用讀取介面時,回應會包含名為 'Operation-Location' 的欄位。 [作業位置] 欄位包含您必須用於 'GetReadResult' 作業才能存取 OCR 結果的 URL。

function read(url: string, options?: ComputerVisionClientReadOptionalParams): Promise<ReadResponse>

參數

url

string

影像的可公開連線 URL。

options
ComputerVisionClientReadOptionalParams

選擇性參數

傳回

Promise<ReadResponse>

Promise < Models.ReadResponse>

read(string, ComputerVisionClientReadOptionalParams, ServiceCallback<void>)

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

參數

url

string

影像的可公開連線 URL。

options
ComputerVisionClientReadOptionalParams

選擇性參數

callback

ServiceCallback<void>

回呼

read(string, ServiceCallback<void>)

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

參數

url

string

影像的可公開連線 URL。

callback

ServiceCallback<void>

回呼

readInStream(HttpRequestBody, ComputerVisionClientReadInStreamOptionalParams)

使用此介面來取得讀取作業的結果,採用針對大量文字檔優化的光學字元辨識 (OCR) 演算法。 當您使用讀取介面時,回應會包含名為 'Operation-Location' 的欄位。 [作業位置] 欄位包含您必須用於 'GetReadResult' 作業才能存取 OCR 結果的 URL。

function readInStream(image: HttpRequestBody, options?: ComputerVisionClientReadInStreamOptionalParams): Promise<ReadInStreamResponse>

參數

image
HttpRequestBody

影像資料流程。

傳回

Promise < Models.ReadInStreamResponse>

readInStream(HttpRequestBody, ComputerVisionClientReadInStreamOptionalParams, ServiceCallback<void>)

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

參數

image
HttpRequestBody

影像資料流程。

callback

ServiceCallback<void>

回呼

readInStream(HttpRequestBody, ServiceCallback<void>)

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

參數

image
HttpRequestBody

影像資料流程。

callback

ServiceCallback<void>

回呼

recognizePrintedText(boolean, string, ComputerVisionClientRecognizePrintedTextOptionalParams)

光學字元辨識 (OCR) 偵測影像中的文字,並將辨識的字元擷取到機器可用的字元資料流。 成功時,將會傳回 OCR 結果。 失敗時,將會傳回錯誤碼與錯誤訊息。 錯誤碼可以是 InvalidImageUrl、InvalidImageFormat、InvalidImageSize、NotSupportedImage、NotSupportedLanguage 或 InternalServerError 的其中一個。

function recognizePrintedText(detectOrientation: boolean, url: string, options?: ComputerVisionClientRecognizePrintedTextOptionalParams): Promise<RecognizePrintedTextResponse>

參數

detectOrientation

boolean

是否偵測影像中的文字方向。 使用 detectOrientation=true 時,OCR 服務會嘗試偵測影像方向,並在進一步處理 (之前加以更正,例如,如果影像反轉) 。

url

string

影像的可公開連線 URL。

傳回

Promise < Models.RecognizePrintedTextResponse>

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

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

參數

detectOrientation

boolean

是否偵測影像中的文字方向。 使用 detectOrientation=true 時,OCR 服務會嘗試偵測影像方向,並在進一步處理 (之前加以更正,例如,如果影像反轉) 。

url

string

影像的可公開連線 URL。

callback

ServiceCallback<OcrResult>

回呼

recognizePrintedText(boolean, string, ServiceCallback<OcrResult>)

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

參數

detectOrientation

boolean

是否偵測影像中的文字方向。 使用 detectOrientation=true 時,OCR 服務會嘗試偵測影像方向,並在進一步處理 (之前加以更正,例如,如果影像反轉) 。

url

string

影像的可公開連線 URL。

callback

ServiceCallback<OcrResult>

回呼

recognizePrintedTextInStream(boolean, HttpRequestBody, ComputerVisionClientRecognizePrintedTextInStreamOptionalParams)

光學字元辨識 (OCR) 偵測影像中的文字,並將辨識的字元擷取到機器可用的字元資料流。 成功時,將會傳回 OCR 結果。 失敗時,將會傳回錯誤碼與錯誤訊息。 錯誤碼可以是 InvalidImageUrl、InvalidImageFormat、InvalidImageSize、NotSupportedImage、NotSupportedLanguage 或 InternalServerError 的其中一個。

function recognizePrintedTextInStream(detectOrientation: boolean, image: HttpRequestBody, options?: ComputerVisionClientRecognizePrintedTextInStreamOptionalParams): Promise<RecognizePrintedTextInStreamResponse>

參數

detectOrientation

boolean

是否偵測影像中的文字方向。 使用 detectOrientation=true 時,OCR 服務會嘗試偵測影像方向,並在進一步處理 (之前加以更正,例如,如果影像反轉) 。

image
HttpRequestBody

影像資料流程。

傳回

Promise < Models.RecognizePrintedTextInStreamResponse>

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

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

參數

detectOrientation

boolean

是否偵測影像中的文字方向。 使用 detectOrientation=true 時,OCR 服務會嘗試偵測影像方向,並在進一步處理 (之前加以更正,例如,如果影像反轉) 。

image
HttpRequestBody

影像資料流程。

callback

ServiceCallback<OcrResult>

回呼

recognizePrintedTextInStream(boolean, HttpRequestBody, ServiceCallback<OcrResult>)

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

參數

detectOrientation

boolean

是否偵測影像中的文字方向。 使用 detectOrientation=true 時,OCR 服務會嘗試偵測影像方向,並在進一步處理 (之前加以更正,例如,如果影像反轉) 。

image
HttpRequestBody

影像資料流程。

callback

ServiceCallback<OcrResult>

回呼

tagImage(string, ComputerVisionClientTagImageOptionalParams)

此作業會產生與所提供影像內容相關的單字或標記清單。 電腦視覺 API 可以根據影像中找到的物件、生物、生活或動作來傳回標記。 不同于類別,標籤不會根據階層式分類系統進行組織,而是對應至影像內容。 標記可能包含可避免不明確或提供內容的提示,例如 "ascomycete" 標記可能伴隨提示 "fungus"。 支援兩個輸入方法: (1) 上傳影像或 (2) 指定影像 URL。 成功回應會在 JSON 中傳回。 如果要求失敗,回應將包含錯誤碼和訊息,以協助瞭解發生錯誤的原因。

function tagImage(url: string, options?: ComputerVisionClientTagImageOptionalParams): Promise<TagImageResponse>

參數

url

string

影像的可公開連線 URL。

傳回

Promise<TagImageResponse>

Promise < Models.TagImageResponse>

tagImage(string, ComputerVisionClientTagImageOptionalParams, ServiceCallback<TagResult>)

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

參數

url

string

影像的可公開連線 URL。

callback

ServiceCallback<TagResult>

回呼

tagImage(string, ServiceCallback<TagResult>)

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

參數

url

string

影像的可公開連線 URL。

callback

ServiceCallback<TagResult>

回呼

tagImageInStream(HttpRequestBody, ComputerVisionClientTagImageInStreamOptionalParams)

此作業會產生與所提供影像內容相關的單字或標記清單。 電腦視覺 API 可以根據影像中找到的物件、生物、生活或動作來傳回標記。 不同于類別,標籤不會根據階層式分類系統進行組織,而是對應至影像內容。 標記可能包含可避免不明確或提供內容的提示,例如 "ascomycete" 標記可能伴隨提示 "fungus"。 支援兩個輸入方法: (1) 上傳影像或 (2) 指定影像 URL。 成功回應會在 JSON 中傳回。 如果要求失敗,回應將包含錯誤碼和訊息,以協助瞭解發生錯誤的原因。

function tagImageInStream(image: HttpRequestBody, options?: ComputerVisionClientTagImageInStreamOptionalParams): Promise<TagImageInStreamResponse>

參數

image
HttpRequestBody

影像資料流程。

傳回

Promise < Models.TagImageInStreamResponse>

tagImageInStream(HttpRequestBody, ComputerVisionClientTagImageInStreamOptionalParams, ServiceCallback<TagResult>)

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

參數

image
HttpRequestBody

影像資料流程。

callback

ServiceCallback<TagResult>

回呼

tagImageInStream(HttpRequestBody, ServiceCallback<TagResult>)

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

參數

image
HttpRequestBody

影像資料流程。

callback

ServiceCallback<TagResult>

回呼

繼承的方法的詳細資料

sendOperationRequest(OperationArguments, OperationSpec, ServiceCallback<any>)

傳送使用提供的 OperationSpec 填入的 HTTP 要求。

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

參數

operationArguments
OperationArguments

HTTP 要求樣板化值的引數將會從 中填入。

operationSpec
OperationSpec

用來填入 HTTPRequest 的 OperationSpec。

callback

ServiceCallback<any>

收到回應時要呼叫的回呼。

傳回

Promise<RestResponse>

繼承自ComputerVisionClientCoNtext.sendOperationRequest

sendRequest(RequestPrepareOptions | WebResourceLike)

傳送提供的 HTTPRequest。

function sendRequest(options: RequestPrepareOptions | WebResourceLike): Promise<HttpOperationResponse>

參數

傳回

繼承自ComputerVisionClientCoNtext.sendRequest