Configuration associated with a camera/laser set used to convert acquired data to 3D data. More...
#include <Common.hpp>
Public Member Functions | |
| Config (float factorU, float factorV, float factorG) | |
| Creates a metric config assuming a linear relation between pixels and metric coordinates. | |
| Config (const sal3d_metric_config &metricConfig) | |
| Creates a C++ Config object that holds a C sal3d_metric_config. | |
| Config (const Config &mc) | |
| Copy constructor. | |
| Config & | operator= (const Config &mc) |
| Assignment operator. | |
| Config (const std::string &filename) | |
| Creates a new Config from a file. | |
| Config (const std::vector< float > &conf) | |
| Creates a new Config from a vector of floats. | |
| ~Config () | |
| Destructor. | |
| std::vector< float > | accuracyMean () const |
| Returns the mean accuracy of the calibration in x, y and z. | |
| std::vector< float > | accuracyStdDev () const |
| Returns the stddev accuracy of the calibration in x, y and z. | |
| const sal3d_metric_config & | c_metric_config () const |
| Returns the pointer to the internal C metric config. | |
| std::vector< float > | patternMisorientation () const |
| Returns the detected pattern misorientation in the calibration. | |
| void | saveToFile (const std::string &fileName) const |
| Saves the Config to a file. | |
| std::vector< float > | serialise () const |
| Serialises the Config object to a vector of floats. | |
| Point3D | toPoint3D (float u, float v, float g) const |
| Converts a range map point to a Point3D. | |
| LensDistortion::Model | getLensDistortionModel () const |
| Get the lens distortion model associated with this configuration. | |
Configuration associated with a camera/laser set used to convert acquired data to 3D data.
These objects have the information needed to convert Profile or RangeMap values (u, v and g) to 3D metric coordinates (X, Y and Z).
It can be obtained through calibration, with the functions provided in the Metric namespace, or it can be created based on three proportionality factors (for u, v and g). Of course, when using a Config created from factors, one cannot correct the perspective distortion effects.
The usual workflow is then to create a COP object from a RangeMap or a Frame, algthough single points can also be transformed through the method toPoint3D() provided in this class.
There are also a set of quality parameters that define how good a calibration was. They can be retrieved with accuracyMean(), accuracyStdDev() and patternMisorientation(). Some of them are only meaningful with the linear calibration, the details are specified in each method.
| sal3d::Metric::Config::Config | ( | float | factorU, |
| float | factorV, | ||
| float | factorG | ||
| ) | [inline] |
Creates a metric config assuming a linear relation between pixels and metric coordinates.
| [in] | factorU | This factor specifies the distance between profiles in metric units. |
| [in] | factorV | This factor specifies the distance between two contiguous pixels in a profile in metric units. |
| [in] | factorG | Factor applied to each pixel value to obtain the Z coordinate, i.e., the height of a point ends up being factorG times the g value of the pixel. |
| sal3d::Metric::Config::Config | ( | const sal3d_metric_config & | metricConfig | ) | [inline, explicit] |
Creates a C++ Config object that holds a C sal3d_metric_config.
The new C++ Config object will get the ownership of the C metricConfig, which means that you should not call sal3d_metric_config_release() to this metricConfig, otherwise it would be called twice.
| [in] | metricConfig | The C sal3d_metric_config to use to create this object. |
| sal3d::Error | On error |
| sal3d::Metric::Config::Config | ( | const Config & | mc | ) | [inline] |
| sal3d::Metric::Config::Config | ( | const std::string & | filename | ) | [inline, explicit] |
Creates a new Config from a file.
| [in] | filename | The name of the file to use to load the Config. |
| sal3d::Error | On error |
| sal3d::Metric::Config::Config | ( | const std::vector< float > & | conf | ) | [inline, explicit] |
Creates a new Config from a vector of floats.
This is used to create a Config object from a vector of floats retrieved from serialisation.
| [in] | conf | Vector of floats that represents a Config object. |
| sal3d::Error | On error |
| std::vector<float> sal3d::Metric::Config::accuracyMean | ( | ) | const [inline] |
Returns the mean accuracy of the calibration in x, y and z.
The mean accuracy of the calibration, together with the standard deviation of the accuracy, give an idea of the errors expected for scanned objects similar in size to the calibration pattern.
All x, y and z mean accuracies are given in metric units.
| std::vector<float> sal3d::Metric::Config::accuracyStdDev | ( | ) | const [inline] |
Returns the stddev accuracy of the calibration in x, y and z.
The accuracy standard deviation of the calibration, together with the mean of the accuracy, give an idea of the errors expected for scanned objects similar in size to the calibration pattern.
All x, y and z standard deviations are given in metric units.
| const sal3d_metric_config& sal3d::Metric::Config::c_metric_config | ( | ) | const [inline] |
Returns the pointer to the internal C metric config.
Referenced by sal3d::COP::COP(), and sal3d::COP::fillRow().
| LensDistortion::Model sal3d::Metric::Config::getLensDistortionModel | ( | ) | const [inline] |
Get the lens distortion model associated with this configuration.
This functions returns the lens distortion model that is associated with the metric configuration, which was (optionally) fed to the calibration function.
Assignment operator.
| [in] | mc | The Config to copy to this object. |
| sal3d::Error | On error |
| std::vector<float> sal3d::Metric::Config::patternMisorientation | ( | ) | const [inline] |
Returns the detected pattern misorientation in the calibration.
The good results of a calibration depend on how well the pattern is oriented along the motion vector. This method returns the difference in v and g coordinates between a point of the front of the pattern, and a point of the back of the pattern. The nearer they are to zero, the better results the calibration should report.
Both v and g deviations are given in original v and g units.
| void sal3d::Metric::Config::saveToFile | ( | const std::string & | fileName | ) | const [inline] |
Saves the Config to a file.
| [in] | fileName | The name of the file to store the config. |
| sal3d::Error | On error |
| std::vector<float> sal3d::Metric::Config::serialise | ( | ) | const [inline] |
| Point3D sal3d::Metric::Config::toPoint3D | ( | float | u, |
| float | v, | ||
| float | g | ||
| ) | const [inline] |
Converts a range map point to a Point3D.
Given the position of a point in the rangemap and its value, this method returns the corresponding point with metric coordinates.
| [in] | u | The range map's u coordinate. Although it will usually be an integer, we allow subcell resolution. |
| [in] | v | The range map's v coordinate. Although it will usually be an integer, we allow subcell resolution. |
| [in] | g | The range map's g value. |
References sal3d::Point3D::c_point_3d().
by
1.7.6.1