RapidAPI logo

Microsoft Computer Vision

フリーミアム
開発者 microsoft-azureOfficial
更新日 4ヶ月前
画像認識
9/10
人気度
1171ms
レイテンシ
97%
正常稼働率

Microsoft Computer Vision APIについて

Computer Vision APIは、画像を処理し情報を返す最先端のアルゴリズムを提供します。

APIプロバイダへ連絡
star-blue評価

OCR Response Data

textAngle

The angle, in degrees, of the detected text with respect to the closest horizontal or vertical direction. After rotating the input image clockwise by this angle, the recognized text lines become horizontal or vertical. In combination with the orientation property it can be used to overlay recognition results correctly on the original image, by rotating either the original image or recognition results by a suitable angle around the center of the original image. If the angle cannot be confidently detected, this property is not present. If the image contains text at different angles, only part of the text will be recognized correctly.

orientation

Orientation of the text recognized in the image. The value (up,down,left, or right) refers to the direction that the top of the recognized text is facing, after the image has been rotated around its center according to the detected text angle (see textAngle property).

language

The BCP-47 language code (user-provided or auto-detected) of the text detected in the image.

regions
An array of objects, where each object represents a region of recognized text. A region consists of multiple lines (e.g. a column of text in a multi-column document).

lines
An array of objects, where each object represents a line of recognized text.

words
An array of objects, where each object represents a recognized word.

boundingBox
Bounding box of a recognized region, line, or word, depending on the parent object. The four integers represent the x-coordinate of the left edge, the y-coordinate of the top edge, width, and height of the bounding box, in the coordinate system of the input image, after it has been rotated around its center according to the detected text angle (see textAngle property), with the origin at the top-left corner, and the y-axis pointing down.

text
String value of a recognized word.

SDKをインストール(NodeJS)

インストール

Node.jsでUnirestを使用するには、NPMモジュールをインストールしてください。

$ npm install unirest

インストール完了後は、簡単にリクエストを行うことができるようになります。

var unirest = require('unirest');

リクエスト

unirest.post("https://microsoft-azure-microsoft-computer-vision-v1.p.rapidapi.com/analyze?visualfeatures=Categories%2CTags%2CColor%2CFaces%2CDescription")
.header("X-RapidAPI-Host", "microsoft-azure-microsoft-computer-vision-v1.p.rapidapi.com")
.header("X-RapidAPI-Key", "ログインしてキーを取得")
.header("Content-Type", "application/x-www-form-urlencoded")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2認証
クライアントID
クライアントシークレット
OAuth2認証