mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
boards/OPENMVPT: Use IR rather than color image for temperature stats.
Before this change, the mean temperature of a blob is calculated based on the color values of the image. When running on the Pure Thermal this has the effect of labeling every blob with the min temperature of the entire scene. This change fixes this bug by using the IR image instead of the color image to get the right value.
This commit is contained in:
parent
22616eb0b9
commit
b457daf9bc
@ -52,8 +52,8 @@ static const char fresh_main_py[] =
|
|||||||
" # Collect stats into a list of tuples\n"
|
" # Collect stats into a list of tuples\n"
|
||||||
" blob_stats = []\n"
|
" blob_stats = []\n"
|
||||||
" for b in blobs:\n"
|
" for b in blobs:\n"
|
||||||
" blob_stats.append((b.rect(), map_g_to_temp(img.get_statistics(thresholds = threshold_list,\n"
|
" blob_stats.append((b.rect(), map_g_to_temp(fir_img.get_statistics(thresholds = threshold_list,\n"
|
||||||
" roi = b.rect()).mean())))\n"
|
" roi = b.rect()).mean())))\n"
|
||||||
" x_scale = img.width() / fir_img.width()\n"
|
" x_scale = img.width() / fir_img.width()\n"
|
||||||
" y_scale = img.height() / fir_img.height()\n"
|
" y_scale = img.height() / fir_img.height()\n"
|
||||||
" img.draw_image(fir_img, 0, 0, x_scale = x_scale, y_scale = y_scale,\n"
|
" img.draw_image(fir_img, 0, 0, x_scale = x_scale, y_scale = y_scale,\n"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user