1 | initial version |
I have fixed this issue. It was found out that the resolution of the image1 and image2 were not matching and because of that this crash was happening. This intuition I got from the error message(prev0.size() == next0.size() && prev0.channels() == next0.channels() && prev0.channels() == 1 && pyr_scale < 1 in function calcOpticalFlowFarneback) and when I gave 2 images of same resolution it worked. Sorry for asking such a silly doubt. :( However I think it will be useful for some amateur opencv user.