检查KeyPoint是否为NULL

时间:2018-12-18 23:38:07

标签: c++ opencv image-processing keypoint

OpenCV中是否可以将KeyPoint设为NULL或检查其是否为NULL?

KeyPoint kp;

kp = NULL;

If (kp != NULL) { //...
}

这是我需要的方法的全局概念:

KeyPoint leastScoreKeyPoint;

for (int i=0; i<100; i++)
{
    leastScoreKeyPoint = NULL;
    for (int j=0; j<50;j++)
    {   
        //[...]
        if(calculatedScore<THRESHOLD){
            leastScoreKeyPoint = keypoints[j];
    }
    if (leastScoreKeyPoint != NULL)
        matches.push_back(leastScoreKeyPoint);
}

或者对此有任何解决方法? 非常感谢

0 个答案:

没有答案