![]() |
ImFusion SDK 4.3
|
#include <RGBD/Include/ImFusion/RGBD/ColorMapOptimization.h>
Provides color map optimization for textured mesh generation from RGB data. More...
Inheritance diagram for ColorMapOptimization:Provides color map optimization for textured mesh generation from RGB data.
This class is intended for post-processing reconstructed meshes to improve texture quality by optimizing the mapping between color images and mesh surfaces. It supports both rigid and non-rigid optimization, and exposes several parameters to control the optimization process.
Typical usage involves providing a set of RGB images and a reconstructed mesh, then calling texture() to generate a new mesh with improved texture mapping. The RGB images must be associated with camera poses and intrinsics. These are provided via the RGBDDataComponent elements in the SharedImageSet.
All methods are not thread-safe unless otherwise stated.
Public Member Functions | |
| void | setErosionRadius (int radius) |
| Sets the radius (in pixels) for erosion applied to the mask during optimization. | |
| void | setDepthDiscontinuityThreshold (double thresh) |
| Sets the threshold (in world units, usually mm) for detecting depth discontinuities. | |
| void | setSubdivisionResolution (double res) |
| Sets the target resolution (in world units, usually mm) for mesh subdivision. | |
| void | setMaxIterations (int iter) |
| Sets the maximum number of optimization iterations. | |
| void | setNonRigidOptimization (bool nonRigid) |
| Enables or disables non-rigid optimization. | |
| void | setMaxDepth (double maxDepth) |
| Sets the maximum depth (in world units, usually mm) for considering points in the optimization. | |
| void | setDepthVisibilityThreshold (double thresh) |
| Sets the threshold (in world units, usually mm) for depth visibility. | |
| bool | texture (const SharedImageSet &img, Mesh &meshIn, Mesh *&meshOut) |
| Optimizes the texture mapping of the input mesh using the provided RGB images. | |
| void | configure (const Properties *p) override |
| Configures the optimizer from a Properties object. | |
| void | configuration (Properties *p) const override |
| Writes the current configuration to a Properties object. | |
Public Member Functions inherited from 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 |
Additional Inherited Members | |
Public Attributes inherited from Configurable | |
| Signal | signalParametersChanged |
Emitted whenever one of the registered Parameters' or SubPropertys' signalValueChanged signal was emitted. | |
Protected Attributes inherited from Configurable | |
| std::vector< Param > | m_params |
| List of all registered Parameter and SubProperty instances. | |
|
inline |
Sets the radius (in pixels) for erosion applied to the mask during optimization.
Larger values can help remove small artifacts but may reduce texture coverage.
|
inline |
Sets the threshold (in world units, usually mm) for detecting depth discontinuities.
Higher values make the algorithm less sensitive to depth jumps.
|
inline |
Sets the target resolution (in world units, usually mm) for mesh subdivision.
Use -1 to disable subdivision.
|
inline |
Enables or disables non-rigid optimization.
Non-rigid optimization can better handle local misalignments but is slower.
|
inline |
Sets the maximum depth (in world units, usually mm) for considering points in the optimization.
Points beyond this depth are ignored.
|
inline |
Sets the threshold (in world units, usually mm) for depth visibility.
Controls which points are considered visible during optimization.
| bool texture | ( | const SharedImageSet & | img, |
| Mesh & | meshIn, | ||
| Mesh *& | meshOut ) |
Optimizes the texture mapping of the input mesh using the provided RGB images.
| img | SharedImageSet containing a set of RGB images with associated camera poses and intrinsics given by elementwise RGBDDataComponent. |
| meshIn | Input mesh to be textured. |
| meshOut | Output pointer to the newly textured mesh. Ownership is transferred to the caller. |
Precondition: meshIn must be a valid, reconstructed mesh; img must contain corresponding RGBDDataComponents (elementwise). Postcondition: meshOut points to a new mesh instance with optimized texture mapping.
|
overridevirtual |
Configures the optimizer from a Properties object.
| p | Properties object containing configuration parameters. |
This method is typically used for loading settings from a workspace or configuration file.
Reimplemented from Configurable.
|
overridevirtual |
Writes the current configuration to a Properties object.
| p | Properties object to be filled with current settings. |
Reimplemented from Configurable.