![]() |
ImFusion C++ SDK 4.5.0
|
#include <ImFusion/Vision/StereoReconstructionRAFT.h>
Stereo disparity backend based on RAFT-Stereo (https://arxiv.org/abs/2109.07547). More...
Stereo disparity backend based on RAFT-Stereo (https://arxiv.org/abs/2109.07547).
Uses an architecture closely related to OpticalFlowRAFT but trained for stereo matching. Pretrained weights are taken from the Princeton RAFT-Stereo release (https://github.com/princeton-vl/RAFT-Stereo?tab=readme-ov-file#new-031723-robust-vision-challenge-2022). Registered in StereoReconstructionFactory as "Stereo RAFT". Expects rectified stereo pairs and returns a single-channel floating-point disparity map. Temporal warm-start and iterative refinement are available via p_initializeFromPreviousComputation and p_numRefinements.
Public Member Functions | |
| std::string | name () const override |
| Return name of stereo algorithm. | |
| std::unique_ptr< SharedImage > | compute (SharedImage &imgLeft, SharedImage &imgRight) override |
| Run stereo computation on provided images. Images must be rectified. Output image must be disparity map of type float. | |
| void | configure (const Properties *p) override |
| Configure this object instance by de-serializing the given Properties. | |
| void | configuration (Properties *p) const override |
| Serialize the current object configuration into the given Properties object. | |
| Public Member Functions inherited from ImFusion::StereoReconstruction | |
| virtual std::unique_ptr< SharedImage > | compute (StereoImage &si) |
| Public Member Functions inherited from ImFusion::Configurable | |
| virtual void | configureDefaults () |
| Retrieve the properties of this object, replaces values with their defaults and sets it again. | |
| void | registerParameter (ParameterBase *param) |
| Register the given Parameter or SubProperty, so that it will be configured during configure()/configuration(). | |
| void | unregisterParameter (const ParameterBase *param) |
| Remove the given Parameter or SubProperty from the list of registered parameters. | |
| Configurable (const Configurable &rhs) | |
| Configurable (Configurable &&rhs) noexcept | |
| Configurable & | operator= (const Configurable &) |
| Configurable & | operator= (Configurable &&) noexcept |
Public Attributes | |
| Parameter< bool > | p_initializeFromPreviousComputation = {"Init from previous computation", false, this} |
If true, store the computed disparity internally and initialize the next computation from it. | |
| Parameter< int > | p_numRefinements = {"Number of refinements", 0, this} |
Number of additional disparity refinement iterations (n > 0 refines on top of step n − 1). | |
| Parameter< bool > | p_resizeToDefaultResolution = {"Downsample to train resolution (if larger)", true, this} |
Downsample inputs to training resolution when they are larger. Recommended true (model trained on lower resolutions). | |
| Parameter< bool > | p_useSmallerModel = {"Use smaller network", false, this} |
| Use the smaller network variant (lower runtime, possibly lower quality). | |
| Public Attributes inherited from ImFusion::Configurable | |
| Signal | signalParametersChanged |
| Emitted whenever one of the registered Parameters' or SubPropertys' signalValueChanged signal was emitted. | |
Additional Inherited Members | |
| Protected Attributes inherited from ImFusion::Configurable | |
| std::vector< Param > | m_params |
| List of all registered Parameter and SubProperty instances. | |
|
inlineoverridevirtual |
Return name of stereo algorithm.
Implements ImFusion::StereoReconstruction.
|
overridevirtual |
Run stereo computation on provided images. Images must be rectified. Output image must be disparity map of type float.
Implements ImFusion::StereoReconstruction.
|
overridevirtual |
Configure this object instance by de-serializing the given Properties.
The default implementation will do so automatically for all registered Parameter and SubProperty instances.
Reimplemented from ImFusion::Configurable.
|
overridevirtual |
Serialize the current object configuration into the given Properties object.
The default implementation will do so automatically for all registered Parameter and SubProperty instances.
Reimplemented from ImFusion::Configurable.
| Parameter<bool> ImFusion::StereoReconstructionRAFT::p_initializeFromPreviousComputation = {"Init from previous computation", false, this} |
If true, store the computed disparity internally and initialize the next computation from it.
Can improve quality on temporally smooth video; the stored map uses a different resolution than the one returned.