未验证 提交 af13f61a 编写于 作者: S Sergey Krivohatskiy 提交者: GitHub

Merge pull request #19580 from SergeyKrivohatskiy:patch-1

* Fixed OCL implementation of pyrlk

If prevPts size is (N, 1) (which is a default layout for converting `vector<Point2f>` to `UMat`) the `prevPts.cols == 1` and optical flow will be calculated for the first point only.
Getting `prevPts.total()` as in line 1048 is the correct way to get points count.

* fixed compilation warning (size_t to int)
Signed-off-by: NSergey Krivohatskiy <s.krivohatskiy@gmail.com>
上级 d093ac6a
......@@ -938,7 +938,8 @@ namespace
{
if (!lkSparse_run(prevPyr[level], nextPyr[level], prevPts,
nextPts, status, err,
prevPts.cols, level))
static_cast<int>(prevPts.total()),
level))
return false;
}
return true;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册