The i.MX8QXP processor provides an Image Sensor Interface (ISI) module that interfaces up to 5 pixel link sources to obtain the image data for processing in its pipeline channels. There are two pixel links that provide connectivity for the CSI and MIPI camera interfaces.

On the ConnectCore 8X SBC Pro:

  • A parallel camera connector is available.

  • A MIPI CSI-2 connector is available.

Default images expect only the MIPI camera to be connected. When only the parallel or both parallel and MIPI cameras are connected you need to modify the device tree accordingly, as documented in the device tree files:

/*
 * Enable only if the parallel camera is physically connected.
 * If not, the MIPI camera may not work.
 * Similarly, if the MIPI camera is not physically connected you need to
 * disable the MIPI (mipi_csi_0) so that the parallel camera works.
 */
//&parallel_csi {
//       status = "okay";
//};

//&ov5640 {
//	status = "okay";
//};

/* MIPI camera */
&mipi_csi_0 {
	status = "okay";
};

&ov5640_mipi {
	status = "okay";
};

Using the camera

Identify the camera

When the camera is connected to the ConnectCore 8X SBC Pro and it has been enabled in the device tree, the system identifies the camera sensor on the I2C bus and assigns a video device node /dev/videoX to it where X is an integer number. You can determine the device index assigned to the camera on the kernel boot-up messages:

Registered mxc_isi.0.capture as /dev/video0
created link [mxc_isi.0] => [mxc_isi.0.capture]
created link [mxc-parallel-csi] => [mxc_isi.0]
The following examples assume the camera is /dev/video0.

Preview a camera image using gstreamer

Capture the camera image and preview it using gstreamer and Wayland or framebuffer sink:

~# gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,width=320,height=240,framerate=15/1 ! waylandsink

~# gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,width=320,height=240,framerate=15/1 ! fbdevsink

Take a picture with the camera using gstreamer

Capture a still image with the camera and save it using gstreamer:

~# gst-launch-1.0 v4l2src device=/dev/video0 num-buffers=1 ! video/x-raw,width=320,height=240,framerate=15/1 ! jpegenc ! filesink location=sample.jpg

Record a video with the camera using gstreamer

Capture a moving image with the camera and save it using gstreamer:

~# gst-launch-1.0 v4l2src device=/dev/video0 num-buffers=90 ! video/x-raw,width=320,height=240,framerate=15/1 ! avimux ! filesink location=output.avi