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

Value for constant ARV_PIXEL_FORMAT_MONO_10_PACKED is wrong #870

Open
schneider-coder opened this issue Feb 14, 2024 · 2 comments
Open

Value for constant ARV_PIXEL_FORMAT_MONO_10_PACKED is wrong #870

schneider-coder opened this issue Feb 14, 2024 · 2 comments

Comments

@schneider-coder
Copy link

schneider-coder commented Feb 14, 2024

Describe the bug
I am using a Basler camera which is set to pixelformat MONO10p.
When I am accessing the camera using the aravis client I get the right value 0x010A0046 according to the spec.

https://www.emva.org/wp-content/uploads/GenICam_PFNC_1_1_01.pdf

In the code the value of this pixelformat MONO10p is set to 0x010c0004 which is not defined in the spec at all.

#define ARV_PIXEL_FORMAT_MONO_10_PACKED ((ArvPixelFormat) 0x010c0004u)

So, the bottom line is, the value I get from the camera is correct and the value defined in ARV_PIXEL_FORMAT_MONO_10_PACKED is wrong. The value 0x010c0004 doesn't even exist in the spec.

Update:
It seems that I was using an obsolete spec. In the current spec the values matches with the implementation.
https://www.emva.org/wp-content/uploads/GenICam_Package_2023.07a.zip

But this leads to another issue: How can I check to which standard the camera is developed?

To Reproduce
Either check the spec and compare the values or connect to a GIGE Vision cam which is set to pixelformat MONO10p and check the value you get using

ArvPixelFormat pixelFormat = arv_buffer_get_image_pixel_format(buffer);

Expected behavior
The value for the constant must be this
#define ARV_PIXEL_FORMAT_MONO_10_PACKED ((ArvPixelFormat) 0x010A0046u)

Camera description:

  • Basler
  • a2A2448-105g5c
  • GIGE Vision

Platform description:

  • Aravais sdk v0.8
  • OS: Ubuntu22
  • x86_64
@charliebudd
Copy link

Just bumped into this too, I just switched to using the string Mono10p. It's a shame the standard changed something like this, I'm sure there was a good reason. I don't think there is anything in the camera to indicate which version of the standard was used.

I guess a fix could be implemented in the aravis API. ARV_PIXEL_FORMAT_MONO_10_PACKED_LEGACY could be defined and If setting to ARV_PIXEL_FORMAT_MONO_10_PACKED, arv_buffer_set_image_pixel_format could catch the error if thrown and try the legacy value before returning the error to the user.

@charliebudd
Copy link

charliebudd commented Apr 22, 2024

Actually, my camera at least exposes some versioning info for the standard in use...

DeviceGenCPVersionMajor [Integer]
DeviceGenCPVersionMinor [Integer]
DeviceU3VVersionMajor [Integer]
DeviceU3VVersionMinor [Integer]

If exposing this is part of the standard, and therefore should be expected on all cameras, it could be a way to determine which value should be used.

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