4. Convert raw data to temperature data - ZergEggTruwin/TW8035_Example_MFC GitHub Wiki

The array 4800 passed from the SDK is raw data of each cell in the 80 * 60 IR image sensor Each item is 14 bit data, and to convert it to temperature, three reference data are required in addition on the image data.

The information is T_Data1, T_Data2, T_Data3 of PreTWImageData structure.( see TW8035_API_DEF.h To convert data to temperature using the values, calculate as follows :


void CTW8035_MFCDlg::GenerateTempData(unsigned short* arr, float* dst, unsigned short t1, unsigned short t2, unsigned t3)
{
	float nSlope = 20.0f / (t2 - t1);

	for (int i = 0; i < 4800; i++)
	{
		dst[i] = (nSlope * (arr[i] - t1) + t3);
	}
}
⚠️ **GitHub.com Fallback** ⚠️