algorithm allowing registration of features 3d associated to grey signature
This algorithm allows automatic computation of a motion transform linking two sets of grey signed features 3d.
This algorithm is composed of two main phasis.
During this phasis, features from first input collection
are associated to features from second collection
. We consider this assignment problem of two sets of input grey signed features 3d as a weighted bipartite assignment problem using correlation of feature signatures as distance. Parameter
allows to exclude pairs with low correlation value.
- a robust motion transform computation phasis :
Robust motion transform computation is by default based on a least median of squares regression technique. This allows to detect and remove outliers formed during pairing phasis. Note that this specific algorithm make the assuption of an outlier ratio lower than 50% (use RANSAC like algorithm to avoid this limitation). Parameter
allows to customize behavior of this phasis. See Parametric estimation for more informations on this stage.
Type of computed transformation is controled by
parameter.
On output algorithm returned a registration result composed of :
Structure agregating indicators should be carefully analyzed by user to check reliability of computed results. Here are some clues to avoid classical pits in robust estimation :
- check status of robust estimation, in case where flag RobustEstimationDone is set to false in RobustEstimationResults result structure, algorithm do not have enough pairs of features to process to a robust estimation and switch to simple (non robust) estimation. In this case, algorithm will not support presence of outliers into input data set.
- check number of detected outliers, remember that used robust algorithm make the assumption of an outlier ratio lower than 50% (by default).
- check value of output rms : a great value for rms means that features are not correctly matched.
See Registration of grey signed features 2d for an illustration of this algorithm applied in 2d case.
- See also
- https://en.wikipedia.org/wiki/Robust_regression
Example of Python code :
Example imports
import PyIPSDK
import PyIPSDK.IPSDKIPLFeatureDetection as fd
import PyIPSDK.IPSDKIPLRegistration as registration
Code Example
inImg3d1 = PyIPSDK.loadTiffImageFile(inputImgPath1)
inImg3d2 = PyIPSDK.loadTiffImageFile(inputImgPath2)
greySignatures1 = registration.extractGreySignedFeatures3d(inImg3d1, 100)
greySignatures2 = registration.extractGreySignedFeatures3d(inImg3d2, 100)
correlationThreshold = 0.95
estimationConfig = PyIPSDK.EstimationConfig()
estimationConfig.initLMS(0.48)
outRegistrationResult = registration.greySignedFeatures3dRegistration(greySignatures1,
greySignatures2,
PyIPSDK.eRegistrationMotionModel3d.eRMM3d_Similarity,
correlationThreshold, estimationConfig)
transformParams = outRegistrationResult.transform.params
print("Registration results :")
print("----------------------")
print("Nb original features : " + str(outRegistrationResult.indicators.nbFeatures1))
print("Nb target features : " + str(outRegistrationResult.indicators.nbFeatures2))
print("Nb made pairs : " + str(outRegistrationResult.indicators.nbPairs))
print("Robust estimation status :")
print("--------------------------")
print(outRegistrationResult.indicators.estimationResults.toString())
print("Estimated motion transform :")
print("----------------------------")
print("Scale factor : " + str(transformParams[PyIPSDK.Similarity3d.eTP_Scale]))
print("Rotation (chi, beta, alpha in radians) : {" + str(transformParams[PyIPSDK.Similarity3d.eTP_Chi]) + ", " + str(transformParams[PyIPSDK.Similarity3d.eTP_Beta]) + ", " + str(transformParams[PyIPSDK.Similarity3d.eTP_Alpha]) + "}")
print("Translation : {" + str(transformParams[PyIPSDK.Similarity3d.eTP_Tx]) + ", " + str(transformParams[PyIPSDK.Similarity3d.eTP_Ty]) + ", " + str(transformParams[PyIPSDK.Similarity3d.eTP_Tz]) + "}")
Example of C++ code :
Example informations
Header file
#include <IPSDKIPL/IPSDKIPLRegistration/Processor/GreySignedFeatures3dRegistration/GreySignedFeatures3dRegistration.h>
#include <IPSDKIPL/IPSDKIPLRegistration/Processor/ExtractGreySignedFeatures3d/ExtractGreySignedFeatures3d.h>
Code Example
const ipReal64 correlationThreshold = 0.95;
const ipReal64 expectedOutlierRatio = 0.48;
correlationThreshold,
const RegistrationMotionTransform3d& outTransform = pOutRegistrationResult->getNode<Features3dRegistrationResult::Transform>();