You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As the title describes.
I am unable to modify the image_widthimage_height attributes to higher resolutions to match UHR (Ultra High Resolution).
The M30T model contains a UHR option that produces thermal images up to 1280x1024 (WidthxHeight).
The expected result should be a matrix containing the temperature values with the correct shape.
In the above case where the image resolution is 1280x1024 the shape of the temperatures matrix should be 1280x1024
Latest version March 27.
Fails at line 843
The text was updated successfully, but these errors were encountered:
this issue has also troubled me.
it seems that when parsing M30T, a fixed size of 640x512 should be used instead of the 1280x1024 resolution of the jpeg file itself.
you can try the following code instead of directly calling parse_dirp2
import numpy as np
from thermal_parser import Thermal
thermal = Thermal(dtype=np.float32)
temperature = thermal.parse(filepath_image='images/DJI_H20T.jpg')
assert isinstance(temperature, np.ndarray)
In that case, the meta data reader fails at a point where some of the metadata contains added characters to its string.
E.g. 5.0 m instead of 5.0 resulting in a conversion error ValueError: could not convert string to float: '5.0 m'
This I resolved in the version March 27 by simply using the first split value of the meta_data dictionary. This however, is prompted to create issues in latter versions or future.
lines 620 - 627
forkeyin ['Image Height', 'Image Width']:
assertkeyinmeta_json, 'The `{}` field is missing'.format(key)
kwargs= {}
forname, keyin [('object_distance', 'Object Distance'),
('relative_humidity', 'Relative Humidity'),
('emissivity', 'Emissivity'),
('reflected_apparent_temperature', 'Reflection')]:
ifkeyinmeta_json:
value_str=meta_json[key].split()[0]
try:
kwargs[name] =float(value_str)
exceptValueError:
print(f"Error converting value for {key}: {value_str} is not a valid float.")
As the title describes.
I am unable to modify the
image_width
image_height
attributes to higher resolutions to match UHR (Ultra High Resolution).The M30T model contains a UHR option that produces thermal images up to
1280x1024 (WidthxHeight)
.The expected result should be a matrix containing the temperature values with the correct shape.
In the above case where the image resolution is
1280x1024
the shape of the temperatures matrix should be1280x1024
Latest version March 27.
Fails at
line 843
The text was updated successfully, but these errors were encountered: