AI-For-Beginners/translations/zh-MO/lessons/4-ComputerVision/06-IntroCV/lab/MovementDetection.ipynb

108 lines
3.1 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 使用光流技術檢測手掌移動\n",
"\n",
"此實驗是 [AI 初學者課程](http://aka.ms/ai-beginners) 的一部分。\n",
"\n",
"請參考[這段影片](../../../../../../lessons/4-ComputerVision/06-IntroCV/lab/palm-movement.mp4),影片中一個人的手掌在穩定的背景上向左/右/上/下移動。\n",
"\n",
"**你的目標**是使用光流技術來判斷影片中哪些部分包含向上/向下/向左/向右的移動。\n",
"\n",
"首先,按照課堂中的描述獲取影片幀:\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Code here"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"現在,按照講座中描述的計算密集光流幀,並將密集光流轉換為極座標:\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Code here"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"為每個光流幀建立方向的直方圖。直方圖顯示有多少向量落在特定的區間內,並應該將幀中不同方向的運動區分開來。\n",
"\n",
"> 你可能也會想要將大小低於某個閾值的所有向量歸零。這樣可以去除影片中一些微小的多餘運動,例如眼睛和頭部的移動。\n",
"\n",
"繪製一些幀的直方圖。\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Code here"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"看著直方圖,應該很容易判斷移動的方向。你需要選擇那些對應於上/下/左/右方向的區間,並且超過某個閾值的區間。\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Code here"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"恭喜!如果您已完成以上所有步驟,您已完成實驗!\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n---\n\n**免責聲明** \n本文件已使用 AI 翻譯服務 [Co-op Translator](https://github.com/Azure/co-op-translator) 進行翻譯。儘管我們努力確保翻譯的準確性,但請注意,自動翻譯可能包含錯誤或不準確之處。原始文件的母語版本應被視為權威來源。對於關鍵信息,建議使用專業人工翻譯。我們對因使用此翻譯而引起的任何誤解或誤釋不承擔責任。\n"
]
}
],
"metadata": {
"language_info": {
"name": "python"
},
"orig_nbformat": 4,
"coopTranslator": {
"original_hash": "153d9e417e079bf62f8f693002d0deaf",
"translation_date": "2025-08-28T11:10:32+00:00",
"source_file": "lessons/4-ComputerVision/06-IntroCV/lab/MovementDetection.ipynb",
"language_code": "mo"
}
},
"nbformat": 4,
"nbformat_minor": 2
}