{"id":16520013,"url":"https://github.com/pageauc/track-inout","last_synced_at":"2025-08-21T02:07:03.903Z","repository":{"id":74954777,"uuid":"100707710","full_name":"pageauc/track-inout","owner":"pageauc","description":"Windows, Unix, Raspberry Pi program uses opencv and python to track moving objects that enter and leave camera view and cross a vert or horz trigger center line.  Can be configured to take an image and log data to a csv file.  Includes a standalone web server for viewing image files.  At this point it is a demo since it would need more work but the basic operation is functional.","archived":false,"fork":false,"pushed_at":"2020-08-11T22:13:51.000Z","size":53,"stargazers_count":11,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-08T17:12:08.701Z","etag":null,"topics":["csv-files","curl-install","demo","enter","images","leave","monitor","motion-tracking","opencv","pi-camera","python","raspberry-pi","tracking","unix","web-camera","webserver","windows"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pageauc.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2017-08-18T11:57:27.000Z","updated_at":"2024-09-27T15:51:14.000Z","dependencies_parsed_at":"2023-07-27T05:16:20.861Z","dependency_job_id":null,"html_url":"https://github.com/pageauc/track-inout","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pageauc/track-inout","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pageauc%2Ftrack-inout","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pageauc%2Ftrack-inout/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pageauc%2Ftrack-inout/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pageauc%2Ftrack-inout/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pageauc","download_url":"https://codeload.github.com/pageauc/track-inout/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pageauc%2Ftrack-inout/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271415496,"owners_count":24755639,"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-21T02:00:08.990Z","response_time":74,"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":["csv-files","curl-install","demo","enter","images","leave","monitor","motion-tracking","opencv","pi-camera","python","raspberry-pi","tracking","unix","web-camera","webserver","windows"],"created_at":"2024-10-11T16:49:12.549Z","updated_at":"2025-08-21T02:07:03.896Z","avatar_url":"https://github.com/pageauc.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TRACK-INOUT  written by Claude Pageau\n### Tracks Enter, Leave Activity that cross a vert or horiz center line. Runs on Windows or Unix using Web Cam or Raspberry Pi using Web Cam or pi camera module. Uses python, opencv to track motion in real time\n\n### YouTube Video https://youtu.be/9et7QpbT5cc  \n\n## Introduction\nThis project came about when I decided to update my motion tracking demo and \nthought it would be a good idea to include something useful.  I decided to track\nentering a leaving Activity when they cross a vertical or horizontal centerline\nAt first it was a simple counter but now it also allows for options to \ntake an image and update a csv file.  You can add more features if you are\nfamiliar with python programming.  See my speed camera project for some ideas\nhttps://github.com/pageauc/speed-camera\n\n## Prerequisites\nRequires Windows, Unix computer with a Web Camera or a Raspberry Pi computer with\na Web Camera or RPI Camera Module and an up-to-date Raspbian distro.\nIf you wish to use a web camera that is plugged into a usb port. Set ***WEBCAM = True*** in config.py\notherwise, ***WEBCAM = False*** will use a connected raspberry pi camera module video stream.\nIf running under Windows or a Non RPI unix distro then Web camera will automatically be\nselected ***WEBCAM = True***\n\nThe dependencies and code files can be installed per the inout-install.sh script\nif you are using Debian or Raspbian, Otherwise select the Github download zip or clone\ngreen button on top right of GitHub repo web page here https://github.com/pageauc/track-inout\nSee Quick or Manual install instructions below for further details\n\n***Note*** The device control demo option is designed for a Raspberry Pi computer Only.\nI wrote this to help a student and decided to leave this code in.  I have not\nfully tested this with servo and LED's.  If you try this feature let me know.\n\n## Quick Install\nEasy Install of track-inout onto Debian or Raspberry Pi Computer.\n\n    curl -L https://raw.githubusercontent.com/pageauc/track-inout/master/inout-install.sh | bash\n\nFrom a computer logged into the RPI via ssh(Putty) session use mouse to highlight command above, right click, copy.\nThen select ssh(Putty) window, mouse right click, paste.  The command should\ndownload and execute the github inout-install.sh script and install the files into the track-inout folder.\nThis install can also be done directly on from a console or desktop terminal session and web browser.\n***Note*** A raspbian/debian apt-get update and upgrade will be performed as part of install\nso it may take some time if these are not up-to-date\n\n## Manual Install\nFrom logged in RPI SSH session or console terminal perform the following.\n\n    wget https://raw.githubusercontent.com/pageauc/track-inout/master/inout-install.sh\n    chmod +x inout-install.sh\n    ./inout-install.sh\n\n## How to Run\nDefault is console only display. Use Nano or text editor to Edit config.py\nvariable WINDOW_ON = True\nto display the opencv tracking window on GUI desktop. See other variables\nand descriptions for additional variable customization settings.\nFrom SSH session, console or GUI desktop terminal session execute the following commands\n\n    cd ~/track-inout\n    ./inout.py\n\nOn Windows make sure you have the latest python installed from https://www.python.org/downloads/\nTo install track-inout, clone or download zip from project github web page https://github.com/pageauc/track-inout\nuse 7zip to unzip file if required.  A track-inout folder will be created for the files (extract here).   \nRun inout.py from IDLE or if python file association exists it can also be\nrun from cmd prompt by double clicking on inout.py.  Use a text editor\nto modify settings in the config.py file per settings comments.\nTo view opencv window(s) on GUI desktop, edit config.py variable WINDOW_ON=True.\n\n## Trouble Shooting\n\nEdit the ***config.py*** file  \n\n    cd ~/track-inout\n    nano config.py\n    \nSet variable WINDOW_ON = True so the opencv status windows can display camera\nmotion images and a circle marking x,y coordinates and optionally the\nopencv threshold window.  The circle diameter can be change using CIRCLE_SIZE\nvariable.\nYou can set WINDOW_ON = False if you need to run from SSH terminal session only.  If\n***VERBOSE = True*** (default), then logging information will be displayed without a GUI desktop session.\n\n## Credits\nSome of this code is based on a YouTube tutorial by\nKyle Hounslow using C here https://www.youtube.com/watch?v=X6rPdRZzgjg\n\nThanks to Adrian Rosebrock jrosebr1 at http://www.pyimagesearch.com\nfor the PiVideoStream Class code available on github at\nhttps://github.com/jrosebr1/imutils/blob/master/imutils/video/pivideostream.py\n\n\n# Other motion Tracking Projects\n\n## motion-track.py - Motion Track Demo - Basic concept of tracking moving objects\nThis Demo program detects motion in the field of view and uses opencv to calculate the\nlargest contour above a minimum size and return its x,y coordinate.\n* Motion Track Demo YouTube Video http://youtu.be/09JS7twPBsQ\n* GitHub Repo https://github.com/pageauc/motion-track\n* RPI forum post https://www.raspberrypi.org/forums/viewtopic.php?p=790082#p790082\n\n## speed-camera.py - Object (vehicle) speed camera based on motion tracking\nTracks vehicle speeds or other moving objects in real time and records image\nand logs data. Now improved using threading for video stream and clipping of\narea of interest for greater performance.\n* GitHub Repo https://github.com/pageauc/speed-camera\n* YouTube Speed Camera Video https://youtu.be/eRi50BbJUro\n* RPI forum post https://www.raspberrypi.org/forums/viewtopic.php?p=1004150#p1004150\n\n## cam-track.py - Tracks camera x y movements\nUses a clipped search image rectangle to search subsequent video stream images and returns\nthe location. Can be used for tracking camera x y movements for stabilization,\nrobotics, Etc.\n* GitHub Repo https://github.com/pageauc/rpi-cam-track\n* YouTube Cam-Track Video https://www.youtube.com/edit?video_id=yjA3UtwbD80\n* Code Walkthrough YouTube Video https://youtu.be/lkh3YbbNdYg\n* RPI Forum Post https://www.raspberrypi.org/forums/viewtopic.php?p=1027463#p1027463\n\n## hotspot-game.py - A simple motion tracking game\nThe game play involves using streaming video of body motion to get as many hits\nas possible inside shrinking boxes that randomly move around the screen.\nPosition the camera so you can see body motions either close or standing.\nPretty simple but I think kids would have fun with it and they just might\ntake a look at the code to see how it works, change variables or game logic.\n* GitHub hotspot-game Repo https://github.com/pageauc/hotspot-game\n* YouTube Hotspot Gam Video https://youtu.be/xFl3lmbEO9Y\n* RPI Forum Post https://www.raspberrypi.org/forums/viewtopic.php?p=1026124#p1026124\n\n## ----------------------------------------------------------------------------\n\n\nHave Fun\nClaude Pageau\nYouTube Channel https://www.youtube.com/user/pageaucp\nGitHub Repo https://github.com/pageauc\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpageauc%2Ftrack-inout","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpageauc%2Ftrack-inout","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpageauc%2Ftrack-inout/lists"}