Using Google Coral Camera |
The i.MX 8M Mini kit comes configured to support the Google Coral camera. The Coral camera connects to the kit through the MIPI-CSI interface and provides an easy way to bring visual input into the i.MX 8M Mini: https://coral.ai/products/cameraThe camera is based on the Omnivision OV5645 chip. It provides auto focus, focal length 2.5mm, range 10cm-infinity and an 84.0 degrees / 87.6 degrees field-of-view. Link to the i.MX 8M Mini is via the dual-lane MIPI-CSI interface.
To connect the Coral camera to the kit, plug the camera cable into the P2 ("CSI") connector on the HGI board. The following picture illustrates connection of the camera to the kit:
Depending on additional hardware connected to the NAVQ+, the Coral camera may not be the only V4L2 device present in the system. In order to access the camera the user needs to determine the correct video device file node. The below command outputs video device nodes registered for two Coral camera connected to the NAVQ: user@imx8mpnavq:~$ v4l2-ctl --list-devices | grep -A1 mxc-isi-cap In the above output, the /dev/video3 device node corresponds to the camera connected to the CSI1 slot, while the /dev/video4 node represents the camera in the CSI2 slot.
Use the following Linux command to stream video input to the HDMI display: root@imx8mmcube:~# gst-launch-1.0 v4l2src ! waylandsink At this point you should be getting video stream displayed in real-time on your HDMI display:
Use the following Linux command to capture a single frame into a file: root@imx8mmcube:~# $ gst-launch-1.0 v4l2src ! jpegenc ! filesink location=capture1.jpeg Alternatively, any V42L compatible application can be used for displaying video from the camera, for example, the Cheese application that is available by default in Gnome desktop. |