Example #1
0
void filterByPixelsMask( std::vector<Ipoint>& keypoints, const cv::Mat& mask )
{
    if( mask.empty() )
        return;

    keypoints.erase(std::remove_if(keypoints.begin(), keypoints.end(), MaskPredicate(mask)), keypoints.end());
}
Example #2
0
void FeatureDetector::removeInvalidPoints(const Mat& mask, vector<KeyPoint>& keypoints) {
    if (mask.empty()) {
        return;
    }

    keypoints.erase(remove_if(keypoints.begin(), keypoints.end(), MaskPredicate(mask)), keypoints.end());
};
Example #3
0
void KeyPointsFilter::runByPixelsMask( std::vector<KeyPoint>& keypoints, const Mat& mask )
{
    CV_INSTRUMENT_REGION();

    if( mask.empty() )
        return;

    keypoints.erase(std::remove_if(keypoints.begin(), keypoints.end(), MaskPredicate(mask)), keypoints.end());
}