我们可以从背景减去图像中提取关键点吗?我通过首先减去其背景从视频中提取关键点,但它显示运行时错误
if (! previous_frame.empty()) {
subtract(current_frame, previous_frame, predict_img);
detector.detect(predict_img, keypoint2);
if (keypoint2.size > 20) // Error
{
RetainBestKeypoints(keypoint2, 20);
}
else
{
//Want to ignore the frame , but how ?
}
代码中提到了错误,