{"id":17502109,"url":"https://github.com/itstorque/fpga-depth-camera","last_synced_at":"2025-03-28T19:26:26.897Z","repository":{"id":77107573,"uuid":"447449870","full_name":"itstorque/FPGA-Depth-Camera","owner":"itstorque","description":"FPGA Hardware Implementation Depth Estimation using a Camera Array and Color Segmentation","archived":false,"fork":false,"pushed_at":"2022-02-06T01:33:32.000Z","size":121,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-02T20:54:50.945Z","etag":null,"topics":["camera","depth-estimation","fpga"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","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/itstorque.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":"2022-01-13T03:25:46.000Z","updated_at":"2023-03-02T13:41:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"7f11c168-c060-486c-832e-a5fcfbcea225","html_url":"https://github.com/itstorque/FPGA-Depth-Camera","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/itstorque%2FFPGA-Depth-Camera","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itstorque%2FFPGA-Depth-Camera/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itstorque%2FFPGA-Depth-Camera/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itstorque%2FFPGA-Depth-Camera/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/itstorque","download_url":"https://codeload.github.com/itstorque/FPGA-Depth-Camera/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246087086,"owners_count":20721472,"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":["camera","depth-estimation","fpga"],"created_at":"2024-10-19T20:38:16.538Z","updated_at":"2025-03-28T19:26:26.878Z","avatar_url":"https://github.com/itstorque.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FPGA Depth Estimation using a Camera Array \n\nThis is a project built using the [Verik toolchain](https://verik.io/), synthesized using Vivado and uploaded onto a Nexys 4 \nArtix-7 FPGA Board. It uses the feed from two cameras and uses color segmentation to estimate the distance it is away from an \nobject in meters. The cameras registers are initialized using a Lolin D1 Mini Pro and have the data streamed without modification\nonto the FPGA, where all the processing happens.\n\nThere are multiple debug modes on the FPGA. The main mode is can be toggled using the 13th switch (`sw[12]`) and it toggles\nthe color segmentation mode. The other modes can be flipped through using the down button on the FPGA, it toggles pixel selection\nand overlays the crosshairs over each other for easier visibility during debugging.\n\nWhen running, the FPGA outputs two image streams using its VGA board with a crosshair on each centered on a color blob whenever \nit is using the color segmentation algorithm. The last three switches (`sw[13:15]`) toggle between segmenting over the R, G and B \nrespectively. The rest of the switches (`sw[0:5]` and `sw[6:11]`) help fine tune the segmentation and calibrate over different lighting\nconditions where each set controls the left and right output image respectively.\n\nColor segmentation usually uses hue instead of rgb. In this case I used something analogous to hue that is easier to implement\non hardware that I defined as follows: keep track of the dominant channel, the value of that channel is how much more dominant it is\nover the average of the other two. For displaying purposes, the other channels are zeroed out. For example, if a pixel has values\n`0x45ef67` (R: `69`, G: `239`, B: `103`), the dominant channel is G and its value is `239 - ( 69 + 103 )/2 = 0d153 = 0x99` and so our output pixel is\n`0x009900`.\n\nThe file structure is as below\n\n- `build/`: Build output directory.\n- `ip/`: Contains all the ip imported into the projected.\n- `ov7670_control/`: Arduino code that controls the two Lolins.\n- `src/`: Project source directory.\n- `.idea`: IntelliJ IDEA project configuration directory.\n- `build.gradle.kts`: Gradle build file.\n- `LUTgenerator.py`: generates the look-up table that converts pixel locations to distance estimations.\n- `settings.gradle.kts`: Gradle settings file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitstorque%2Ffpga-depth-camera","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitstorque%2Ffpga-depth-camera","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitstorque%2Ffpga-depth-camera/lists"}