{"id":17364543,"url":"https://github.com/baccega/smartphone-based-rti","last_synced_at":"2025-04-15T01:44:45.704Z","repository":{"id":41411110,"uuid":"411186104","full_name":"Baccega/smartphone-based-rti","owner":"Baccega","description":"🐍📷  Reflectance Transformation Imaging (RTI) using OpenCV in python","archived":false,"fork":false,"pushed_at":"2024-02-15T07:53:35.000Z","size":15316,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-28T13:44:44.534Z","etag":null,"topics":["opencv","python"],"latest_commit_sha":null,"homepage":"","language":"Python","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/Baccega.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}},"created_at":"2021-09-28T07:49:59.000Z","updated_at":"2025-01-17T15:38:22.000Z","dependencies_parsed_at":"2023-01-31T17:01:58.884Z","dependency_job_id":"f74ddde7-b03a-47ac-88a6-af82b62ed4ce","html_url":"https://github.com/Baccega/smartphone-based-rti","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Baccega%2Fsmartphone-based-rti","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Baccega%2Fsmartphone-based-rti/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Baccega%2Fsmartphone-based-rti/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Baccega%2Fsmartphone-based-rti/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Baccega","download_url":"https://codeload.github.com/Baccega/smartphone-based-rti/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248991531,"owners_count":21194893,"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":["opencv","python"],"created_at":"2024-10-15T20:42:45.307Z","updated_at":"2025-04-15T01:44:45.680Z","avatar_url":"https://github.com/Baccega.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🐍📷  Smartphone Based RTI\n\n![GitHub](https://img.shields.io/github/license/Baccega/smartphone-based-rti)\n[![Python version](https://img.shields.io/badge/Python-v3.10-blue.svg)](https://www.python.org/)\n[![PyTorch](https://img.shields.io/badge/PyTorch-v1.12-orange)](https://pytorch.org/)\n\n**Reflectance Transformation Imaging** (RTI) using footage from two smartphones without requiring an expensive light dome, created in **Python** utilizing **OpenCV** .\n\n## 🎥 Input\n\n![sample_input](./docs/sample_input.gif)\n\n\u003e Footage by professor Filippo Bergamasco (Ca' Foscari University of Venice)\n\n## 🕹 Output (interactive)\n\n![sample_output](./docs/sample_output.gif)\n\nThis project is the assignment for the course **Geometric and 3D Computer Vision 2020/2021**.\n\nSee **[FinalProject.pdf](FinalProject.pdf)** for more details on the assignment and to download the required assets.\n\n## 📦 Downloading assets (CoinDataset)\n\nBefore running the scripts you need to download the required assets, the assets should include:\n\n- The calibration videos for both cameras\n- The footage from the static camera\n- The footage from the moving camera\n\nYou need extract them inside a new folder called `assets/coins` in the root of the project.\nYour folder structure should look like this:\n\n![folder_structure](./docs/folder_structure.png)\n\n\u003e If you want you can change the location of the input files by changing the corresponding row on the file `constants.py` under the heading: `COINS ASSETS FILE NAMES AND DELAY BETWEEN FOOTAGE`.\n\n## 📦 Downloading assets (SynthRTIDataset)\n\nThe scripts also supports the ![SynthRTIDataset](https://github.com/Univr-RTI/SynthRTI) from the paper \"Neural Reflectance Transformation Imaging\".\nTo use it, in each folder the assets should include:\n\n- The images in jpg format\n- A file named: \"dirs.lp\"\n- An image called \"normals.png\" (Not required)\n\nYou need extract them inside a new folder called `assets/synthRTI` in the root of the project.\nYour folder structure should look like this:\n\n![folder_structure](./docs/folder_structure_2.png)\n\n## 🔧 Usage\n\nAfter downloading the assets you can just run this commands and follow the TUI:\n\n```bash\npython3 camera_calibrator.py        # Get camera intrinsics\npython3 analysis.py                 # Get data or model from footage\npython3 interactive_relighting.py   # View output\n```\n\n\u003e In the case of the machine learning models you can skip the interpolation step and compute the output in real time.\n\n## ⚙️ Interpolation methods available\n\n- **Linear RBF** (_From the scipy library_)\n- **Polinomial Texture Maps** (_Based on the homonymous paper from: Tom Malzbender, Dan Gelb, Hans Wolters_)\n- **PCA Model** (_Machine learning model based on the paper: On-the-go Reflectance Transformation Imaging with Ordinary Smartphones, from Mara Pistellato and Filippo Bergamasco_)\n\n## 🔬 Analysis debug modes descriptions\n\n| #   | Mode name     | Features                                                                         |\n| --- | ------------- | -------------------------------------------------------------------------------- |\n| 0   | No debug      | -                                                                                |\n| 1   | Minimal debug | Live footage, Current light direction, marker's contours                         |\n| 2   | Full debug    | Minimal debug, Moving camera threshold, Warped moving frame, highlighted corners |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaccega%2Fsmartphone-based-rti","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbaccega%2Fsmartphone-based-rti","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaccega%2Fsmartphone-based-rti/lists"}