{"id":17145291,"url":"https://github.com/alyssaq/reconstruction","last_synced_at":"2025-04-13T09:32:42.505Z","repository":{"id":153170298,"uuid":"73902270","full_name":"alyssaq/reconstruction","owner":"alyssaq","description":"3D reconstruction with openCV and SFM","archived":false,"fork":false,"pushed_at":"2018-05-31T09:44:00.000Z","size":10,"stargazers_count":82,"open_issues_count":0,"forks_count":25,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T01:35:51.122Z","etag":null,"topics":["3d-reconstruction","docker","opencv","sfm"],"latest_commit_sha":null,"homepage":null,"language":"C++","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/alyssaq.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}},"created_at":"2016-11-16T09:02:12.000Z","updated_at":"2025-01-10T03:11:47.000Z","dependencies_parsed_at":"2023-10-20T16:54:34.387Z","dependency_job_id":null,"html_url":"https://github.com/alyssaq/reconstruction","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alyssaq%2Freconstruction","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alyssaq%2Freconstruction/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alyssaq%2Freconstruction/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alyssaq%2Freconstruction/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alyssaq","download_url":"https://codeload.github.com/alyssaq/reconstruction/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248690923,"owners_count":21146232,"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":["3d-reconstruction","docker","opencv","sfm"],"created_at":"2024-10-14T21:05:18.468Z","updated_at":"2025-04-13T09:32:40.912Z","avatar_url":"https://github.com/alyssaq.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 3D reconstruction from multiple 2D images\n\nThe current [structure from motion (SFM)](https://github.com/opencv/opencv_contrib/tree/master/modules/sfm) module from [openCV's extra modules](https://github.com/opencv/opencv_contrib) only runs on Linux.\n\nAs such, I used [docker](https://www.docker.com) on my Mac to reconstruct the 3D points.   \nCurrent docker environment uses Ceres Solver 1.14.0 and OpenCV 3.4.1\n\n## Docker Dev Environment\n```sh\n# Build the docker image\ndocker build -t opencv-sfm .\n# Run the docker container mounting `reconstruction` folder to `/app`\ndocker run -it -v \u003cpath_to_reconstruction_folder\u003e:/app opencv-sfm /bin/bash\n```\n\n## Run\n1) Download 2D temple images from \u003chttp://vision.middlebury.edu/mview/data\u003e\n\n2) Save list of images to `images.txt`:\n```sh\n# images.txt will contain lines of filepath\n# /app/temple/temple0302.png\nls temple/*.png \u003e images.txt\nsed -i -e 's/^/\\/app\\//' images.txt\n```\n3) In the docker container, compile the cpp file\n```\ng++ example_sfm.cpp  -L/usr/local/lib/  -lopencv_core -lopencv_sfm\n```\n4) Run the example with the list of images\n```sh\n./a.out # Prints the help text\n./a.out images.txt 350 240 360\n```\n\n## Test\n```sh\n# Test eigen (http://eigen.tuxfamily.org/dox/GettingStarted.html)\ng++ -I /usr/local/Cellar/eigen/3.3.4/include/eigen3 eigen_test.cpp -o eigen\n./eigen\n\n\n# Test with full includes\ng++ example_sfm.cpp -I /usr/include/eigen3/ -I/usr/local/include/opencv -I/usr/local/include/opencv2 -L /usr/local/share/OpenCV/3rdparty/lib/ -L/usr/local/lib/ -L /usr/include/eigen3/ -lopencv_core -lopencv_imgproc -lopencv_highgui -lopencv_ml -lopencv_optflow -lopencv_sfm -lopencv_viz\n```\n\n## License\n[MIT](http://alyssaq.github.io/mit-license/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falyssaq%2Freconstruction","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falyssaq%2Freconstruction","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falyssaq%2Freconstruction/lists"}