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

GigE Vision (GVSP) does not read last byte of Ethernet payload #193

Open
angelo0027 opened this issue Dec 15, 2020 · 1 comment
Open

GigE Vision (GVSP) does not read last byte of Ethernet payload #193

angelo0027 opened this issue Dec 15, 2020 · 1 comment

Comments

@angelo0027
Copy link

angelo0027 commented Dec 15, 2020

Python version

3.7.4 (default, Aug 9 2019, 18:34:13) [MSC v.1915 64 bit (AMD64)]

Platform information

Windows-10-10.0.18362-SP0

Numpy version

1.19.1

mdfreader version

4.1

Description

I'm reading a camera image log via GigE Vision, GVSP protocol.
In filling my image with pixels, there is a diagonal shift every 2 rows. The image resolution is 4112x900. As you can see in the attached screenshot, the declared length of every message is 8972, therefore one message fills little more than two rows in the final image (8972-8224 = 748 px).
The actual length of the GVSP message is 8971 (one byte less than declared). The message should be of length 8972 (this is the correct length, I tested the same mdf with asammdf with the same resolution and the image is reconstructed correctly).
image

Further looking into the payload, there is actually one byte missing in the message from mdfreader that is present in asammdf:
image

And this causes the incorrect image reconstruction.

Is this a bug or does the file have to be loaded in another way? Currently I simply do:
mdf = mdfreader.Mdf(mdf_file)
The MDF version in the header is:
MDF 4.10

@ratal
Copy link
Owner

ratal commented Dec 15, 2020

Could be a bug, hard to say for now.
Most efficient is to share the file but you might have confidentiality issues with that. Otherwise, you could scramble the file by using script shared by Daniel (asamMdf developper) in issue #189 (comment)
If still problematic, can you inform the block structure using MDFValidator (from Vector, freely downloadable) ?
It would help understand if you are facing a specific case or a bug. Most important are CNBlock of GSV_DataPacketBytes, and related CGBlock and DGBlock.

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