multi CSI camera display on hdmi in one window

I have three yuv mipi camera on tx2,
i use this command, they work well.
gst-launch-1.0 v4l2src device=/dev/video0 ! ‘video/x-raw, format=UYVY, width=1920, height=1080, framerate=(fraction)30/1’ ! xvimagesink -ev
my problem is, how can Tx2 display three mipi camera on hdmi by one window? (use gst-launch command)

display mode.png

Hi,
You can use compositor plugin:
https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-bad-plugins/html/gst-plugins-bad-plugins-compositor.html
But the plugin runs on CPU and may be with performance issue.

For using MMAPI, you can use NvBufferComposite() and get better performance. Please refer to

tegra_multimedia_api\samples2_camera_v4l2_cuda
tegra_multimedia_api\samples3_multi_camera

Hi, DaneLLL
Can you give me an example for compositor plugin on my tx2 system?
Window overlay like Attachments display mode.png.
In my system, three 1080P30 yuv mipi camera.
They are
v4l2src device=/dev/video0
v4l2src device=/dev/video1
v4l2src device=/dev/video2

Hi,
Please refer to the samples and do integration into your case.

Hi, DaneLLL
I use camera_v4l2_cuda, Tx2 work well
./camera_v4l2_cuda -d /dev/video0 -s 1920x1080 -f UYVY -n 30
./camera_v4l2_cuda -d /dev/video1 -s 1920x1080 -f UYVY -n 30
./camera_v4l2_cuda -d /dev/video2 -s 1920x1080 -f UYVY -n 30

but use multi_camera
./multi_camera -n 2 -c 30
Tx2 Error.

[INFO] (NvEglRenderer.cpp:109) <renderer0> Setting Screen width 1920 height 1080
NvPclHwGetModuleList: No module data found
NvPclHwGetModuleList: No module data found
NvPclHwGetModuleList: No module data found
OFParserGetVirtualDevice: NVIDIA Camera virtual enumerator not found in proc device-tree
LoadOverridesFile: looking for override file [/Calib/camera_override.isp] 1/16LoadOverridesFile: looking for override file [/data/nvcam/settings/camera_overrides.isp] 2/16LoadOverridesFile: looking for override file [/opt/nvidia/nvcam/settings/camera_overrides.isp] 3/16LoadOverridesFile: looking for override file [/var/nvidia/nvcam/settings/camera_overrides.isp] 4/16LoadOverridesFile: looking for override file [/data/nvcam/camera_overrides.isp] 5/16LoadOverridesFile: looking for override file [/data/nvcam/settings/nethdv_centerright_P5V27C.isp] 6/16LoadOverridesFile: looking for override file [/opt/nvidia/nvcam/settings/nethdv_centerright_P5V27C.isp] 7/16LoadOverridesFile: looking for override file [/var/nvidia/nvcam/settings/nethdv_centerright_P5V27C.isp] 8/16---- imager: No override file found. ----
(NvOdmDevice) Error BadParameter: Control 0 not found (in dvs/git/dirty/git-master_linux/camera-partner/imager/src/V4L2Device.cpp, function findControlById(), line 1854)
(NvOdmDevice) Error BadParameter:  (propagating from dvs/git/dirty/git-master_linux/camera-partner/imager/src/V4L2Device.cpp, function getControlRange(), line 320)
(NvOdmDevice) Error BadParameter:  (propagating from dvs/git/dirty/git-master_linux/camera-partner/imager/src/devices/V4L2SensorViCsi.cpp, function initializeV4L2Items(), line 239)
(NvOdmDevice) Error BadParameter:  (propagating from dvs/git/dirty/git-master_linux/camera-partner/imager/src/devices/V4L2SensorViCsi.cpp, function initialize(), line 113)
NvPclDriverInitializeData: Unable to initialize driver v4l2_sensor
NvPclInitializeDrivers: error: Failed to init camera sub module v4l2_sensor
NvPclStartPlatformDrivers: Failed to start module drivers
NvPclDriver_V4L2_Focuser_Stub_Close: Invalid NULL input pPclDriver
NvPclStateControllerOpen: Failed ImagerGUID 1. (error 0x4)
NvPclOpen: PCL Open Failed. Error: 0xf
SCF: Error BadParameter: Sensor could not be opened. (in src/services/capture/CaptureServiceDeviceSensor.cpp, function getSourceFromGuid(), line 598)
SCF: Error BadParameter:  (propagating from src/services/capture/CaptureService.cpp, function addSourceByGuid(), line 781)
SCF: Error BadParameter:  (propagating from src/api/CameraDriver.cpp, function addSourceByIndex(), line 276)
SCF: Error BadParameter:  (propagating from src/api/CameraDriver.cpp, function getSource(), line 439)
(Argus) Error BadParameter:  (propagating from src/api/CameraProviderImpl.cpp, function initialize(), line 92)
(Argus) Error BadParameter:  (propagating from src/api/GlobalProcessState.cpp, function createCameraProvider(), line 214)
Error generated. main.cpp, execute:381 Failed to get ICameraProvider interface
NvEglHandle: Unfreed handle upon egl deinit: type=2 refcnt=2
NvEglHandle: Unfreed handle upon egl deinit: type=1 refcnt=1

Hi,
multi_camera is for Bayer sensors such as default camera ov5693. Your cameras should run 12_camera_v4l2_cuda.

You should refer to the two samples and integrate into your case.

Hi, DaneLLL
Is there a demo for cuda scaling camera stream?

Hi,
We don’t have the sample of doing scaling. We have a sample of doing format conversion:

tegra_multimedia_api\samples\v4l2cuda\yuv2rgb.cu

You can use NvBufferTransform() to do scaling.

Hi, DaneLLL
Is there a demo for opencv’s cuda camera stream?

Please refer to the patch in below link:
[url]https://devtalk.nvidia.com/default/topic/1047563/jetson-tx2/libargus-eglstream-to-nvivafilter/post/5319890/#5319890[/url]