I have a problem in my python3 application using OpenCV & GStreamer.
It seems like i only recieve a 1-channel-image stream (grayscale)
Hardware: NVIDIA Jetson Nano Developer Kit…
Basically when declaring a variable like this:
vs = cv2.VideoCapture("rtsp://username:password@XXX.XXX.X.XX/PORT", cv2.CAP_GSTREAMER)
And then passing it through a while-loop like this:
while True: ret, frame = vs.read() frame = cv2.resize(frame, (1280, 720)) cv2.imshow("Frame", frame) key = cv2.waitKey(1) & 0xFF if key == ord("q"): break cv2.destroyAllWindows() vs.stop()
The recieved VideoStream in “Frame” is in grayscale.
When calling Gstreamer in the commandline, the Stream is in RGB (or BGR).
If questions occur:
I need the RTSP Stream in colour, because i pass them through a face detector later. Those are not trained to work with 1-channel images.