什麼是 Bing 圖像式搜尋 API?What is the Bing Visual Search API?

Bing 圖像式搜尋 API 會傳回影像的見解。The Bing Visual Search API returns insights for an image. 您可以上傳影像,也可以提供影像的 URL。You can either upload an image or provide a URL to one. 見解是視覺上類似的影像、購物來源、包含影像的網頁等。Insights are visually similar images, shopping sources, webpages that include the image, and more. Bing 圖像式搜尋 API 所傳回的見解,類似於 Bing.com/images 上顯示的內容。Insights returned by the Bing Visual Search API are similar to ones shown on Bing.com/images.

如果您使用 Bing 影像搜尋 API,則可對 Bing 圖像式搜尋使用來自該 API 搜尋結果的見解權杖,而非上傳影像。If you use the Bing Image Search API, you can use insight tokens from that API's search results for your Bing Visual Search instead of uploading an image.

重要

如果您使用 Bing 影像搜尋 API 取得影像見解,請考慮切換至 Bing 圖像式搜尋 API,其可提供更完整的見解。If you get image insights using the Bing Image Search API, consider switching to the Bing Visual Search API, which provides more comprehensive insights.

深入解析Insights

您可以使用 Bing 圖像式搜尋來探索下列見解:You can discover the following insights by using Bing Visual Search:

見解Insight 描述Description
在視覺效果上類似的影像Visually similar images 外觀上類似於輸入影像的影像清單。A list of images that are visually similar to the input image.
在視覺效果上類似的產品Visually similar products 外觀上類似於所示產品的產品。Products that are visually similar to the product shown.
購物來源Shopping sources 可購買到輸入影像中所含項目的地點清單。Places where you can buy the item shown in the input image.
相關搜尋Related searches 由他人建立或根據影像內容而建立的相關搜尋。Related searches made by others or that are based on the contents of the image.
包含影像的網頁Webpages that include the image 包含輸入影像的網頁。Webpages that include the input image.
食譜Recipes 一份網頁清單,這些網頁包含用來烹調輸入影像中所含菜餚的食譜。Webpages that include recipes for making the dish shown in the input image.
實體Entities 知名的人員、地點和事物。Well-known people, places, and things.

除了見解,Bing 圖像式搜尋也會傳回從輸入影像衍生的各種字詞 (亦即標記)。In addition to insights, Bing Visual Search returns a variety of terms (that is, tags) derived from the input image. 標記可讓使用者瀏覽影像中出現的概念。The tags enable users to explore concepts found in the image. 例如,如果輸入影像顯示的是知名運動員,則其中一個標記可能是運動員的名字,另外也可能有「運動」標記。For example, if the input image is of a famous athlete, one of the tags may be the name of the athlete, another tag could be Sports. 或者,如果輸入影像顯示的是蘋果派,則可能會有「蘋果派」、「甜派」和「甜點」等標記。Or, if the input image is of an apple pie, the tags could be Apple Pie, Pies, and Desserts.

Bing 圖像式搜尋的結果也會包含影像中相關區域的週框。Bing Visual Search results also include bounding boxes for regions of interest in the image. 例如,如果影像包含數個名人,則結果可能會為可辨識的每個名人加上週框。For example, if the image contains several celebrities, the results may include bounding boxes for each of the recognized celebrities. 或者,如果 Bing 在影像中辨識出某項產品或服飾,則結果可能會為可辨識的項目加上週框。Or, if Bing recognizes a product or clothing in the image, the result may include a bounding box for the recognized item.

工作流程Workflow

Bing 圖像式搜尋 API 是一種 RESTful Web 服務,因此可輕易地從任何可發出 HTTP 要求及剖析 JSON 的程式設計語言呼叫。The Bing Visual Search API is a RESTful web service, making it easy to call from any programming language that can make HTTP requests and parse JSON. 您可以對此服務使用 REST API 或 SDK。You can use either the REST API or the SDK for the service.

  1. 建立認知服務帳戶來存取 Bing 搜尋 API。Create a Cognitive Services account to access the Bing Search APIs. 如果您沒有 Azure 訂用帳戶,可以建立免費帳戶If you don't have an Azure subscription, you can create an account for free. 您可以在建立帳戶後從 Azure 入口網站取得訂用帳戶金鑰,也可以在啟用免費試用版後從 Azure 網站來取得。You can get your subscription key from the Azure portal after creating your account, or Azure website after activating a free trial.
  2. 使用有效的搜尋查詢,將要求傳送至 API。Send a request to the API with a valid search query.
  3. 剖析傳回的 JSON 訊息以處理 API 回應。Process the API response by parsing the returned JSON message.

後續步驟Next steps

首先,觀看 Bing 圖像式搜尋 API 的互動式示範First, try the Bing Visual Search API interactive demo. 此示範將說明如何快速地自訂搜尋查詢,並翻找出 Web 上的影像。The demo shows how you can quickly customize a search query and scour the web for images.

若要快速開始使用您的第一個要求,請參閱 C# | JAVA | node.js | PythonTo get started quickly with your first request, see the quickstarts: C# | Java | node.js | Python.

另請參閱See also