Go to the documentation of this file.
24 #if defined(MRPT_IS_X86_AMD64) // Pragma defined to ensure no structure
41 #if defined(MRPT_IS_X86_AMD64)
92 double x_min = -2,
double x_max = 2,
double y_min = -2,
93 double y_max = 2,
double z_min = -2,
double z_max = 2,
94 double voxel_size = 0.5,
bool call_initialize_now =
true);
97 void clear()
override;
106 const std::string& filName_mean,
107 const std::string& filName_stddev = std::string())
const;
125 const std::string& section)
override;
146 double new_x_min,
double new_x_max,
double new_y_min,
double new_y_max,
147 double new_z_min,
double new_z_max,
149 double additionalMarginMeters = 2.0)
override;
155 const double x_min,
const double x_max,
const double y_min,
156 const double y_max,
const double z_min,
const double z_max,
157 const double resolution_xy,
const double resolution_z = -1.0,
165 using Ptr = std::shared_ptr<ConnectivityDescriptor>;
178 size_t icx,
size_t icy,
size_t icz,
180 size_t jcx,
size_t jcy,
size_t jcz,
183 double& out_edge_information) = 0;
202 const double sensorReading,
204 const double sensorVariance,
212 const bool update_map);
258 void evalJacobian(
double& dr_dx_i,
double& dr_dx_j)
const override;
ConnectivityDescriptor::Ptr m_gmrf_connectivity
Empty: default.
void loadFromConfigFile(const mrpt::config::CConfigFileBase &source, const std::string §ion) override
See utils::CLoadableOptions.
bool saveAsCSV(const std::string &filName_mean, const std::string &filName_stddev=std::string()) const
Save the current estimated mean values to a CSV file (compatible with Paraview) with fields x y z mea...
double GMRF_lambdaPrior
The information (Lambda) of fixed map constraints.
#define DEFINE_SERIALIZABLE(class_name, NS)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
Simple, scalar (1-dim) constraint (edge) for a GMRF.
double getInformation() const override
Return the inverse of the variance of this constraint.
double Lambda
"Information" of the observation (=inverse of the variance)
static bool ENABLE_GMRF_PROFILER
[default:false] Enables a profiler to show a performance report at application end.
TVoxelInterpolationMethod
void evalJacobian(double &dr_dx) const override
Returns the derivative of the residual wrt the node value.
void setSize(const double x_min, const double x_max, const double y_min, const double y_max, const double z_min, const double z_max, const double resolution_xy, const double resolution_z=-1.0, const TRandomFieldVoxel *fill_value=nullptr) override
Changes the size of the grid, erasing previous contents.If resolution_z<0, the same resolution will b...
double getInformation() const override
Return the inverse of the variance of this constraint.
mrpt::vision::TStereoCalibResults out
A 3D rectangular grid of dynamic size which stores any kind of data at each voxel.
std::shared_ptr< ConnectivityDescriptor > Ptr
TObservationGMRF(CRandomFieldGridMap3D &parent)
bool insertIndividualReading(const double sensorReading, const double sensorVariance, const mrpt::math::TPoint3D &point, const TVoxelInterpolationMethod method, const bool update_map)
Direct update of the map with a reading in a given position of the map.
double evaluateResidual() const override
Return the residual/error of this observation.
void updateMapEstimation()
Run the method-specific procedure required to ensure that the mean & variances are up-to-date with al...
double obsValue
Observation value.
Parameters common to any derived class.
virtual ~ConnectivityDescriptor()=default
double Lambda
"Information" of the observation (=inverse of the variance)
std::deque< TPriorFactorGMRF > m_mrf_factors_priors
Vector with the precomputed priors for each GMRF model.
double mean_value
Mean and sigma (standard deviation) estimated values for the voxel.
TInsertionOptions insertionOptions
This class allows loading and storing values and vectors of different types from a configuration text...
This is a virtual base class for sets of options than can be loaded from and/or saved to configuratio...
The virtual base class which provides a unified interface for all persistent objects in MRPT.
void setVoxelsConnectivity(const ConnectivityDescriptor::Ptr &new_connectivity_descriptor)
Sets a custom object to define the connectivity between voxels.
mrpt::graphs::ScalarFactorGraph m_gmrf
void dumpToTextStream(std::ostream &out) const override
See utils::CLoadableOptions.
CRandomFieldGridMap3D * m_parent
double evaluateResidual() const override
Return the residual/error of this observation.
Versatile class for consistent logging and management of output messages.
TRandomFieldVoxel(double _mean_value=.0, double _stddev_value=.0)
Constructor.
std::vector< std::deque< TObservationGMRF > > m_mrf_factors_activeObs
Vector with the active observations and their respective Information, for each map cell.
TInsertionOptions()
Default values loader.
void clear() override
Erases all added observations and start again with an empty gridmap.
Base class for user-supplied objects capable of describing voxels connectivity, used to build prior f...
CRandomFieldGridMap3D represents a 3D regular grid where each voxel is associated one real-valued pro...
Sparse solver for GMRF (Gaussian Markov Random Fields) graphical models.
TPriorFactorGMRF(CRandomFieldGridMap3D &parent)
CRandomFieldGridMap3D(double x_min=-2, double x_max=2, double y_min=-2, double y_max=2, double z_min=-2, double z_max=2, double voxel_size=0.5, bool call_initialize_now=true)
Constructor.
virtual bool getEdgeInformation(const CRandomFieldGridMap3D *parent, size_t icx, size_t icy, size_t icz, size_t jcx, size_t jcy, size_t jcz, double &out_edge_information)=0
Implement the check of whether node i=(icx,icy,icz) is connected with node j=(jcx,...
void internal_initialize(bool erase_prev_contents=true)
Internal: called called after each change of resolution, size, etc.
The contents of each voxel in a CRandomFieldGridMap3D map.
CRandomFieldGridMap3D * m_parent
void evalJacobian(double &dr_dx_i, double &dr_dx_j) const override
Returns the derivative of the residual wrt the node values.
void resize(double new_x_min, double new_x_max, double new_y_min, double new_y_max, double new_z_min, double new_z_max, const TRandomFieldVoxel &defaultValueNewvoxels, double additionalMarginMeters=2.0) override
Changes the size of the grid, maintaining previous contents.
bool GMRF_skip_variance
(Default:false) Skip the computation of the variance, just compute the mean
Simple, scalar (1-dim) constraint (edge) for a GMRF.
Page generated by Doxygen 1.8.17 for MRPT 2.0.3 at Thu May 21 21:53:32 UTC 2020 | |