Ask Your Question

Revision history [back]

The assertion means that both images that you pass to the function must have the same size, the only channel and pyrscale parameter must be less then one. In your case the most probable reason is invalid number of channels. cvQueryFrame returns colorful frame with three channels by default. You need to convert it to gray-scale and then pass it to optical flow algorithm.