| User Documentation |
| Centre for Vision, Speech & Signal Processing |
| DEVELOP | IN NAMESPACE | AMMA TREE ROOT | AMMA SEARCH | AMMA HOME |
| BaseRegisC | |
| BaseRegisC is an Abstract Base Class, which is reference counted (Big Object) and provides the core operations for doing point set registration. | |
| include | "amma/BaseRegis.hh" |
| User Level: | Default |
| Library: | POLREGIS |
| Example: | cri.cc |
| Section: | 3D Surface.Registration |
| In Scope: | std |
Comments:
BaseRegisC is an Abstract Base Class, which is reference counted (Big Object)
and provides the core operations for doing point set registration.
To avoid an accumulating error, a vector set workMovPointsM is defined which is initialized as a copy of startMovPointsM. A nearest neighbour search is performed on the fixed object. The result of this search is stored in the vector set fixM, which contains all the corresponding nearest neighbour points to workMovPointsM.
workMovPointsM and fixM will be registered and the transformation of this single iteration step is stored in rtKM. After each iteration, deltaRtKM is applied to all previous transformations, so that rtKM represents the RigidTransC to transform startMovPointsM -> fixM. The next iteration starts with workMovPointsM = rtKM o startMovPointsM, again nearest neighbour search and so on.
The returned RigidTransC of BaseRegisC contains the transformation
To accelerate the time expensive process of iteration, the user may select prediction (based on Besl & McKay 92), which demands less iterations.
There are further quality improving features that can be switched on and off. These are Surface Normal Check, Boundary Check and Distance Check.
The user also has the facility of choosing the method to be used to calculate the Mean Square Error.
When using the trace mode, printouts are given on each iteration step. Some of the fields are only relevant when using the prediction. Hence there fields will be blank, indicated by ------.
#i - iteration number
#pts - number of random points on moveable surface
#w - number of weights minus the sum of weights
RMS - RMS value
% 1st - Comparison of the current & very 1st RMS value in %
|Trans| - Translation occured from previous translation
%Tn-1 - Comparison of the last & current total translation value in %
%Texp - Comparison of the expected & current total translation in %
Rotation - Current Rotation in degrees
%Rn-1 - Comparison of the last & current total rotation in %
%Rexp - Comparison of the expected and current rotation in %
NCA - Indicates whether weights were affected by the Normal Angle Check
BCA - Indicates whether weights were affected by the Boundary Check
DCA - Indicates whether weights were affected by the Distance Check
Thek_1 - Angle in 7D space between previous last two registration vectors
Thetak - Angle in 7D space between last two registration vectors
PRP - Prediction is Possible (Good Alignment Between last two
registration vectors)
CDP - Can Do Prediction (Parabola, Line Based or Max Allowable Update)
PUO - Permanent Prediction Update Occured (YES/NO)
MSEk - Value of MSE before attempted prediction update
MSEp - Value of MSE after (temporary/permanent) prediction update
FindNearest returns the vector set fixM containing the closest surface points to a given set of points workMovPointsM. It also needs an array of weights. Points that have their weight value less than NearZero will be completely ignored. Note that the derived class will provide the virtual GetNNPairs() function, which is required by FindNearest. An error message will be given by FindNearest if the sum of all weights is zero, the program will then be terminated since it is then impossible to proceed.
All vector sets that are passed to the constructors must have the same number of entries i=1...N.
There are various options provided by the constructor and member functions, which affect results obtained, except the trace option.
Trace
0 : No information is displayed.
1 : All information is displayed; the amount of detail displayed depends
whether the Basic ICP or Accelerated ICP is being used.
Check Boundary
keepBoundaryPoints : Do not modify weight values of boundary points.
discardBoundaryPoints : Boundary point weight values are modified
accordingly to the distance and standard deviation.
Check Normals
noAngleCheck : No normal angle check is performed.
doAngleCheck : A normal angle check is performed and each point's weight is
weight is modified appropriately.
Distance Check
noDistanceCheck : Do not perform distance check.
doDistanceCheck : Perform distance check and modify each point's weight
appropriately.
MSE Calculation
standardMse : Use the standard MSE calculation method.
madEstimator : Use the Median Absolute Deviation Estimator Method.
| movpts | IN: Points on the the moveable object |
| movnmls | IN: Normals of points on moveable object |
| npoints | IN: Number of points on moveable |
| trace | IN: 1 = Detailed prints & saves data |
| 0 = No prints, no savings | |
Passing moving points & their normals, as well as number of points,
and trace option. The fixed surface is stored within the derived class.
| npoints | IN: Number of points on the moveable object |
| (No Default, so as to remove ambiguity | |
| with the null constructor) | |
| trace | IN: 1 = Detailed prints & saves data |
| 0 = No prints, no savings | |
Passing number of points and trace option.
The moving points are passed via the derived class.
The fixed surface is stored within the derived class.
| exp | IN: Expected final Translation and Rotation |
This is so that it can be compared with the actual translation and
rotation at the end of the print out. It also allows errors to be
computed.
| iteration | IN: Maximum number of iterations |
| prediction | IN: noPrediction = No Prediction |
| prediction = Perform Prediction | |
| ratioThres | IN: ratio threshold |
Termination occurs when 2 successive ratios exceed ratioThres.
See IterationBreak() for details.
| regWay | IN: regis = Regis |
| pRegis = PRegis | |
THE DEFAULT IS THE ONLY OPTION CURRENTLY USED !!!!
| regType | IN: scene_scene = scene_scene |
| model_scene = model_scene | |
THE DEFAULT IS THE ONLY OPTION CURRENTLY USED !!!!
| mseCalc | IN: standardMse = Standard MSE |
| madEstimator = Uses the MAD Estimator | |
| bound | IN: keepBoundaryPoints = Don't modify weight values |
| discardBoundaryPoints = Modify weight values accordingly | |
| normal | IN: noAngleCheck = Don't do normal angle check |
| doAngleCheck = Do normal angle check | |
| sigma | IN: noDistanceCheck = Don't do distance check |
| doDistanceCheck = Do distance check | |
| hst | IN: 0 = Do not keep history of RTs |
| 1 = Keep a history of each RT obtained | |
| after each iteration | |
Note: Call this function before PerformRegistration().
| comfname | IN: Filename for .com file |
| movfname | IN: Filename of the moveable file |
Note: Call this function after you have called
PerformRegistration().
| guess | IN: Initial guess |
| #include "amma/BRefCntV.hh" |
| #include "amma/BRefCnt.hh" |
| #include "amma/RefCBase.hh" |
|
Programmer: Simon Cunnington |