Spinnaker SDK

19 views
Skip to first unread message

Suman Kalyan Guha

unread,
Aug 16, 2020, 4:50:58 PM8/16/20
to autopilot-users
Hello!

This is Suman, I am a postdoc at McLean Hospital and am currently studying addiction-like behaviors. Super excited for this platform — this has the potential to turbocharge high-throughput behavior!

I was particularly excited about recording behavior using spinnaker SDK in v0.30 and would love to know more about its implementation. 

Thanks!

Jonny Saunders

unread,
Aug 20, 2020, 1:35:39 PM8/20/20
to autopilot-users
Hello Suman!!

The interface with the Spinnaker SDK uses this object: https://docs.auto-pi-lot.com/en/latest/autopilot.hardware.cameras.html#autopilot.hardware.cameras.Camera_Spinnaker

and you can see an example of its use in the testing task we used to benchmark its use with DLC-Live: https://github.com/wehr-lab/autopilot/blob/4dce084bc279bbb4855374e2b37639f7b0dee206/autopilot/tasks/test.py#L24

It follows the (still flexible) API for cameras in Autopilot, a description for which can be found in the metaclass documentation: https://docs.auto-pi-lot.com/en/latest/autopilot.hardware.cameras.html#autopilot.hardware.cameras.Camera

in short, a few common camera parameters (like fps, exposure, etc.) are wrapped in properties that let them be set like "cam.fps = 30" but the rest of the GenICam properties can be accessed and edited with the "get" and "set" methods. you can see the list of properties and values with "readable_attributes" and "writable_attributes". you can see the options for a particular setting (eg. the available color modes for a camera) using the "list_options" method.

from there you can capture frames and use them either by streaming them, saving them locally, or by using a python Queue. (see the "stream", "write" and "queue" methods)

let me know what other questions you have :):) The Spinnaker class is new and surely can use some shaping from other contributors, so if you have ideas id love to work with you on them!

Reply all
Reply to author
Forward
0 new messages