added patch error calculation to gpu::PyrLKOpticalFlow

This commit is contained in:
Vladislav Vinogradov
2012-03-05 10:36:57 +00:00
parent 27ecc999cb
commit ec5bdc7de8
5 changed files with 143 additions and 38 deletions

View File

@@ -1157,10 +1157,12 @@ TEST(PyrLKOpticalFlow)
vector<Point2f> nextPts;
vector<unsigned char> status;
calcOpticalFlowPyrLK(frame0, frame1, pts, nextPts, status, noArray());
vector<float> err;
calcOpticalFlowPyrLK(frame0, frame1, pts, nextPts, status, err);
CPU_ON;
calcOpticalFlowPyrLK(frame0, frame1, pts, nextPts, status, noArray());
calcOpticalFlowPyrLK(frame0, frame1, pts, nextPts, status, err);
CPU_OFF;
gpu::PyrLKOpticalFlow d_pyrLK;
@@ -1176,10 +1178,10 @@ TEST(PyrLKOpticalFlow)
gpu::GpuMat d_status;
gpu::GpuMat d_err;
d_pyrLK.sparse(d_frame0, d_frame1, d_pts, d_nextPts, d_status);
d_pyrLK.sparse(d_frame0, d_frame1, d_pts, d_nextPts, d_status, &d_err);
GPU_ON;
d_pyrLK.sparse(d_frame0, d_frame1, d_pts, d_nextPts, d_status);
d_pyrLK.sparse(d_frame0, d_frame1, d_pts, d_nextPts, d_status, &d_err);
GPU_OFF;
}
}