Weitere ähnliche Inhalte
Ähnlich wie AI鏡頭-人臉自動置中_Vision AI-Face Tracking and center aligning (19)
Mehr von IttrainingIttraining (20)
AI鏡頭-人臉自動置中_Vision AI-Face Tracking and center aligning
- 2. 摘要
• 由於Youtuber 、 TikTok 等直播平台使網紅這個產
業竄起,因此為了滿足網紅的需要,使直播的攝
影鏡頭可以自動追隨人物,並且永遠可以使人物
置於鏡頭的中央。
• 設計一攝影裝置, 利用人工智慧自動取出畫面中
人臉位置,並利用2顆伺服馬達驅動使鏡頭可以自
動跟隨人臉移動。
- 5. To-Do List
1. 以Python Tkinter作為UI 展示專案成果
2. 利用face_recognition的 face_location取得人臉
bounding box, 計算bounding box在畫面中心的
座標
3. 利用AI影像識別出人臉身份並於畫面中標識出人
名
4. 轉動雲台的2顆伺服馬達,使bounding box移動
到畫面的中心位置
- 11. • Module: face_recognition
➜ Python的開源人臉識別庫,號稱識別率高
達百分之99 !!
• face_location
➜ 取出圖像中所有人臉的位置,
並以 [ top, right,bottom,left ] 形式呈現。
• 取得中心點
=( (right+ left)/2,(top, bottom)/2)
face_location取得人臉並找出中心座標
top
left right
bottom
240,240
0,0
- 12. 多人時合併bounding box,並找出中心座標
• 合併: 取出全部人像
tenhsu =[top, right, bottom, left]
Kate =[top, right, bottom, left]
最大邊框=[top, right, bottom, left]
min max max min
0,0
640,480
取得合併框中心點 =( (right+ left)/2,(top, bottom)/2)
- 19. Pixel ➜ Degree:
𝐷𝑒𝑔𝑟𝑒𝑒 𝑥 =
𝐹𝑎𝑐𝑒_𝑥_𝑙𝑜𝑐𝑎𝑡𝑖𝑜𝑛 − 𝐶𝑒𝑛𝑡𝑒𝑟_𝑥_𝑙𝑜𝑐𝑎𝑡𝑖𝑜𝑛
𝑃𝐷𝑟𝑎𝑡𝑖𝑜
𝐷𝑒𝑔𝑟𝑒𝑒 𝑦 =
𝐹𝑎𝑐𝑒_𝑦_𝑙𝑜𝑐𝑎𝑡𝑖𝑜𝑛 − 𝐶𝑒𝑛𝑡𝑒𝑟_𝑦_𝑙𝑜𝑐𝑎𝑡𝑖𝑜𝑛
𝑃𝐷𝑟𝑎𝑡𝑖𝑜
數據處理
𝑃𝐷𝑟𝑎𝑡𝑖𝑜: Pixel 與 Degree 之間的比值,研究後設定為20。以1m工
作距離,透過馬達轉動1度後,觀察pixel之變化而得。