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

Handling arv_camera_[get|set]_[gain|black_level] with multiple taps #703

Closed
hackel6 opened this issue Aug 10, 2022 · 4 comments
Closed

Handling arv_camera_[get|set]_[gain|black_level] with multiple taps #703

hackel6 opened this issue Aug 10, 2022 · 4 comments
Labels
1. Enhancement Issues that propose improvements to existing features 5. Camera Issue in ArvCamera API

Comments

@hackel6
Copy link
Contributor

hackel6 commented Aug 10, 2022

Some cameras have multiple sensor taps. As an example, Imperx GEV1620 has 2 taps. Each sensor tap has its own Black_Level and Analog Gain settings.
Using the current API for get and set will only return or change the value currently set via the "[Gain|BlackLevel]Selector" register which, in this case, can read either "AnalogTap1" or "AnalogTap2."
Thus, using the get/set API as it is right now only changes half the image.
The other way to change both, aside from the *Selector registers, is to use each register directly: "AnalogOffset_Ch1" and "AnalogOffset_Ch2" respectively as an example (corresponds to BlackLevel).
Obviously, one possibility would be for the set() method to check for a corresponding *Selector register and set each value to the requested one at a time. However, the issue arises when a get() is performed and the taps (or channels) are not all the same.

I'm more than willing to implement a solution, but I don't have a good idea how to handle it.

Another possibility would be for arv_camera_is_[gain|black_level]_available() to return false in the case where there are multiple taps, but that doesn't quite seem right either since it IS available and the proper use is to set each corresponding *Selector value to get/set the requested channel.

@hackel6 hackel6 changed the title Handing arv_camera_[get|set}_[gain|black_level] with multiple taps Handing arv_camera_[get|set]_[gain|black_level] with multiple taps Aug 10, 2022
@hackel6 hackel6 changed the title Handing arv_camera_[get|set]_[gain|black_level] with multiple taps Handling arv_camera_[get|set]_[gain|black_level] with multiple taps Aug 10, 2022
@EmmanuelP
Copy link
Contributor

I don't think it is a good idea to 'hide' the different gains in the current get/set API. And that would probably lead to strange behaviours withs camera that have overlapping gains (like All, Red, Blue, Green).

I would add the following API instead :

  • arv_camera_select_gain()
  • arv_camera_dup_available_gains()

@EmmanuelP EmmanuelP added 1. Enhancement Issues that propose improvements to existing features 5. Camera Issue in ArvCamera API labels Aug 22, 2022
@hackel6
Copy link
Contributor Author

hackel6 commented Aug 24, 2022

This makes sense to me and I may have some time soon to implement.
Just one question: i understand that just like the other dup calls already in the API, arv_camera_dup_available_gains() will return the available gain registers (probably as enumerations or strings). But just out of curiosity, what does "dup" stand for?

@EmmanuelP
Copy link
Contributor

dup is for duplicate. It is intended to indicate the returned data must be freed, as opposed to the get functions.

@hackel6
Copy link
Contributor Author

hackel6 commented Sep 8, 2023

closed with #745

@hackel6 hackel6 closed this as completed Sep 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. Enhancement Issues that propose improvements to existing features 5. Camera Issue in ArvCamera API
Projects
None yet
Development

No branches or pull requests

2 participants