Working With Multiple Cameras in i.MX8

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Working With Multiple Cameras in i.MX8

Working With Multiple Cameras in i.MX8

This section describes some advanced topics and tips to get high experiences in camera use cases in the i.MX 8 boards

The i.MX 8QM MEK includes the use of the dual MIPI-CSI interfaces and two MX8XMIPI4CAM2 in combination with eight MCIMXCAMERA1MP daughter cards connected to them. For this, change the DTB file to fsl-imx8qm-mek-8cam.dtb and boot the board.

Bio_TICFSL_0-1664903788318.png

Figure 1. Show i.MX 8QM MEK 8 cameras example.

 

Multiple cameras output In order to use more than one camera at the same time displayed in the same monitor output, boot the board and enter with the following command line to get the cameras ids: $ v4l2-ctl --list-devices It will result in something similar to the image below:

Bio_TICFSL_1-1664903823544.png

Figure 2. v4l2-ctl results

According to the image, mxc-isi found and set four cameras to /dev/video0, video1, video2, and video3. So we can build the GStreamer pipeline below changing it as required:

$ gst-launch-1.0 -v imxcompositor_g2d name=comp \ sink_0::xpos=0 sink_0::ypos=0 sink_0::width=640 sink_0::height=480 \ sink_1::xpos=0 sink_1::ypos=480 sink_1::width=640 sink_1::height=480 \ sink_2::xpos=640 sink_2::ypos=0 sink_2::width=640 sink_2::height=480 \ sink_3::xpos=640 sink_3::ypos=480 sink_3::width=640 sink_3::height=480 \ ! video/x-raw,format=RGB16 ! waylandsink \ v4l2src device=/dev/video0 ! video/x-raw,width=640,height=480 ! comp.sink_0 \ v4l2src device=/dev/video1 ! video/x-raw,width=640,height=480 ! comp.sink_1 \ v4l2src device=/dev/video2 ! video/x-raw,width=640,height=480 ! comp.sink_2 \ v4l2src device=/dev/video3 ! video/x-raw,width=640,height=480 ! comp.sink_3

 

This pipeline enables the user to set up more than one camera to the same screen using the imxcompositor_g2d for it. This is the unique solution available to create an interface over Weston/Wayland interface, i.e., in i.MX 8 devices we need to use GPU to create interfaces GUI. This pipeline results in the image below:

Bio_TICFSL_2-1664903857504.png

Figure 3. GStreamer 4 cameras output

It is just an example and you are encouraged to change it for other camera use cases, such as the eight cameras supported by the i.MX 8QM MEK.

 

 

 

 

 

Labels (1)
No ratings
Version history
Last update:
‎10-04-2022 10:19 AM
Updated by: