{"id":29895569,"url":"https://github.com/raphaelsenn/lucas-kanade","last_synced_at":"2025-09-10T14:33:18.188Z","repository":{"id":306403072,"uuid":"1025665220","full_name":"raphaelsenn/lucas-kanade","owner":"raphaelsenn","description":"Simple C++ implementation of  Lucas-Kanade optical flow using OpenCV.","archived":false,"fork":false,"pushed_at":"2025-07-25T08:53:58.000Z","size":18939,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-25T14:24:58.459Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/raphaelsenn.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,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-24T15:49:41.000Z","updated_at":"2025-07-25T08:54:02.000Z","dependencies_parsed_at":"2025-07-25T14:28:29.869Z","dependency_job_id":"a27e2f14-0715-4644-a3fb-02cf32e43f42","html_url":"https://github.com/raphaelsenn/lucas-kanade","commit_stats":null,"previous_names":["raphaelsenn/lucas-kanade"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/raphaelsenn/lucas-kanade","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raphaelsenn%2Flucas-kanade","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raphaelsenn%2Flucas-kanade/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raphaelsenn%2Flucas-kanade/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raphaelsenn%2Flucas-kanade/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/raphaelsenn","download_url":"https://codeload.github.com/raphaelsenn/lucas-kanade/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raphaelsenn%2Flucas-kanade/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270033299,"owners_count":24515474,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-12T02:00:09.011Z","response_time":80,"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":[],"created_at":"2025-08-01T07:21:03.051Z","updated_at":"2025-08-12T09:10:20.661Z","avatar_url":"https://github.com/raphaelsenn.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lucas-kanade\nSimple C++ implementation of Lucas-Kanade optical flow using OpenCV. \n\n**Note:**  \nThis implementation is written with a focus on clarity and mathematical transparency rather than low-level optimizations.  \nBut it should run in real-time on any CPU \u003e the year 2010.\n\nThe original paper can be found here: [An Iterative Image Registration Technique with an Application to Stereo Vision](https://cseweb.ucsd.edu/classes/sp02/cse252/lucaskanade81.pdf)\n\n![lucas_kanade_gif](./assets/optical_flow_lk.gif)\n*Showing optical flow using lucas-kanade; Raw video taken from https://www.youtube.com/watch?v=zOq2XdwHGT0*\n\nWe calculate the optical flow using Equation (1).\nFor more details, see the [Lucas–Kanade method](https://en.wikipedia.org/wiki/Lucas%E2%80%93Kanade_method) on Wikipedia or the original paper  [An Iterative Image Registration Technique with an Application to Stereo Vision](https://cseweb.ucsd.edu/classes/sp02/cse252/lucaskanade81.pdf).\n![LK_linear_system](./assets/linear_system.png)\n*Equation (1); Taken from https://en.wikipedia.org/wiki/Lucas%E2%80%93Kanade_method*\n\n## Usage\nOpenCV, CMake, Make (and a compiler :D) is assumed to be installed.\n\n(1) The CMakeLists.txt should look like this:\n\n```cmake\ncmake_minimum_required(VERSION 3.5)\nproject( lucas-kanade )\nfind_package( OpenCV REQUIRED )\ninclude_directories( ${OpenCV_INCLUDE_DIRS} )\nadd_executable( run run.cpp src/lucas_kanade.cpp )\ntarget_link_libraries( run ${OpenCV_LIBS} )\n```\n\n(2) Generate the executable, make sure your in the repository folder.\n```bash\ncmake .\nmake\n```\n\n(3.1) Run with internal webcam (if available; press any key to quit):\n```bash\n./run\n```\n\n(3.2) Run with video from file (press any key to quit):\n```bash\n./run your_video.avi\n```\n\n## Citations\n```bibtex\n@inproceedings{10.5555/1623264.1623280,\nauthor = {Lucas, Bruce D. and Kanade, Takeo},\ntitle = {An iterative image registration technique with an application to stereo vision},\nyear = {1981},\npublisher = {Morgan Kaufmann Publishers Inc.},\nbooktitle = {Proceedings of the 7th International Joint Conference on Artificial Intelligence - Volume 2},\npages = {674–679},\nnumpages = {6},\nlocation = {Vancouver, BC, Canada},\nseries = {IJCAI'81}\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraphaelsenn%2Flucas-kanade","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraphaelsenn%2Flucas-kanade","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraphaelsenn%2Flucas-kanade/lists"}