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

102 lines
2.7 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",
"首先按照課堂中所述的方法提取影片的幀:\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本文件已使用人工智能翻譯服務 [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-31T09:49:51+00:00",
"source_file": "lessons/4-ComputerVision/06-IntroCV/lab/MovementDetection.ipynb",
"language_code": "hk"
}
},
"nbformat": 4,
"nbformat_minor": 2
}