Using Obsidian Thermal Camera with Renesas RZ/V2H

1. Introduction

This application note explains how to use the USB Obsidian Thermal Camera with the Renesas RZ/V2H EVK (RZ/V2H SoC-based embedded computer).

This functionality is available with the Emcraft RNS Release 1.0.2-31, or higher. Refer to https://voxelbotics.atlassian.net/wiki/spaces/R/pages/105119898/1.0.2-31 for details.

2. 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 the Renesas RZ/V2H board.

3. Connecting Obsidian Thermal Camera

To connect the Obsidian camera to the Renesas RZ/V2H kit, use an USB Type-C to Type-A cable and plug the camera into one of the USB ports of the RZ/V2H kit. Alternatively, the Obsidian camera can be connected to a USB hub that is plugged into a USB port of the Renesas board.

The following picture illustrates connection of the camera to the Renesas RZ/V2H EVK:

4. 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 Emcraft RZ/V2H BSP provides the GStreamer framework - one of the recommended tools for working with V4L2 cameras.

Depending on additional hardware connected to the Renesas board, 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@rzv2hevkalpha:~$ v4l2-ctl --list-devices | grep -A3 Miramar Miramar Model VG: Miramar Camer (usb-15850000.usb-1): /dev/video0 /dev/video1 /dev/media4

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

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

First, install the GStreamer plugins:

user@rzv2hevkalphaemc:~$ sudo apt install gstreamer1.0-tools gstreamer1.0-plugins-bad

Then, run the pipeline:

user@rzv2hevkalphaemc:~$ gst-launch-1.0 v4l2src device='/dev/video0' ! videoconvert ! queue ! openh264enc ! h264parse ! mpegtsmux ! 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: