For opencv, it expects gray8 or BGR, so if it isn’t provided, you have to make the conversion.
One way to do that is with gstreamer, but opencv4tegra doesn’t support it, you would have to build your own opencv-3.2.0 with ENABLE_GSTREAMER=ON for using a gstreamer pipeline in opencv.
AFAIK, gstreamer support is available in opencv-3.x, it may be available for opencv2-4.13, I don’t know.
[EDIT: looking at [url]OpenCV: Building OpenCV for Tegra with CUDA it seems it’s supported for 2.4.13 as well].
Opencv4tegra is 2.4.13 based, it has many optimizations for tegra, but is not able to support gstreamer (it’s closed source, you cannot rebuild it).
Anyway, you can use gpu with opencv3.2 (enable CUDA arch 6.2 for TX2).
Gstreamer has many plugins and can handle your YUYV to BGR conversion suitable for Opencv. Maybe last versions of opencv can directly handle YUYV as input.
One thing to be aware of is that opencv will read frames from CPU memory, and you will have to copy frames into gpu memory for CUDA processing, and probably copy back to CPU for further processing/display/sending. This will induce a latency, and may be a bottleneck if you are looking for high framerate with high resolution.
And I make a simple application with python 2.7.12 and it was not gpu supported.
After Googling, I found that I needed to use gpumat from opencv, but I see only the C ++ example.
Is there Gpu acceleration module for python in opencv 3.2.0???
Lastly, I really don’t know how to copy frames to gpu memory for cuda processing…
If I copy the frames, does the gpu operation proceed automatically?
Thanks, but isn’t this a bit early ? We know so few about each other… ;-)
I’m afraid I’ll disappoint you early as well…I’m not familiar with python API, I’m using opencv with C++.
I would just advise to be sure that you’ve enabled python2 support for opencv-3.2, and if you have not purged opencv4tegra, check which opencv version is used by python with:
import sys
import cv2
cv2.__version__
In C++, the functions for copying to/from GPU are upload/download. You may read the opencv doc to know what is available from gpu.