Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Current »

Introduction

This application note explains how to use the USB Obsidian Thermal Camera with the Emcraft NAVQ+ (i.MX 8M Plus SoC-based embedded computer).

This functionality is available with the Emcraft NAVQ+ Release 1.1.5, or higher. Refer to https://emcraft.com/products/1222#releases for details.

Obsidian Thermal Camera

Obsidian Thermal Camera is a thermal VGA camera from Obsidian Sensors Inc, which is positioned as a low-cost thermal imager for automotive and security appliances. The camera implements a USB (UVC) Type-C interface, thus making it easy for connecting the camera to NAVQ+.

Connecting Obsidian Thermal Camera

To connect the Obsidian camera to the NAVQ+, use an USB Type-C to Type-C cable and plug the camera into the USB1 port of the NAVQ+. By default, only the USB1 port can be used for connecting the camera, while USB2 is configured for using the NAVQ+ as a USB gadget.

Alternatively, the Obsidian camera can be connected to a USB hub that is plugged into the USB1 port of the NAVQ+.

After connecting the camera, open an SSH or serial console session to the NAVQ+. Switch the USB1 port into the host mode using the below command:

sudo su -c 'echo host > /sys/kernel/debug/usb/38100000.usb/mode'

The following picture illustrates connection of the camera to the NAVQ+:

Capture Video into a File

The Obsidian Thermal camera conforms to the USB Video Class (UVC) specification. Devices of this class are handled by the uvcvideo kernel driver, which implements the standard V4L2 API. Thus, a broad range of V4L2 compatible tools can be used for capturing video from the camera. The NAVQ+ BSP provides the GStreamer framework - one of the recommended tools for working with V4L2 cameras.

Depending on additional hardware connected to the NAVQ+, the Obsidian 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 lists all device node files registered for the Obsidian camera:

user@imx8mpnavq:~$ v4l2-ctl --list-devices | grep -A3 Miramar
Miramar Model VG: Miramar Camer (usb-xhci-hcd.1.auto-1.4):
        /dev/video3
        /dev/video4
        /dev/media0

The first video device file node (/dev/video3) from the above output should be used for accessing the camera.

The below example command shows how to capture a video stream from the camera using the GStreamer framework and then save it into an *.mp4 file:

gst-launch-1.0 v4l2src device=/dev/video3 ! v4l2h264enc ! filesink location=test.mp4

Alternatively, the video stream from the camera can be shown directly on a screen connected to the NAVQ+ via HDMI. The below command demonstrates an example GStreamer pipeline for showing video stream from the Obsidian camera on an HDMI screen:

gst-launch-1.0 v4l2src device=/dev/video3 ! waylandsink

  • No labels