Live streaming from a thermal camera(mlx90640)

I have bought an infrared imaging module(mlx90640), I want to apply a real time image processing using OpenCV . Thus, a lot of web links explained about mlx90460 module but most of them use I2C protocol. My module does not deal with this kind of protocol.

I want to get an input matrix of pixels from my module to my code. I have used the function cv2.VideoCapture(1). But the program could not get a matrix from it.
Can anyone help me, please?

your issue is situated before OpenCV even comes into play.

first you need to figure out how to attach that camera to something like a computer or CPU.

then you need to check using system utilities that a camera peripheral was detected and is operating properly. all of that is the operating system’s job.

I connected the camera to the pc through a usb cable. Then I got a thermal imaging though an application supported by the producer. But I want to loop though the pixels to know the temperature in each one in order to detect a possible fire because I am building a small scale firefighting system. I want to use OpenCV to do this mission.

I think you said you couldn’t get that camera picture in any other program except the manufacturer’s program, right?

OpenCV’s VideoCapture has a large but finite list of backends.

you will probably have to use the manufacturer’s SDK, which gives you their API.

once you have the data, of course you can work on it with OpenCV.

yes a kind of, actually I just want to reach to the pixels matrix through OpenCV. until now I couldn’t to reach for it.

I have used this code to read the serial input from the cam:

import time
import serial

ser = serial.Serial(
        baudrate = 9600,

while 1:
        print (x)

Then, the outputs were like that:

b'\xa6\x1a\xc6\xf8L\xad\xe7\x00\x00\xc1\xad\xa5\xc6D\xc6\xcc\xd6\x9ci\x8c\xceXg\x8c\xce\xa4\x86+\x8eX\x1a\x04\xe7\x86\xe3\xa5G\t\x01\xceHb\xe6\xb6\xc4\x8cJXdX\xac\x8c\xden\x18\x8d\x0c!\xc6\xce\xc6\x88\xdc\xde\xc6 \x82\x96\x8cZ\x12\xe3 \xb8Vc\xce\x84\x85\x05\x1a\x86\xc6\xc2\xadC\xcc\xcc\x0c\xad\x04\x00\xad\x8c\xa4\x04\xce\x8e\xb0\x8d\x0c\xa5\xa4\x85\xad$\x85\xcd\xa4\x8d\x01\xb4\x8c\x84\xad\x00\xcc\xc4HHJ`\x9c\x89\xc4\x8e\xc6\xc6D\xa4\x9c\xdc\x94\x94\xc4g\x08!\xad\xac\x1a\n'
b'\xce\xceZZ\x8e\xce\xce \xd6F\t\x89\xad\x85\x8c\x08hZ\xe2\xe6\xb6\xc6\x8cJ\xc6\xc6\x85\xach\x8e\x8cJ\x9c\x8d\xc6\x8c\x95\x8d\xdc\x9e\xc4\x1a\x8c(\xe4\x8c\x8c\x96\xcci\x9c\xc4\xa5($\xc6\x08\n'
b'\xe3\x04J\x18B\x08\xacC\xa4\xd4\x8cd\xce\xa5\x85\xc4b\x9e\x86,\xe0\xccXJX.\xcec\xa5\x86s\x84\x1aJ\r\xc4\x8c\xac\x84%\xceD\x9d\xccJ\x86(\x18\x08JD\xce\xccJZ\xef\x8c\xc4\x86\x08Z\xc6\x8e\x85e\xac \xa0\x852$\xad\xcce\xa5\x88\x9cn\xd4\x86\xc3%\xcc\x85G(t\n'
b'\x08\xcc\xcc\x86c\x8c\x8c\x8eZZ\xc4\xce\x19+C( \xceHX\x8dgG\xac\x96,\x86\xc6\x18XX\xcc\x1a\x1a*\x94\x94\xc7\x8c0\x00\xcc\xa4C\x08\xc4\xce*\x86\xc6\x9cN\xde\n'

does that thing really speak serial at merely 9600 baud?

that looks like binary data. do not attempt to read that like it’s text (readline()).

I don’t know how to read it, can you help me please? because the code cannot see this module as a camera