1 | initial version |
the code is ok, i was facing the same problem and the cause was that i was passing wrong images in to the calcOpticalFlowPyrLK() function. According to the documentation the images should be 8-bit (i.e. grayscale) both of them, so check if this is the problem or not. In my case i was passing rgb images, while the points were from a binary.
2 | No.2 Revision |
the code is ok, i was facing the same problem and the cause was that i was passing wrong images in to the calcOpticalFlowPyrLK() function. According to the documentation the images should be 8-bit (i.e. grayscale) both of them, so check if this is the problem or not. In my case i was passing rgb images, while the input points were from a binary.