In this paper, using automated optical inspection equipment and a thermal imager, the position and the temperature of the heat source or measured object can effectively be grasped. The high-resolution depth camera is with the stereo vision distance measurement and the low-resolution thermal imager is with the long-wave infrared measurement. Based on Planck’s black body radiation law and Stefan–Boltzmann law, the binocular stereo calibration of the two cameras was calculated. In order to improve the measured temperature error at different distances, equipped with Intel Real Sense Depth Camera D435, a compensator is proposed to ensure that the measured temperature of the heat source is correct and accurate. From the results, it can be clearly seen that the actual measured temperature at each distance is proportional to the temperature of the thermal image vanadium oxide, while the actual measured temperature is inversely proportional to the distance of the test object. By the proposed compensation function, the compensation temperature at varying vanadium oxide temperatures can be obtained. The errors between the average temperature at each distance and the constant temperature of the test object at 39 °C are all less than 0.1%.