{"id":24522412,"url":"https://github.com/t2solve/realbugtracker","last_synced_at":"2025-03-15T13:12:08.793Z","repository":{"id":268871119,"uuid":"571799961","full_name":"t2solve/realbugtracker","owner":"t2solve","description":"extract movement trajectory of moving objects in videos from image based tracking","archived":false,"fork":false,"pushed_at":"2024-12-28T09:33:29.000Z","size":3523,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-22T03:19:36.129Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/t2solve.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}},"created_at":"2022-11-28T22:57:25.000Z","updated_at":"2022-11-30T10:01:04.000Z","dependencies_parsed_at":"2024-12-19T12:30:27.445Z","dependency_job_id":"12d230e1-39c8-4ac4-9689-81e42fb674c2","html_url":"https://github.com/t2solve/realbugtracker","commit_stats":null,"previous_names":["t2solve/realbugtracker"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t2solve%2Frealbugtracker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t2solve%2Frealbugtracker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t2solve%2Frealbugtracker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t2solve%2Frealbugtracker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/t2solve","download_url":"https://codeload.github.com/t2solve/realbugtracker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243732293,"owners_count":20338839,"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","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-01-22T03:19:35.402Z","updated_at":"2025-03-15T13:12:08.770Z","avatar_url":"https://github.com/t2solve.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# realbugtracker\n\ncite this project with : \n[![DOI](https://zenodo.org/badge/571799961.svg)](https://zenodo.org/badge/latestdoi/571799961)\n\n\n\n![movingbug](pics/example.gif \"example\")\n(See gif shows an example of a moving Nebria brevicollis ( aka bug:) the red border shows the detected contour and the bigger red dot, the centroid of the moving contour)\n\n## project aim\n\n* extract movement trajectory of moving objects in videos from image based tracking\n* process a small example (see download link) of a moving bug (species: Nebria brevicollis)\n\n## supported os\n\n* tested on linux debian / ubuntu builds\n\n## license\n\nMIT License\n\n## dependency\n\n* c++ library OpenCV (4.6 or above)\n* c++ library bgs lib (3.2 or above)\n* c libarchive (3.4 or above)\n\n## needed input\n\n* picture collection (frames) of a moving object (download example)\n* time code of each frame in a text file (see example)\n* neutral background\n* fix orientation of camera to 2D arena surface\n\n### preparation of the setup\n\n1. install camera in top view position ( orthogonal and centered) of flat 2D surface e.g.\n![setup](pics/setup.png \"setup\")\n(the pictures shows a Prosilica GT 1920 camera from Allied Vision, which could be controlled via a c++ sdk vimba, not published here)\n\n1. do a camera calibration, explained [here](https://docs.opencv.org/4.x/d4/d94/tutorial_camera_calibration.html) (use the code at the opencv repository [here](https://github.com/opencv/opencv/tree/4.x/samples/cpp/tutorial_code/calib3d/camera_calibration/camera_calibration.cpp) )\n2. save the camera calibration file\n\n# processing\n\n3 software pieces are implemented for processing\n \n# Tool 1: extractcenterpoints.cpp\naim: extract the moving objects, write polygons and center to one file for each frame, see the [code](src/extractcenterpoints.cpp) and read the steps\n\n\nstep 0) do lens correction, uses the camera calibration to make lens correction\n\nstep 1) cut the region of interest, to avoid any reflection artifacts\n\nstep 2) uses [bgslibrary](https://github.com/andrewssobral/bgslibrary) to extract the moving object, here we use method \"Background Segmentation with Feedback: \"The Pixel-Based Adaptive Segmenter\" was used  TODO cite paper here\n\nstep 3) apply  edge detection\n\nstep 4) apply filter for contours sizes\n\nstep 5) calc hu moments and and mass center for the contour selection (optional, needed for visual debugging needed)\n\nstep 6) calc convex hull of all polygons\n\nstep 7) calc hu moments and and mass center (centroid) for the convex hull \nstep 8) write all contours, mass centers and the convex hull points to a yml file\n\n# Tool 2:  mergetimeline.cpp\naim: merge the polygon file and the timetable to on time line file of centroids, see the [code](src/mergetimeline.cpp)\n\n\nstep 0) read all files\n\nstep 1) select the centroid of the convex hull, if there is at least one polygon in the frame\n\nstep 2) write down the information to 1 file\n\n# Tool 3:  producetrajectory.cpp\naim: merge the polygon file and the timetable to on trajectory file\nsee the [code](src/producetrajectory.cpp)\n\n\nstep 0) project trajectory position data from camera space into real world space using the camera calibration file\n\nstep 1) summaries all position in a trajectory file\n\n# compile the code\n\n```bash\ncmake .\nmake -j 10 \ncd bin\n```\n\n# process the example\n\n## download example\n\ndowload 316 mb example data from http://t2solve.com/realbugtracker/rec97371911.tar.gz to examples folder\nor use the script [here](examples/downloadExample.sh) or use the following steps below. please verify the tar file via checksum\n\n```bash\ncd examples\necho \"download the example file\" \nwget http://t2solve.com/realbugtracker/rec97371911.tar.gz\necho \"download the checksum file \" \nwget http://t2solve.com/realbugtracker/rec97371911.tar.gz.sha512\necho \"validate checksum\" \nsha512sum -c rec97371911.tar.gz.sha512\n```\n\n## unpack example\n\n```bash\ntar xzvf rec97371911.tar.gz\n```\n\n## read docu\n\n```bash\n#file meaning\nmore rec97371911/README.md\n#howtp start Tool 1\nmore rec97371911/runStep1.sh\n#howtp start Tool 2\nmore rec97371911/runStep2.sh\n#howtp start Tool 3\nmore rec97371911/runStep3.sh\n```\n\n## run example\n\n```bash\ncd rec97371911 \n./run.sh\n```\n\n## hint 1: build bgslib on linux debian\n\n```bash\ngit clone https://github.com/andrewssobral/bgslibrary \ncd bgslibrary\ngit checkout v3.2.0 #use tested tagged version\ncmake .\nmake -j 10\nsudo make install\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ft2solve%2Frealbugtracker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ft2solve%2Frealbugtracker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ft2solve%2Frealbugtracker/lists"}