{"id":20935228,"url":"https://github.com/syanenko/magichand","last_synced_at":"2026-05-09T19:08:53.883Z","repository":{"id":130344798,"uuid":"322339535","full_name":"syanenko/MagicHand","owner":"syanenko","description":"Hand pose detection with shaders effects","archived":false,"fork":false,"pushed_at":"2024-01-21T17:10:26.000Z","size":8151,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-31T02:30:05.053Z","etag":null,"topics":["c","deep-learning","glsl","glsl-shaders","glut","gpu","opencv","opengl"],"latest_commit_sha":null,"homepage":"","language":"GLSL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/syanenko.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-12-17T15:42:43.000Z","updated_at":"2024-01-21T17:07:57.000Z","dependencies_parsed_at":"2024-01-21T18:36:57.189Z","dependency_job_id":null,"html_url":"https://github.com/syanenko/MagicHand","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/syanenko/MagicHand","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syanenko%2FMagicHand","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syanenko%2FMagicHand/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syanenko%2FMagicHand/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syanenko%2FMagicHand/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/syanenko","download_url":"https://codeload.github.com/syanenko/MagicHand/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syanenko%2FMagicHand/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32831560,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"online","status_checked_at":"2026-05-09T02:00:06.633Z","response_time":123,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","deep-learning","glsl","glsl-shaders","glut","gpu","opencv","opengl"],"created_at":"2024-11-18T22:13:50.090Z","updated_at":"2026-05-09T19:08:53.864Z","avatar_url":"https://github.com/syanenko.png","language":"GLSL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Magic hand\n-- \u003cem\u003eWhat\u003c/em\u003e\u003cbr\u003e\nHand pose detection with OpenCV/DNN, applying shaders effects with OpenGL/GLUT/GLSL.  \n\n-- \u003cem\u003eWhy\u003c/em\u003e\u003cbr\u003e\nExplore OpenCV, DNN, OpenGL interoperability, play with GLSL  \n\n-- \u003cem\u003eHow  \u003c/em\u003e\u003cbr\u003e\n* OpenGL/GLUT/GLSL part based on Peter R. Elespuru code: https://github.com/elespuru/elespuru-cvglsl  \n* OpenCV hand pose detection based on this example:      https://github.com/opencv/opencv/blob/master/samples/dnn/openpose.cpp  \n  \n#### Requirements  \n* *Hardware:* Nvidia Geforce RTX 2060 or higher (OpenCV build for CUDA compute capability 7.5, you can rebuild it for GPU you have).\nMore about CUDA architecture versions: https://developer.nvidia.com/cuda-gpus   \n* *Software:* Windows 7 or higher \n\n#### Running from pre-built binaries\n\n1. Download DNN model: https://drive.google.com/file/d/1nms4M5plslVEG1RSzLQVydi8Df7KiaLs/view?usp=sharing (or use getModels.sh)  \nand unzip to `\u003cyour_location\u003e\\MagicHand\\model`.  \n  \n1. Download required DLLs: https://drive.google.com/file/d/115ty4cpAiCNTgYNGquw9NbH4c7g5JztJ/view?usp=sharing \nand unzip to `\u003cyour_location\u003e\\MagicHand\\bin`.  \n\n1. Run:\n```\ncd \u003cyour_location\u003e\\MagicHand\n.\\bin\\MagicHand.exe\n```\n\n#### Compiling from sources\n1. Install NVIDIA CUDA Toolkit 10.2: https://developer.nvidia.com/cuda-10.2-download-archive.  \n1. Install cuDNN for CUDA  10.2: https://developer.nvidia.com/rdp/cudnn-download.  \n1. Download and build OpenCV: https://github.com/opencv/opencv with options WITH_CUDA=ON, OPENCV_DNN_CUDA=ON,  \n   detailed instructions are here: https://www.pyimagesearch.com/2020/02/03/how-to-use-opencvs-dnn-module-with-nvidia-gpus-cuda-and-cudnn/.  \n1. Download and install FreeGlut: http://freeglut.sourceforge.net/.  \n1. Download and install Glew: http://glew.sourceforge.net/.  \n1. Open MagicHand solution in Visual Studio 2017 or later, then open MagicHand project's properties.\n1. Change appropriate include directories in section `C/C++/General/Additional Include Directories` and library directories in section `Linker/General/Additional Library Directories` according to locations of above dependencies.\n1. Build desired configuration.\n1. Be sure that `freeglut.dll` and `glew32.dll` are in the path or place them in `\u003cyour_location\u003e\\MagicHand\\bin`.\n1. Run: `Ctrl+F5` or\n```\ncd \u003cyour_location\u003e\\MagicHand\n.\\bin\\MagicHand.exe\n```\n\n#### Help\n```\nUsage: MagicHand [-h][-v [`\u003cfile`\u003e]]  \n-h: Show this help  \n-v: Save video to \u003cfile\u003e, \u003cfile\u003e will be 'MagicHand.avi' if not specified  \n```\n\n#### Control\n\n| Keys | Actions |\n|------|---------|\n| PgUp/PgDn | switch shaders | \n| +/- | zooms in/out |\n|Arrows|pan|\n|P / p|change number of passes|\n|a|draw axes|\n|t or , | decrease net threshold|\n|T or . | increase net threshold| \n|d|show debug window|\n|j| draw joints (focus on debug window)|\n|r| draw areas (focus on debug window)|\n|l| draw lines (focus on debug window)|\n|z| decrease area size (focus on debug window)|\n|x| increase area size (focus on debug window)|\n|Enter| set default views|  \n|Esc|exit|\n\n#### Technical details\n\nFollowing uniforms are accessible in shaders:\n```\nuniform sampler2D u_texture;     // - Image, captured from camera\nuniform vec2      u_resolution;  // - Image size\nuniform float     u_time;        // - Shader running time in seconds\nuniform vec2      u_mouse_move;  // - Free mouse move coordinates as retuned by glutPassiveMotionFunc()\nuniform vec4      u_mouse_click; // - Mouse click position and state as retuned by glutMouseFunc()\nuniform vec2      u_hand[22];    // - Hand points, detected by DNN module\n```\n\nGlut functions reference:  \nhttps://www.opengl.org/resources/libraries/glut/spec3/node51.html  \nhttps://www.opengl.org/resources/libraries/glut/spec3/node50.html  \n  \n#### Hand pose detection background\n\nGeneral idea: https://www.learnopencv.com/hand-keypoint-detection-using-deep-learning-and-opencv/  \n\nOriginal paper: \"Hand Keypoint Detection in Single Images using Multiview Bootstrapping\" by Tomas, Simon Hanbyul Joo, Iain Matthews, Yaser Sheikh from Carnegie Mellon University (https://github.com/syanenko/MagicHand/blob/main/doc/1704.07809.pdf).\n\nContact me at [LinkedIn](https://www.linkedin.com/in/sergey-yanenko-57b21a96/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyanenko%2Fmagichand","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsyanenko%2Fmagichand","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyanenko%2Fmagichand/lists"}