![]() |
ImFusion SDK 4.3
|
Guide to monocular depth estimation from single RGB images.
Collaboration diagram for Monocular Depth Estimation:Guide to monocular depth estimation from single RGB images.
This page provides detailed information and code examples for estimating depth from single RGB images using the MonocularDepthEstimationAlgorithm class. This algorithm can convert 2D images into depth maps and optionally generate 3D point clouds, making it useful for 3D reconstruction, augmented reality, and computer vision applications. Monocular depth estimation is a computer vision technique that estimates the relative depth of objects in a scene from a single RGB image. Unlike stereo vision or structured light systems, it doesn't require multiple cameras or special hardware, making it suitable for applications where only a single camera is available.
The MonocularDepthEstimationAlgorithm class provides a high-level interface for depth estimation, while the underlying MonocularDepthEstimation class handles the core estimation logic.
The following example demonstrates basic usage of the MonocularDepthEstimationAlgorithm where we assume the input is
inputImages of type std::unique_ptr<SharedImageSet>.K of type Eigen::Matrix3d.MonocularDepthEstimation allow running your custom models through our machine learning engines.
This is done by tracing or scripting your Torch or exporting your ONNX model and linking it through a configuration file.
Here is an example configuration file in .yaml format for MonocularDepthEstimation:
We require InputFields and OutputFields to have exactly the same names as mentioned above. In our current release, we only support the Depth output to be exposed to the user, returned as the first element by the model. Any additional outputs should still be appended in OutputFields and PredictionOutput with its return type but they will be discarded.
For further information on the machine learning configuration files, please refer to the Machine Learning Model page in our user documentation.