Ask Your Question

Revision history [back]

Error with opencv cap.read()

When I start my python's programm, i got this error

ret, frame = cap.read()
cv2.error: OpenCV(3.4.0-dev) /home/damien/opencv/opencv/module/core/include/opencv2/core/mat.inl.hpp:500:error: (-215) total() == 0 || data != __null in function Mat

The code is bassic, and got no error (Its just read the webcam). when i search on google, I fond one message saying 'it's the OpenCv compilation the probleme'

I don't found my error, I used this command to compile opencv

cmake -D CMAKE_BUILD_TYPE=RELEASE 
 -D CMAKE_INSTALL_PREFIX=/usr/local 
 -D INSTALL_PYTHON_EXAMPLES=ON 
 -D BUILD_DOCS=ON -D BUILD_EXAMPLES=ON 
 -D WITH_QT=ON -D WITH_OPENGL=ON 
 -D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules 
 -D OPENCV_ENABLE_NONFREE=True ..

one things, I'm runing Ubuntu on Vmware, and the version for opencv is the 3.4.0 (the lastest)

Error with opencv cap.read()

When I start my python's programm, i got this error

select timeout
select timeout
ret, frame = cap.read()
cv2.error: OpenCV(3.4.0-dev) /home/damien/opencv/opencv/module/core/include/opencv2/core/mat.inl.hpp:500:error: (-215) total() == 0 || data != __null in function Mat

The code is bassic, and got no error (Its just read the webcam). when i search on google, I fond one message saying 'it's the OpenCv compilation the probleme'

I don't found my error, I used this command to compile opencv

cmake -D CMAKE_BUILD_TYPE=RELEASE 
 -D CMAKE_INSTALL_PREFIX=/usr/local 
 -D INSTALL_PYTHON_EXAMPLES=ON 
 -D BUILD_DOCS=ON -D BUILD_EXAMPLES=ON 
 -D WITH_QT=ON -D WITH_OPENGL=ON 
 -D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules 
 -D OPENCV_ENABLE_NONFREE=True ..

one things, I'm runing Ubuntu on Vmware, and the version for opencv is the 3.4.0 (the lastest)

Error with opencv cap.read()

When I start my python's programm, i got this error

select timeout
select timeout
ret, frame = cap.read()
cv2.error: OpenCV(3.4.0-dev) /home/damien/opencv/opencv/module/core/include/opencv2/core/mat.inl.hpp:500:error: (-215) total() == 0 || data != __null in function Mat

The code is bassic, and got no error (Its just read the webcam). when i search on google, I fond one message saying 'it's the OpenCv compilation the probleme'

I don't found my error, I used this command to compile opencv

cmake -D CMAKE_BUILD_TYPE=RELEASE  \
-D CMAKE_INSTALL_PREFIX=/usr/local  \
-D INSTALL_PYTHON_EXAMPLES=ON  \
-D BUILD_DOCS=ON INSTALL_C_EXAMPLES=OFF \
-D OPENCV_EXTRA_MODULES_PATH=~/oc/opencv_contrib-3.1.1/modules \
-D PYTHON_EXECUTABLE=~/.virtualenvs/cv/bin/python \
-D BUILD_EXAMPLES=ON 
 -D WITH_QT=ON -D WITH_OPENGL=ON 
 -D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules 
 -D OPENCV_ENABLE_NONFREE=True ..

one things, I'm runing Ubuntu on Vmware, and the version for opencv is the 3.4.0 (the lastest)

here is the cmake https://pastebin.com/X6eN4q4m