We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents eda4575 + 5bf9827 commit eb7c61fCopy full SHA for eb7c61f
modules/optflow/src/rlofflow.cpp
@@ -281,6 +281,8 @@ class SparseRLOFOpticalFlowImpl : public SparseRLOFOpticalFlow
281
CV_Assert(!prevImg.empty() && prevImg.depth() == CV_8U && (prevImg.channels() == 3 || prevImg.channels() == 1));
282
CV_Assert(!nextImg.empty() && nextImg.depth() == CV_8U && (nextImg.channels() == 3 || nextImg.channels() == 1));
283
CV_Assert(prevImg.sameSize(nextImg));
284
+ if ((param->supportRegionType == SR_CROSS) && (prevImg.channels() != 3 || nextImg.channels() != 3))
285
+ CV_Error(cv::Error::BadNumChannels, "if SR_CROSS is used, both images need to have 3 channels.");
286
287
Mat prevImage = prevImg.getMat();
288
Mat nextImage = nextImg.getMat();
0 commit comments