110 lines
3.5 KiB
Plaintext
110 lines
3.5 KiB
Plaintext
{
|
|
"cells": [
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"## Palm Movement Detection wit Optical Flow\n",
|
|
"\n",
|
|
"Dis lab na part of [AI for Beginners Curriculum](http://aka.ms/ai-beginners).\n",
|
|
"\n",
|
|
"Check [dis video](../../../../../../lessons/4-ComputerVision/06-IntroCV/lab/palm-movement.mp4), wey person palm dey move go left/right/up/down for stable background.\n",
|
|
"\n",
|
|
"<img src=\"../../../../../../translated_images/pcm/palm-movement.341495f0e9c47da3.webp\" width=\"30%\" alt=\"Palm Movement Frame\"/>\n",
|
|
"\n",
|
|
"**Your goal** na to use Optical Flow to sabi which part of di video get up/down/left/right movements.\n",
|
|
"\n",
|
|
"Start by collect video frames as dem explain for di lecture:\n"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"# Code here"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"Now, calculate dense optical flow frames as dem talk for di lecture, and change dense optical flow to polar coordinates:\n"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"# Code here"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"Build histogram for directions for each optical flow frame. Histogram dey show how many vectors dey fall inside certain bin, and e go separate different directions of movement for the frame.\n",
|
|
"\n",
|
|
"> You fit wan zero out all vectors wey their magnitude dey below certain threshold. This one go commot small extra movements for the video, like eye and head.\n",
|
|
"\n",
|
|
"Plot the histograms for some frames.\n"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"# Code here"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"If you dey look histograms, e suppose dey easy to sabi how movement dey go. You go need select di bins wey match up/down/left/right directions, and wey dey pass certain threshold.\n"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"# Code here"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"Congrat! If you don do all di steps wey dey up, you don finish di lab!\n"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"---\n\n<!-- CO-OP TRANSLATOR DISCLAIMER START -->\n**Disclaimer**: \nDis dokyument don use AI transleshion service [Co-op Translator](https://github.com/Azure/co-op-translator) do di transleshion. Even as we dey try make am correct, abeg make you sabi say automatik transleshion fit get mistake or no dey accurate well. Di original dokyument wey dey im native language na di one wey you go take as di main source. For important informashun, e better make you use professional human transleshion. We no go fit take blame for any misunderstanding or wrong meaning wey fit happen because you use dis transleshion.\n<!-- CO-OP TRANSLATOR DISCLAIMER END -->\n"
|
|
]
|
|
}
|
|
],
|
|
"metadata": {
|
|
"language_info": {
|
|
"name": "python"
|
|
},
|
|
"orig_nbformat": 4,
|
|
"coopTranslator": {
|
|
"original_hash": "153d9e417e079bf62f8f693002d0deaf",
|
|
"translation_date": "2025-11-18T18:56:36+00:00",
|
|
"source_file": "lessons/4-ComputerVision/06-IntroCV/lab/MovementDetection.ipynb",
|
|
"language_code": "pcm"
|
|
}
|
|
},
|
|
"nbformat": 4,
|
|
"nbformat_minor": 2
|
|
} |