my code is below
import cv2
port = 5600
pipeline = ('udpsrc port={} ! '
'application/x-rtp, payload=96 ! '
'rtpjitterbuffer ! rtph264depay ! '
'decodebin ! videoconvert ! '
'appsink').format(port)
cap = cv2.VideoCapture(pipeline, cv2.CAP_GSTREAMER)
if not cap.isOpened():
print("Cannot open camera")
exit()
while True:
# Capture frame-by-frame
ret, frame = cap.read()
# if frame is read correctly ret is True
if not ret:
print("Can't receive frame (stream end?). Exiting ...")
break
# Our operations on the frame come here
gray = cv.cvtColor(frame, cv.COLOR_BGR2GRAY)
# Display the resulting frame
cv.imshow('frame', gray)
if cv.waitKey(1) == ord('q')t :
break
# When everything done, release the capture
cap.release()
cv.destroyAllWindows()
result is “Cannot open camera”
i use blueOS ver 1.1