In mesh_flow.ipynb , an error occur when one frame has no feature point:
# calculate optical flowp1, st, err = cv2.calcOpticalFlowPyrLK(old_gray, frame_gray, p0, None, **lk_params)
This problem occur definitely when a video has a blank or black frame, can you provide a more rebust code for this solution.
In mesh_flow.ipynb , an error occur when one frame has no feature point:
# calculate optical flow
p1, st, err = cv2.calcOpticalFlowPyrLK(old_gray, frame_gray, p0, None, **lk_params)
This problem occur definitely when a video has a blank or black frame, can you provide a more rebust code for this solution.
Thank you very much!