Skip to content

Decoding received message from capture_image command #24

Description

@Nicolaas94

Hi,

I found your bk5000.py setup and it works very well in collecting a real-time stream from the BK5000.
However, I am new to bytes and TCP links and I try to figure out how to decode the received message after the command CAPTURE_IMAGE.
I figured out that the response message is much shorter than the bytearray length, assuming that the single image is sent in multiple parts through the buffer. The get_frame and decode_image functions from the bk5000.py do not solve the problem.

I expected an array of win_size[0]*win_size[1] which is around 360.000 bytes. However, in the bytearray I receive around 132.000 bytes.
When sending the command through the BK OEM test tool I received a 132kb .bin file which is the entire image when opened with ImageJ. This means that the bytearray containing the 132.000 bytes should be the entire image. But I cannot decode the bytes and reshape them into the win_sizes.

Could you please help me?

Nicolaas

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions