diff --git a/modules/video/src/lkpyramid.cpp b/modules/video/src/lkpyramid.cpp index c23a67049527..7c89bc31fe73 100644 --- a/modules/video/src/lkpyramid.cpp +++ b/modules/video/src/lkpyramid.cpp @@ -1091,11 +1091,10 @@ namespace for(size_t i = 0; i < npoints; i++ ) status[i] = true; - Mat errMat; + // OpenVX doesn't return detection errors if( _err.needed() ) { - _err.create((int)npoints, 1, CV_32F, -1, true); - errMat = _err.getMat(); + return false; } try @@ -1184,8 +1183,6 @@ namespace vx_keypoint_t kp = vxNextPts[i]; nextPtsMat.at(i) = Point2f(kp.x, kp.y); statusMat.at(i) = (bool)kp.tracking_status; - // OpenVX doesn't return detection errors - errMat.at(i) = 0; } #ifdef VX_VERSION_1_1