From 0930ac497faa520b892e0382c0145b164ecd7e5c Mon Sep 17 00:00:00 2001 From: Vladislav Vinogradov Date: Wed, 5 Dec 2012 14:20:18 +0400 Subject: [PATCH] removed type check in gpu::PyrLKOpticalFlow not it support all depths --- modules/gpu/src/pyrlk.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/gpu/src/pyrlk.cpp b/modules/gpu/src/pyrlk.cpp index 593e37cc66..d5debbe0b6 100644 --- a/modules/gpu/src/pyrlk.cpp +++ b/modules/gpu/src/pyrlk.cpp @@ -112,7 +112,7 @@ void cv::gpu::PyrLKOpticalFlow::sparse(const GpuMat& prevImg, const GpuMat& next dim3 block, patch; calcPatchSize(winSize, block, patch, isDeviceArch11_); - CV_Assert(prevImg.type() == CV_8UC1 || prevImg.type() == CV_8UC3 || prevImg.type() == CV_8UC4); + CV_Assert(prevImg.channels() == 1 || prevImg.channels() == 3 || prevImg.channels() == 4); CV_Assert(prevImg.size() == nextImg.size() && prevImg.type() == nextImg.type()); CV_Assert(maxLevel >= 0); CV_Assert(winSize.width > 2 && winSize.height > 2);