strawlab / strand-braid

Live, low-latency 2D and 3D tracking from single or multiple high-speed cameras
https://strawlab.org/braid/
Other
50 stars 8 forks source link

allow user setting of MaxTransferSize #10

Closed astraw closed 2 years ago

astraw commented 2 years ago

To obtain high frame rates from multiple cameras, it is important that the MaxTransferSize parameter can be set by users. With most camera parameters for which we do not provide a UI to change the value, the value can be set in the vendor camera program (e.g. Pylon Viewer App) and the camera setting will remain when the Pylon Viewer is stopped and Braid or Strand Camera are started. However, the MaxTransferSize parameter seems to be reset, so we need to provide a way to set this parameter within Braid and Strand Camera.

See https://groups.google.com/g/multicams/c/7oAWkhGGWAY/m/GEW065-mAAAJ

astraw commented 2 years ago

I now wonder what other camera parameters get reset automatically. If there is documentation about this, I would be grateful for a pointer here in the issue or at the google group thread above.

astraw commented 2 years ago

So now I understand MaxTransferSize is not a camera property per se but rather a property of the "stream grabber" and hence seems to be treated differently. According to https://groups.google.com/g/multicams/c/9Cj8ZqNOdzg the default values for the stream grabber seem dependent on software in use (potentially both the OS version and Pylon version).

I just released pylon-cxx 0.3.0 which brings out the stream grabber node map and thus we can now update strand camera to be able to control MaxTransferSize. I am just working on Strand Camera and Braid to do this in a long-term sustainable way but it is already working in my quick-and-dirty hack.

astraw commented 2 years ago

Given that the "stream grabber" seems to be specific to the Basler Pylon drivers rather than a general camera property (which would then presumably be similar to other manufacturers), to allow this to be arbitrarily settable would require making some Basler-specific API. Instead of doing this, I simply changed the Basler drivers to set MaxTransferSize to the maximum possible value in e553627065f1aab73845d4d9f528433076b36f9e. This seems to work where I have tested it.

This will be included in the next release.