seekthermal / seekcamera-python

Python language bindings for the Seek Thermal SDK
Apache License 2.0
50 stars 22 forks source link

How can I use thermography_max or _min? #11

Closed ghost closed 3 years ago

ghost commented 3 years ago

Dear, seekthermal Thank you so much for providing a good source. I have some questions to use seekcamera-opencv.py I want to get maximum temperature of the frame with pixel coordinates, so I tried to use ' def thermography_max' of 'class SeekCameraFrameHeader' in camera.py. However, I always get [160, 120, 0] values. If I use 'def thermography_spot' I got [160, 120, "estimated temperature value"] values. (estimated temperature value means the temperature of something like hot water, ice or human skin)

Is there a way to get the value what I want, by using "def thermography_max"? Or is there any other way to obtain the maximum temperature value where the seek-camera is filming?

m-mead commented 3 years ago

Hi @RI-SMJ, can you try specifying the SeekCameraFrameFormat.THERMOGRAPHY_FLOAT frame format in the capture session flags in addition to the Display output (e.g. SeekCameraFrameFormat.COLOR_ARGB8888)? If you are only outputting Display output, I think just the spot temperature is outputted; I think Thermography output needs to be enabled to output the minimum and maximum temperatures.

# Dual output of Display and Thermography output
camera.capture_session_start(
    SeekCameraFrameFormat.COLOR_ARGB8888 | SeekCameraFrameFormat.THERMOGRAPHY_FLOAT
)
ghost commented 3 years ago

Oh, the problem is solved at once. Thank you so much.