FindReferenceKeyPointsInImageAKAZE
Searches a reference image, represented by its AKAZE keypoints and corresponding descriptors, in a given source image.
Can use available TwinCAT Job Tasks for executing parallel code regions.
Syntax
Definition:
HRESULT FindReferenceKeyPointsInImageAKAZE(
HRESULT hrPrev,
ITcVnImage* ipSrcImage,
ITcVnContainer* ipRefKeyPoints,
ITcVnImage* ipRefDescriptors,
ULONG nRefImageWidth,
ULONG nRefImageHeight,
ITcVnContainer*& ipEdgePoints,
float fMaxDist,
float fMaxKnnRatio,
TcVnMatrix3x3_LREAL& aPerspectiveTransform,
ULONG& nNumberOfGoodMatches,
ULONG& nNumberOfInliers,
ETcVnNormalizationType eNormType = NT_HAMMING,
ITcVnImage* ipSrcImageMask = nullptr,
TcVnParamsAKAZE& stAkazeParams = {FDT_AKAZE_MLDB, 0, 3, 0.001f, 2, 1, DT1_KAZE_PM_G2},
ETcVnEstimationAlgorithm eAlgorithm = EA_RANSAC,
double fReprojThreshold = 3,
ULONG nMaxIterations = 2000,
double fConfidence = 0.995
)
Parameters
Name |
Type |
Default |
Description |
---|---|---|---|
hrPrev |
|
HRESULT indicating the result of previous operations (If SUCCEEDED(hrPrev) equals false, no operation is executed.) | |
ipSrcImage |
|
Source image | |
ipRefKeyPoints |
|
KeyPoints of the reference image, e.g. computed with F_VN_KeyPointsAndDescriptorsAKAZE (ContainerType_Vector_TcVnKeyPoint) | |
ipRefDescriptors |
|
Descriptors of the reference image KeyPoints, e.g. computed with F_VN_KeyPointsAndDescriptorsAKAZE | |
nRefImageWidth |
ULONG |
|
Width of the reference image in pixels |
nRefImageHeight |
ULONG |
|
Height of the reference image in pixels |
ipEdgePoints |
|
Returns a container with the 4 edge points of the reference image transformed into ipSrcImage coordinates (ContainerType_Vector_TcVnPoint2_REAL) | |
fMaxDist |
float |
|
Maximum allowed descriptor distance (-1 disables this filter criterion) |
fMaxKnnRatio |
float |
|
Maximum allowed distance ratio between first and second best match ([0..1], -1 disables this filter criterion) |
aPerspectiveTransform |
|
Returns the perspective transformation matrix, which transforms the reference points to the source points | |
nNumberOfGoodMatches |
ULONG& |
|
Return the number of good matches |
nNumberOfInliers |
ULONG& |
|
Return the number of inlier matches |
eNormType |
NT_HAMMING |
Normalization type used for descriptor matching | |
ipSrcImageMask |
nullptr |
Mask to specify, where to look for keypoints in ipSrcImage (set to 0 if no mask required) | |
stAkazeParams |
{FDT_AKAZE_MLDB, 0, 3, 0.001f, 2, 1, DT1_KAZE_PM_G2} |
Parameters to configure the keypoint and descriptor computation for ipSrcImage (resulting descriptors must be compatible to ipRefDescriptors!) | |
eAlgorithm |
EA_RANSAC |
Estimation algorithm used for computing the perspective transformation between the two point sets | |
fReprojThreshold |
double |
3 |
Maximum allowed reprojection error to treat a point pair as an inlier (only used if eAlgorithm is RANSAC, RHO) |
nMaxIterations |
ULONG |
2000 |
Maximum number of RANSAC iterations |
fConfidence |
double |
0.995 |
Confidence (0..1) |
Required License
TC3 Vision Matching
System Requirements
Development environment | Target platform | PLC libraries to include |
---|---|---|
TwinCAT V3.1.4024.54 or later | PC or CX (x64) with PL50, e.g. Intel 4-core Atom CPU | Tc3_Vision |