I try to use built pyramids in the calcOpticalFlowPyrLK function, but it wrote "Assertion failed (0 <= i && i < (int)v.size())"
Why it doesn't want? Documentation says prevImg – first 8-bit input image or pyramid constructed by buildOpticalFlowPyramid().