Skip to content

Improves/updates/fixes indi-gige driver#1338

Merged
knro merged 17 commits into
indilib:masterfrom
olsonse:master
Jun 21, 2026
Merged

Improves/updates/fixes indi-gige driver#1338
knro merged 17 commits into
indilib:masterfrom
olsonse:master

Conversation

@olsonse

@olsonse olsonse commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Most of the code in the indi-gige driver was written specifically for at least one older version of a point-grey BlackFly camera using an older version of the Aravis library. These patches update the indi-gige driver to use the more recent and common 0.8 version of the Aravis library. These patches also greatly improve the driver to be more generically applicable to other cameras. These patches also allow for streaming from an Aravis-supported camera (either GigE-Vision or USB-vision). These patches provide the necessary changes that will also allow for multiple cameras to be used simultaneously. Nevertheless, these patches do not implement the iterative enumeration that will be necessary to instantiate all available cameras (only the first is still instantiated)--it is left as a task for a future patch to implement this extended instantiation.

olsonse added 15 commits June 15, 2026 13:03
This patch retains the camera device id (and model name) only as persistent,
even while the camera is disconnected.  The device id is used to open a
handle to the camera and the model name is used with the device id to
create a unique INDI device name to present to the user.
This patch makes several improvments preparing to handle multiple cameras
and multiple models:
  1. Much better error handling/logging for all calls to aravis library.
  2. Uses device ID to idenfity cameras (includes vendor, model, serial)
  3. Changes GigECCD class functions signatures:
    - adds virtual specifier to those functions that we override that are
      virtual--proper virtual specification is necessary to ensure the
      correct functions are called in all cases
    - adds "override" modifier to overridden functions for cleaner code.
In general, GiGE cameras often have sensors onboard to measure sensor the
temperature of the CCD/CMOS chip.  This patch gathers this data if the
camera claims that it has this information (using "DeviceTemperature"
property).  The temperature is added to the INDI panel display and also to
the image metadata.
At least for FLIR GiGE cameras, changing binning changes the apparent size
of the chip, such that the region of interest is configured using a smaller
number of pixels.  This appears to be contrary to how INDI expects binning
to be configured.  Following the CCD Simulator (hopefully it is a decent
example of implementing a INDI::CCD device), it rather appears that the
region of interest is still expected to be set using the entire available
Width/Height.  It therefore appears necessary to mitigate this mismatch
since (at least for ekos) the client appears to mess up the apparent image
if binning is configured but a smaller region is selected, but in reality
the entire avaialble sensor was binned.

So, for now, even when binning is used, this patch makes the driver use the
full WidthMax and HeightMax manually divided by the binning to select the
region of interest.

This means that any use of get_x_offset().val(), get_y_offset().val(),
get_width().val(), or get_height().val() from the GigECCD::camera object must
be manually multiplied or divided by the values from get_bin_x().val() and
get_bin_y().val() as appropriate.  Similarly, camera->set_geometry(...) must
be given values that are divided by the appropriate binning.

It remains to verify this behavior on GiGE cameras from other vendors, or
at least to check what the standard says, if anything useful on the matter.
@knro

knro commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

Thank you! Can you please submit driver documentation to INDI Documentation Repo?

@olsonse

olsonse commented Jun 16, 2026

Copy link
Copy Markdown
Contributor Author

Yes, I think I can add something here. First question is, looking through the INDI Driver Docs Repo, it seems that GiGE and USB3-Vision cameras will best be suited in directory for the "generic" cameras. Any contention with this?

@knro

knro commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

No issues at all.

olsonse added 2 commits June 17, 2026 04:23
This patch changes GigECCD to handle the pointer to the underlying
ArvCamera with a unqiue_ptr rather than a raw pointer.  Prior to this
patch, the GigECCD destructor did not delete the ArvCamera pointer.  Using
a smart pointer interface, this is handled much more carefully and memory
leaks are avoided entirely.
This patch implements an iterator in the ArvFactory and creates device
instances for all cameras found.
@olsonse

olsonse commented Jun 20, 2026

Copy link
Copy Markdown
Contributor Author

I just submitted a pull request for the driver documentation in the INDI Driver Docs Repo.

@knro knro merged commit 8a17f78 into indilib:master Jun 21, 2026
5 checks passed
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

Successfully merging this pull request may close these issues.

2 participants