Tim M 57b5cefde5 Updated all `.md` files to contain newest image %!s(int64=2) %!d(string=hai) anos
..
cpp 67b7ce1ab1 Small correction: CamL -> CamR %!s(int64=2) %!d(string=hai) anos
data 09a69b0d64 Updated folder name %!s(int64=3) %!d(string=hai) anos
python 09a69b0d64 Updated folder name %!s(int64=3) %!d(string=hai) anos
README.md 57b5cefde5 Updated all `.md` files to contain newest image %!s(int64=2) %!d(string=hai) anos

README.md

Depth Estimation using Stereo Camera and OpenCV

This repository contains code for Depth Estimation using Stereo Camera and OpenCV blogpost.

download

Create a custom low-cost stereo camera and capture depth maps with it using OpenCV.

Directory Structure

All the code files and folders follow the following structure.

├── cpp
│   ├── disparity2depth_calib.cpp
│   ├── disparity_params_gui.cpp
│   ├── obstacle_avoidance.cpp
│   └── CMakeLists.txt
├── data
│   ├── depth_estimation_params.xml
│   ├── depth_estimation_params_cpp.xml
│   ├── depth_estmation_params_py.xml
│   ├── depth_params.xml
│   └── stereo_rectify_maps.xml
├── python
│   ├── disparity2depth_calib.py
│   ├── disparity_params_gui.py
│   ├── obstacle_avoidance.py
│   └── requirements.txt
└── README.md

Instructions

C++

To run the code in C++, please go into the cpp folder, then compile the disparity_params_gui.cpp, obstacle_avoidance.cpp and disparity2depth_calib.cpp code files, use the following:

mkdir build
cd build
cmake ..
cmake --build . --config Release

Use the following commands to execute the compiled files:

./build/disparity_params_gui
./build/disparity2depth_calib
./build/obstacle_avoidance

Python

To run the code in Python, please go into the python folder and refer to the following to use the disparity_params_gui.py, obstacle_avoidance.py and disparity2depth_calib.py files respectively:

python3 disparity_params_gui.py
python3 disparity2depth_calib.py
python3 obstacle_avoidance.py

AI Courses by OpenCV

Want to become an expert in AI? AI Courses by OpenCV is a great place to start.