Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get the thermal map? #34

Open
mokems opened this issue Aug 30, 2024 · 1 comment
Open

How to get the thermal map? #34

mokems opened this issue Aug 30, 2024 · 1 comment

Comments

@mokems
Copy link

mokems commented Aug 30, 2024

From the examples, I can get the thermal image, but how to get the original thermal map?

@andi-spajk
Copy link

What do you mean by "thermal map?" Like raw data? Temperatures? You need to set the frame format to obtain different types of images. This docstring in the source code tells you all about the different formats (line 2237 in seekcamera/camera.py, in case the link doesn't work).

For example

def on_event(camera, event_type, event_status, user_data):
    if event_type == SeekCameraManagerEvent.CONNECT:
        camera.capture_session_start(SeekCameraFrameFormat.COLOR_ARGB8888)
# etc...

produces a plain RGB jpeg image.
If you want multiple formats, use a bitwise OR:

    camera.capture_session_start(SeekCameraFrameFormat.COLOR_ARGB8888 | SeekCameraFrameFormat.PRE_AGC)

This produces an image of sensor counts and an RGB jpeg. You can save either format to a file, whenever you read a frame.

Don't forget, in the frame callback on_frame you need to access the camera frame with the new format, for example:

def on_frame(camera, camera_frame, file):
   frame_data = camera_frame.thermography_fixed_10_6
# etc...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants