import numpy as np
import cv2
cap = cv2.VideoCapture(0)
print('cap.isOpened')
if cap.isOpened():
print ('cap is opened')
while(True):
re,img=cap.read()
cv2.imshow("video output", img)
k = cv2.waitKey(10)&0xFF
if k==27:
break
cap.release()
cv2.destroyAllWindows()
system print error
(process:26631): GStreamer-CRITICAL **: 13:02:27.677: gst_element_get_state: assertion 'GST_IS_ELEMENT (element)' failed
nvbuf_utils: Could not get EGL display connection
nvbuf_utils: ERROR getting proc addr of eglCreateImageKHR
nvbuf_utils: ERROR getting proc addr of eglDestroyImageKHR
nvbuf_utils: Could not get EGL display connection
nvbuf_utils: ERROR getting proc addr of eglCreateImageKHR
nvbuf_utils: ERROR getting proc addr of eglDestroyImageKHR
Opening in O_NONBLOCKING MODE
We tried DISPLAY=:0 and it still printed the messages.
(process:26631): GStreamer-CRITICAL **: 13:02:27.677: gst_element_get_state: assertion 'GST_IS_ELEMENT (element)' failed
nvbuf_utils: Could not get EGL display connection
nvbuf_utils: ERROR getting proc addr of eglCreateImageKHR
nvbuf_utils: ERROR getting proc addr of eglDestroyImageKHR
nvbuf_utils: Could not get EGL display connection
nvbuf_utils: ERROR getting proc addr of eglCreateImageKHR
nvbuf_utils: ERROR getting proc addr of eglDestroyImageKHR
Opening in O_NONBLOCKING MODE
Hi,
It looks like the OpenCV code is running a gstreamer pipeline. Please share the pipeline for reference. Also do you install the system via sdkmanger(Jetpack4.2.1)?
I also do a single neural network for face detection.
Although the picture has appeared successfully.
But Error system message still appears
(process:27816): GStreamer-CRITICAL **: 20:51:59.966: gst_element_get_state: assertion 'GST_IS_ELEMENT (element)' failed
nvbuf_utils: Could not get EGL display connection
nvbuf_utils: ERROR getting proc addr of eglCreateImageKHR
nvbuf_utils: ERROR getting proc addr of eglDestroyImageKHR
nvbuf_utils: Could not get EGL display connection
nvbuf_utils: ERROR getting proc addr of eglCreateImageKHR
nvbuf_utils: ERROR getting proc addr of eglDestroyImageKHR
Opening in O_NONBLOCKING MODE
Hi,
Sorry, brother.
Originally used MobileNets for real-time face detection code
Found a system error
appear:
(Process: 27816): GStreamer - CRITICAL **: 20 : 51 : 59.966 : gst_element_get_state : Assertion ‘GST_IS_ELEMENT(element)’ failed
Nvbuf_utils : Can you get the connection shown by EGL?
Nvbuf_utils : Get the error of proc addr of eglCreateImageKHR
Nvbuf_utils : Get the error of proc addr of eglDestroyImageKHR
Nvbuf_utils : Can you get the connection shown by EGL?
Nvbuf_utils : Get the error of proc addr of eglCreateImageKHR
Nvbuf_utils : Get the error of proc addr of eglDestroyImageKHR
Open in O_NONBLOCKING mode
So suspect is a camera error.
Test simply turn on the camera capture code #1 code, thinking the error is this
Still executing a system error
appear:
(process:26631): GStreamer-CRITICAL **: 13:02:27.677: gst_element_get_state: assertion ‘GST_IS_ELEMENT (element)’ failed
Nvbuf_utils: Could not get EGL display connection
Nvbuf_utils: ERROR getting proc addr of eglCreateImageKHR
Nvbuf_utils: ERROR getting proc addr of eglDestroyImageKHR
Nvbuf_utils: Could not get EGL display connection
Nvbuf_utils: ERROR getting proc addr of eglCreateImageKHR
Nvbuf_utils: ERROR getting proc addr of eglDestroyImageKHR
Opening in O_NONBLOCKING MODE
But after solving the test #1 code yesterday, there was no error.
I thought it was solved, and to execute the real-time face detection code, an error still occurred.
Sorry for your troubles