Ask Your Question

Revision history [back]

VideoCapture from camera works only in debug (Python)

I've started my project on Win7 Python3.6 OpenCV 4.1.1.26. The problem is: read() method of capture instance returns zeroes image array and True as retval. But! If i start Videocapture in debug mode - It's works fine! I can see grabbed images!

First of all, I was in doubt of my code. But I've checked example from opencv-python-tutroals. It's same behavior.

I use PyCharm community 2019.2. But checked out from console too: python controller.py - blank screen python -m pdb conftoller.py - works fine.

Does anyone faced with same issue? How to fix it?

click to hide/show revision 2
retagged

updated 2019-10-24 01:41:10 -0600

berak gravatar image

VideoCapture from camera works only in debug (Python)

I've started my project on Win7 Python3.6 OpenCV 4.1.1.26. The problem is: read() method of capture instance returns zeroes image array and True as retval. But! If i start Videocapture in debug mode - It's works fine! I can see grabbed images!

First of all, I was in doubt of my code. But I've checked example from opencv-python-tutroals. It's same behavior.

I use PyCharm community 2019.2. But checked out from console too: python controller.py - blank screen python -m pdb conftoller.py - works fine.

Does anyone faced with same issue? How to fix it?

VideoCapture from camera works only in debug (Python)

I've started my project on Win7 Python3.6 OpenCV 4.1.1.26. The problem is: read() method of capture instance returns zeroes image array and True as retval. But! If i start Videocapture in debug mode - It's works fine! I can see grabbed images!

First of all, I was in doubt of my code. But I've checked example from opencv-python-tutroals. It's same behavior.

I use PyCharm community 2019.2. But checked out from console too: too:

  • python controller.py - blank screen screen
  • python -m pdb conftoller.py - works fine.

Does anyone faced with same issue? How to fix it?