Class that handles point correspondences.
Points at corresponding indices on the two PointsOnData instances are considered correspondences. When creating PointCorrespondences(first, second) names of points in first and second are made uniform giving precedence to names in first. Logic for matching points based on their names should be implemented outside of this class. The class supports both full-set and subset-based rigid fitting, allowing users to select specific point correspondences for the transformation calculation. The class supports estimation of a fitting error for any correspondence using complementary correspondences, which can assist with the identification of inconsistent correspondences.
|
|
| PointCorrespondences (PointsOnData *first, PointsOnData *second) |
| | Takes two PointsOnData handle the correspondences between them.
|
| |
|
int | size () const |
| | Returns the smallest number of points out of both PointsOnData.
|
| |
|
int | numberOfPoints () const |
| | Returns the largest number of points out of both PointsOnData.
|
| |
|
std::string | name (int which) const |
| | Returns the name of a correspondence.
|
| |
|
void | setName (int which, const std::string &name) |
| | Sets the name of a correspondence. It sets the name of both points at index which
|
| |
|
void | clear () |
| | Removes all the correspondences.
|
| |
|
void | remove (int index) |
| | Removes a specific correspondence.
|
| |
|
void | remove (int first, int last) |
| | Removes the correspondences in range [first,last)
|
| |
|
bool | isSelected (int index) const |
| | Returns whether a point correspondence is selected. Selected correspondences are used during evaluation and fitting. By default all correspondences are selected.
|
| |
|
void | setSelected (int index, bool selected) |
| | Set whether a point correspondence is selected. Selected correspondences are used during evaluation and fitting.
|
| |
| double | evaluate (Reduction reduction=Reduction::Mean, const std::vector< double > *weights=nullptr) const |
| | Computes the distance between pairs of correspondences If an optional weights vector is provided, the individual errors are multiplied with it before reduction.
|
| |
|
double | computePairwiseDistances (Reduction reduction=Reduction::Mean, const std::vector< double > *weights=nullptr) const |
| | Computes the distance between pairs of correspondences If an optional weights vector is provided, the individual errors are multiplied with it before reduction.
|
| |
| mat4 | fitRigid (double *errorOut=nullptr, std::optional< std::vector< int > > subsetIndices=std::nullopt) const |
| | Fit a rigid transformation that aligns the selected points correspondence using Walker method.
|
| |
|
double | calcFitError (int index) const |
| | Estimate an error (of type m_fitErrorType) for a correspondence (specified by index), based on a fitting procedure involving complementary correspondences Considers the selection.
|
| |
|
PointsOnData * | pointHandler (int which) |
| | Returns the PointsOnData, index matches container order in construction.
|
| |
|
const PointsOnData * | pointHandler (int which) const |
| |
| void | setDefaultNameFormat (std::string format) |
| | Sets the default name format.
|
| |
|
void | setFitErrorType (FitErrorType type) |
| |
|
FitErrorType | fitErrorType () |
| |
|
| SignalReceiver ()=default |
| | Default constructor.
|
| |
|
| SignalReceiver (const SignalReceiver &other) |
| | Copy constructor, does not copy any existing signal connections from other.
|
| |
|
SignalReceiver & | operator= (SignalReceiver rhs) |
| | Assignment operator, disconnects all existing connections, does not copy any existing signal connections from rhs.
|
| |
|
virtual | ~SignalReceiver () |
| | Virtual destructor disconnects from all connected signals.
|
| |