9. Google 宣佈其影像辨識技術 Cloud Vision 的 API 開放測試,讓開發者能簡單地將影像辨識及分類
功能加入應用程式中。
Google 這項技術除了基本的文字辨識以外,還能認出圖像中的物件, 就和運用在 Google 照片中
的技術一樣,Google 宣稱這套演算法能辨識上千種不同物品,包括水果、食物、動物、建築等。
另一項有趣的功能是分類,比如說它能幫你找出限制級內容的照片並封鎖,也依據情感特徵辨認圖
片中的笑臉。
iOS Swift & Cloud Vision API 玩圖像辨識
10. 步驟
1. 申請 Google Cloud Vision API
2. 建立專案
3. Cocoapods SwiftJson
4. 編輯 Info.plist
5. 編輯 Main.storyboard
6. 編輯 ViewController.swift
iOS Swift & Cloud Vision API 玩圖像辨識
11. 申請 Google Cloud Vision API (https://console.cloud.google.com)
iOS Swift & Cloud Vision API 玩圖像辨識
13. 建立專案
Cocoapods SwiftJson
Pod init
編輯 Podfile
platform :ios, '9.0’
target 'ocrswift' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for ocrswift
pod 'SwiftyJSON', :git => 'https://github.com/IBM-Swift/SwiftyJSON.git’
end
iOS Swift & Cloud Vision API 玩圖像辨識