{"id":15312554,"url":"https://github.com/giulioz/laser-scanning","last_synced_at":"2026-03-09T00:34:07.515Z","repository":{"id":102688675,"uuid":"276594344","full_name":"giulioz/laser-scanning","owner":"giulioz","description":"📷🔦💭 A 3D Scanner using Laser Structured Light, written in Python using OpenCV and NumPy.","archived":false,"fork":false,"pushed_at":"2020-12-06T23:48:36.000Z","size":16839,"stargazers_count":104,"open_issues_count":4,"forks_count":29,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-09-11T22:49:10.587Z","etag":null,"topics":["3d-reconstruction","3d-scanning","computer-vision","opencv","structured-light"],"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/giulioz.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":"2020-07-02T08:41:56.000Z","updated_at":"2025-08-25T09:01:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"8ce70f5a-0a19-4b35-a73a-b582cf5a640b","html_url":"https://github.com/giulioz/laser-scanning","commit_stats":{"total_commits":22,"total_committers":2,"mean_commits":11.0,"dds":0.09090909090909094,"last_synced_commit":"f5ba2929a84e78ce0f2eebcce0dfa8cff3ce59c7"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/giulioz/laser-scanning","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giulioz%2Flaser-scanning","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giulioz%2Flaser-scanning/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giulioz%2Flaser-scanning/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giulioz%2Flaser-scanning/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/giulioz","download_url":"https://codeload.github.com/giulioz/laser-scanning/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giulioz%2Flaser-scanning/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30278556,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-08T20:45:49.896Z","status":"ssl_error","status_checked_at":"2026-03-08T20:45:49.525Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["3d-reconstruction","3d-scanning","computer-vision","opencv","structured-light"],"created_at":"2024-10-01T08:37:37.554Z","updated_at":"2026-03-09T00:34:07.495Z","avatar_url":"https://github.com/giulioz.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# laser-scanning\n\nA 3D Scanner using Laser Structured Light, written in Python using OpenCV and NumPy.\n\n### Input:\n\n![input](./docs/input.gif)\n\n### Output (in PLY format):\n\n![output](./docs/output.gif)\n\n_Source footage thanks to professor Filippo Bergamasco (Ca Foscari University of Venice)._\n\n## Usage\n\n### Camera Calibration\n\nBefore capturing the 3D model, a Camera Intrinsics calibration is expected. For this task you need to have some images with a calibration chessboard pattern. The calibration pattern is available in `patterns/chessboard.pdf`.\n\n![calibration pattern](./docs/example_pattern.png)\n\nAfter capturing the images, put them in the `calibration_images` folder and run this command:\n\n```\npython3 cameraCalibrator.py -v\n```\n\nYou can omit the `-v` option if you don't want to see debug output.\n\nAfter the calibration is completed the result will be saved in `intrinsics.xml`, ready to be loaded by the scanner.\n\n### Scanner\n\nTo start the scanner with a video file, run this command:\n\n```\npython3 scanner.py -v cup1.mp4\n```\n\nYou can omit the `-v` option if you don't want to see debug output.\n\nThe resulting scan will be showed after finish and will be saved in `output.ply`.\n\nYou may need to adjust the HSV ranges for the laser in the head of `scanner.py`.\n\n## Performance\n\nThe tests were performed on a MacBook Pro (i7-9750H @ 2.60GHz, 32Gb RAM DDR4, macOS 10.15.5).\n\n| File name  | Video length | Total Processing Time | Frames Proc Time |\n| ---------- | ------------ | --------------------- | ---------------- |\n| cup1.mp4   | 62s          | 101s                  | 79s              |\n| cup2.mp4   | 45s          | 89s                   | 66s              |\n| puppet.mp4 | 53s          | 91s                   | 73s              |\n| soap.mp4   | 72s          | 112s                  | 88s              |\n\nWe divided the time spent in initialization and mesh saving from the time spent in frame processing, to get a better estimate of the average frame processing time. Subtracting the frame time from the total time, we get an average of 19 seconds per video of fixed processing time.\n\nGiven that the videos are 15FPS, and considering only the frame processing time, the average processing time per frame is 0.092 seconds, with an average speed of 0.73x.\n\n### Profiling\n\nWe run a benchmark with cProfile to measure the performance of the application:\n\n![profile](./docs/prof.png)\n\nMost of the time is spent in:\n\n- **Line Plane Intersection** (~42%) – Difficult to do better in Python, since it involves a very long for loop, it may be useful to use less points\n- **OpenCV Undistort** (~16%) – Unavoidable processing time, already highly optimized by OpenCV in C++\n- **Ray Calculation** (~9%)\n- **Plane Fitting** (~7%)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgiulioz%2Flaser-scanning","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgiulioz%2Flaser-scanning","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgiulioz%2Flaser-scanning/lists"}