VideoCapture.read() error description when returning false

asked 2020-07-06 11:56:56 -0600

Hi, VideoCapture.read() returns a boolean value indicating success or failure. That is good. But in case of failure, how do I know what went wrong? Is there any way I can access a description of the underlying error? Something like cv2.lastError() or something like that? I'm in the dark many times as of the reason of the error. I usually end up trying to guess, but some description (or at least an error code for a following lookup) would be great to have.

Thank you. Regards.

edit retag flag offensive close merge delete

Comments

OpenCV and python version?

supra56 gravatar imagesupra56 ( 2020-07-07 04:00:40 -0600 )edit