Close

What if your sensor has dead pixels?

A project log for DIY pocket thermal imager

Very easy to repeat and inexpensive pocket-sized DIY thermal imager

ruslanRuslan 07/15/2023 at 14:210 Comments

I don't have this problem in my thermal imager. But one of my subscribers has this problem.

It looks like this:

What to do if you have a problem with a dead pixel in the sensor?

Fortunately, Melexis has provided a special function MLX90640_BadPixelsCorrection for this case. A description of the functions of the library can be found here: https://github.com/melexis/mlx90640-library/blob/master/MLX90640%20driver.pdf

In the last commit of my project on github, I have already made the necessary changes.

I added a call to the temperature array correction function after calculating the thermogram temperatures:

MLX90640_BadPixelsCorrection(badPixels, pMlxData->ThermoImage, 1, &params);

I added a dead pixel array declaration:

static uint16_t badPixels[] =
{
// 10, // Bad pixel number 1
// 201, // Bad pixel number 2
// 339, // Bad pixel number 3
0xFFFF
};

The value 0xFFFF means the end of the array. As you can see, by default the array is empty. You can add 1 or several numbers of dead pixels to the array (from 0 to 767), after which the measured temperatures of these pixels will be ignored, and the averaged values of 2 neighboring not broken pixels will be used as the temperature.

Discussions