FindReferenceKeyPointsInImageORB
Searches a reference image, represented by its ORB keypoints and corresponding descriptors, in a given source image.
Can use available TwinCAT Job Tasks for executing parallel code regions.
Syntax
Definition:
HRESULT FindReferenceKeyPointsInImageORB(
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,
TcVnParamsORB& stOrbParams = {500, 1.2f, 8, 31, 0, 2, FST_ORB_HARRIS, 31, 20},
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_KeyPointsAndDescriptorsORB (ContainerType_Vector_TcVnKeyPoint) | |
ipRefDescriptors |
|
Descriptors of the reference image KeyPoints, e.g. computed with F_VN_KeyPointsAndDescriptorsORB | |
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 (HAMMING recommended for ORB, HAMMING2 if the ORB nBriefPoints parameter is 3 or 4) | |
ipSrcImageMask |
nullptr |
Mask to specify, where to look for keypoints in ipSrcImage (set to 0 if no mask required) | |
stOrbParams |
{500, 1.2f, 8, 31, 0, 2, FST_ORB_HARRIS, 31, 20} |
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 |