我在这里遇到错误,
dif = cv2.absdiff(frameAnterior, frameAtual)
该错误仅发生在视频的最后一帧。
错误:
cv2.error: ......\modules\core\src\arithm.cpp:1287: error: (-209) The operation is neither 'array op array' (where arrays have the same size and the same number of channels), nor 'array op scalar', nor 'scalar op array' in function cv::arithm_op
最佳答案
该错误与视频结束的最后一帧有关。也许您应该尝试在最后一帧之前停止阅读?休息一下。
关于python - 打开cv2读写视频错误1287,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35304548/