Image Analyze API

這篇文章要使用 Azure Computer Vision API 來對圖片進行相關的影像分析。

1.申請服務

先到以下網址申請服務。

https://portal.azure.com/#create/Microsoft.CognitiveServicesComputerVision

選擇相關方案: https://ithelp.ithome.com.tw/upload/images/20181017/20112426hRVqY1m5CR.png

2.取得金鑰

https://ithelp.ithome.com.tw/upload/images/20181017/20112426sMLUZYtBK0.png

3.使用API

可以先到以下網站: https://eastasia.dev.cognitive.microsoft.com/docs/services/56f91f2d778daf23d8ec6739/operations/56f91f2e778daf14a499e1fa/console

看到其提供的 API 種類: https://ithelp.ithome.com.tw/upload/images/20181017/201124260mulQBPiz8.png

Analyze Image API

接著我們先使用第一個 Analyze Image API

1.先填上請求參數: https://ithelp.ithome.com.tw/upload/images/20181017/20112426a67XVarT52.png

visualFeatures 可分析的特徵有如下:

2.放上要分析的圖片URL: https://ithelp.ithome.com.tw/upload/images/20181017/20112426YNb9Rycyu2.png

https://desk-fd.zol-img.com.cn/t_s960x600c5/g5/M00/0B/05/ChMkJ1aCHsGIF_JuABN-S6sntcUAAGskAMO8d4AE35j534.jpg

3.按下送出後即會回傳相關圖片分析後的數據:

https://ithelp.ithome.com.tw/upload/images/20181017/20112426Rd4ptSjc6s.png

程式範例如下:

Last updated

Was this helpful?