This is mostly a software project. I connected an MLX90640 thermal camera to a Raspberry Pi 4 and I wanted to use standard software as much as possible. There is already a camera driver in the Linux kernel, that can handle the MLX90640 camera sensor: video-i2c. To enable it an entry has to be added to the Device Tree. Just doing that already makes it possible to stream greyscale images from the camera, using any compatible application. But I wanted to add some processing, convert greyscale to a typical blue-red colour gradient, and add temperature values. I decided that a good way to achieve that would be writing gstreamer plugins. The first plugin uses a library from the camera manufacturer Melexis to apply camera calibration data to the stream and converts greyscale to a colour image. It also creates an additional text pad to provide a per-frame stream with minimum and paximum temperature values to be added to the image. After that one would typically scale the image for better viewing, since the camera only streams frames of 32x24 thermal values. After that an additional plugin creates an empty border below the image to add a colour gradient and space for the text string with temperature values. After that the gstreamer textoverlay plugin is used to place the text with temperature values into the empty field. The result is seen in the GIF. The sources are available at https://github.com/lyakh/gst-mlx90640
MLX90640 thermal camera with Raspberry Pi and gstreamer
This project allows using gstreamer to stream infrared images from an MLX90640 thermal camera.
Read more
2 projects • 1 follower
Education in Maths
Linux kernel / embedded / intermittently Android developer since 2001
Comments
Please log in or sign up to comment.