Source Node for Point Grey's New Spinview UI

873 views
Skip to first unread message

Nicholas Lusk

unread,
Oct 21, 2016, 1:27:43 PM10/21/16
to Bonsai Users
Hi Goncalo,

I recently started using Point Grey's BlackFlyS USB 3.0 cameras, which uses the new Spinview UI. As a result they do not work with the Point Grey packages FlyCapture source node or with CameraCapture. I was wondering if there were any plans in creating a Spinview compatible node in the future or if there was a simple modification that could be made to the current FlyCapture node to make it work with Spinview.

Best,
Nick

Gonçalo Lopes

unread,
Oct 21, 2016, 2:59:22 PM10/21/16
to Nicholas Lusk, Bonsai Users
Hi Nick,

I didn't realize they had a specific SDK only for the Blackfly cameras. I thought they were moving everything to the unified FlyCapture API. I never tried it since we don't have any Blackflys in the lab. However, I believe they have C# examples for using the Spinnaker, so it should be relatively easy to adapt those into a Bonsai module.

For inspiration you can look here:

It should be possible to just copy the FlyCapture node verbatim and then just place inside the code from the PointGrey spinnaker examples and get it running.

I'll see if I can find time to take a look at their samples to evaluate how hard it would be.


--
You received this message because you are subscribed to the Google Groups "Bonsai Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bonsai-users+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/bonsai-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/bonsai-users/ab09e161-6ef6-4bac-bf4b-6b4c124da3fe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Nicholas Lusk

unread,
Oct 22, 2016, 12:07:09 PM10/22/16
to Bonsai Users, nalu...@gmail.com
Hi Goncalo,

Thanks for the quick response. I unfortunately do not have permission to access the repository you sent in the link. I checked the source files from the bonsai homepage, but didn't find the pointgrey code there either. Any other way I would be able to get access to that module?

Nick


On Friday, October 21, 2016 at 2:59:22 PM UTC-4, goncaloclopes wrote:
Hi Nick,

I didn't realize they had a specific SDK only for the Blackfly cameras. I thought they were moving everything to the unified FlyCapture API. I never tried it since we don't have any Blackflys in the lab. However, I believe they have C# examples for using the Spinnaker, so it should be relatively easy to adapt those into a Bonsai module.

For inspiration you can look here:

It should be possible to just copy the FlyCapture node verbatim and then just place inside the code from the PointGrey spinnaker examples and get it running.

I'll see if I can find time to take a look at their samples to evaluate how hard it would be.

On 21 October 2016 at 18:27, Nicholas Lusk <nalu...@gmail.com> wrote:
Hi Goncalo,

I recently started using Point Grey's BlackFlyS USB 3.0 cameras, which uses the new Spinview UI. As a result they do not work with the Point Grey packages FlyCapture source node or with CameraCapture. I was wondering if there were any plans in creating a Spinview compatible node in the future or if there was a simple modification that could be made to the current FlyCapture node to make it work with Spinview.

Best,
Nick

--
You received this message because you are subscribed to the Google Groups "Bonsai Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bonsai-users...@googlegroups.com.

Gonçalo Lopes

unread,
Oct 23, 2016, 1:58:02 PM10/23/16
to Nicholas Lusk, Bonsai Users
Hi Nicholas,

Sorry for the trouble. I accidentally had the source of the PointGrey module set as a private repository.
The link should work now.


On 22 October 2016 at 17:07, Nicholas Lusk <nalu...@gmail.com> wrote:
Hi Goncalo,

Thanks for the quick response. I unfortunately do not have permission to access the repository you sent in the link. I checked the source files from the bonsai homepage, but didn't find the pointgrey code there either. Any other way I would be able to get access to that module?

Nick

On Friday, October 21, 2016 at 2:59:22 PM UTC-4, goncaloclopes wrote:
Hi Nick,

I didn't realize they had a specific SDK only for the Blackfly cameras. I thought they were moving everything to the unified FlyCapture API. I never tried it since we don't have any Blackflys in the lab. However, I believe they have C# examples for using the Spinnaker, so it should be relatively easy to adapt those into a Bonsai module.

For inspiration you can look here:

It should be possible to just copy the FlyCapture node verbatim and then just place inside the code from the PointGrey spinnaker examples and get it running.

I'll see if I can find time to take a look at their samples to evaluate how hard it would be.


On 21 October 2016 at 18:27, Nicholas Lusk <nalu...@gmail.com> wrote:
Hi Goncalo,

I recently started using Point Grey's BlackFlyS USB 3.0 cameras, which uses the new Spinview UI. As a result they do not work with the Point Grey packages FlyCapture source node or with CameraCapture. I was wondering if there were any plans in creating a Spinview compatible node in the future or if there was a simple modification that could be made to the current FlyCapture node to make it work with Spinview.

Best,
Nick

--
You received this message because you are subscribed to the Google Groups "Bonsai Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bonsai-users...@googlegroups.com.
Visit this group at https://groups.google.com/group/bonsai-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/bonsai-users/ab09e161-6ef6-4bac-bf4b-6b4c124da3fe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Bonsai Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bonsai-users+unsubscribe@googlegroups.com.

salil...@berkeley.edu

unread,
Feb 10, 2017, 6:00:18 PM2/10/17
to Bonsai Users, nalu...@gmail.com
Hi Nicholas and Goncalo,

Just starting my first tests with bonsai for real time fly video tracking + LED control. Unfortunately only camera at my disposal is a BlackFlyS. I've gone through your suggestion and will try it out, but since its been some time since Nicholas asked for this, wondering if any of you already have a Spinnaker compatible node.

Thanks!

Salil

Gonçalo Lopes

unread,
Feb 10, 2017, 6:18:58 PM2/10/17
to salil...@berkeley.edu, Bonsai Users, Nicholas Lusk
Hi Salil,

Unfortunately we still do not have any Spinnaker compatible camera in the lab, so we have no way of testing the API.
However, it should be relatively easy to develop your own. Here's how I would proceed:

2. Add a reference to OpenCV.Net (in visual studio, right-click on the project and click "Manage NuGet packages" - search for OpenCV.Net).
2. Create a new SpinnakerCapture class and copy the original FlyCapture code into it.
3. Download and install the Spinnaker SDK and search the installation folder for their C# examples (they mention they have some). Look for acquisition or frame grabber examples.
4. Add a reference to the Spinnaker C# DLL, which should also be somewhere in the SDK installation folder. I don't know if they were consistent in their naming, but look out for DLLs that have the name "Managed" in them.
5. Modify the FlyCapture code to fit one of their working C# examples. Hopefully the modifications will be really minor.

If you get the project to compile, you should be able to run it directly in Bonsai by pressing "F5" or Debug->Start Debugging from within VisualStudio.

I'm happy to assist in the development, but it would be very useful to have someone with the hardware around for this development. Once you have an example that works, I'm happy to help integrating it into a redistributable Bonsai package.

Hope this helps and feel free to follow up with any questions you might have.


To unsubscribe from this group and stop receiving emails from it, send an email to bonsai-users+unsubscribe@googlegroups.com.

salil...@berkeley.edu

unread,
Feb 10, 2017, 7:01:02 PM2/10/17
to Bonsai Users, salil...@berkeley.edu, nalu...@gmail.com
Thanks for the info Goncalo,
I'll give it a shot and keep you posted.
Cheers!

Torben Ott

unread,
Aug 14, 2017, 11:45:23 AM8/14/17
to Bonsai Users
Hi Goncalo,

I recently started using Bonsai for event-triggered video recording. I'm also using a Pont Grey BlackFlyS USB 3 Model, which is only supported by Spinnaker (they seem to move in that direction, in general). I noticed that you recently added a Spinnaker source node and it works fine for capturing video from the camera (thanks!). But I haven't managed to read the GPIO pin. For the FlyCapture compatible cameras there was an extra node for that, which is not compatible with Spinnaker. 

Do you have an idea how to make it work or is someone working on that?

Thanks a lot,
Torben (CSHL)

Gonçalo Lopes

unread,
Aug 14, 2017, 12:27:29 PM8/14/17
to Torben Ott, Bonsai Users
Hi Torben and welcome to the forums!

The SpinnakerCapture node has a ChunkData member that should have all the metadata information inside. I haven't used much blackfly cameras myself and I can't try this right now, but I suspect the GPIO data should be in the LineStatusAll member.

There isn't yet a convenience node to split them up, but if you connect your input line to GPIO pin 0, that parameter should change between zero and some fixed number.

Try to record or monitor it and let me know what happens.

On 14 August 2017 at 16:45, Torben Ott <ott.t...@gmail.com> wrote:
Hi Goncalo,

I recently started using Bonsai for event-triggered video recording. I'm also using a Pont Grey BlackFlyS USB 3 Model, which is only supported by Spinnaker (they seem to move in that direction, in general). I noticed that you recently added a Spinnaker source node and it works fine for capturing video from the camera (thanks!). But I haven't managed to read the GPIO pin. For the FlyCapture compatible cameras there was an extra node for that, which is not compatible with Spinnaker. 

Do you have an idea how to make it work or is someone working on that?

Thanks a lot,
Torben (CSHL)

On Friday, October 21, 2016 at 1:27:43 PM UTC-4, Nicholas Lusk wrote:
Hi Goncalo,

I recently started using Point Grey's BlackFlyS USB 3.0 cameras, which uses the new Spinview UI. As a result they do not work with the Point Grey packages FlyCapture source node or with CameraCapture. I was wondering if there were any plans in creating a Spinview compatible node in the future or if there was a simple modification that could be made to the current FlyCapture node to make it work with Spinview.

Best,
Nick

--
You received this message because you are subscribed to the Google Groups "Bonsai Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bonsai-users+unsubscribe@googlegroups.com.

Torben Ott

unread,
Aug 14, 2017, 12:55:56 PM8/14/17
to Bonsai Users, ott.t...@gmail.com
Hi,
thanks for your reply! I played around with the ChunkData members. But the LineStatusAll (and others I tried) just stay at zero all the time. I've checked in SpinView that I get a Low/High read on Line0.


On Monday, August 14, 2017 at 12:27:29 PM UTC-4, goncaloclopes wrote:
Hi Torben and welcome to the forums!

The SpinnakerCapture node has a ChunkData member that should have all the metadata information inside. I haven't used much blackfly cameras myself and I can't try this right now, but I suspect the GPIO data should be in the LineStatusAll member.

There isn't yet a convenience node to split them up, but if you connect your input line to GPIO pin 0, that parameter should change between zero and some fixed number.

Try to record or monitor it and let me know what happens.
On 14 August 2017 at 16:45, Torben Ott <ott.t...@gmail.com> wrote:
Hi Goncalo,

I recently started using Bonsai for event-triggered video recording. I'm also using a Pont Grey BlackFlyS USB 3 Model, which is only supported by Spinnaker (they seem to move in that direction, in general). I noticed that you recently added a Spinnaker source node and it works fine for capturing video from the camera (thanks!). But I haven't managed to read the GPIO pin. For the FlyCapture compatible cameras there was an extra node for that, which is not compatible with Spinnaker. 

Do you have an idea how to make it work or is someone working on that?

Thanks a lot,
Torben (CSHL)

On Friday, October 21, 2016 at 1:27:43 PM UTC-4, Nicholas Lusk wrote:
Hi Goncalo,

I recently started using Point Grey's BlackFlyS USB 3.0 cameras, which uses the new Spinview UI. As a result they do not work with the Point Grey packages FlyCapture source node or with CameraCapture. I was wondering if there were any plans in creating a Spinview compatible node in the future or if there was a simple modification that could be made to the current FlyCapture node to make it work with Spinview.

Best,
Nick

--
You received this message because you are subscribed to the Google Groups "Bonsai Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bonsai-users...@googlegroups.com.

Gonçalo Lopes

unread,
Aug 14, 2017, 1:18:55 PM8/14/17
to Torben Ott, Bonsai Users
That's unfortunate. Are all ChunkData members at zero? If that is the case, there may be some issue accessing the API. It's possible that some flag needs to be turned on, etc...

Unfortunately I won't have access to any PointGrey spinnaker camera until the end of August, so I won't be able to help much until then.

To unsubscribe from this group and stop receiving emails from it, send an email to bonsai-users+unsubscribe@googlegroups.com.

Torben Ott

unread,
Aug 14, 2017, 2:10:56 PM8/14/17
to Bonsai Users, ott.t...@gmail.com
So in SpinView there are flags like Chunk Mode Active and then you can select indivual chunks and enable/disable them. I tested this for exposure time, which I can read out live in Bonsai using the chunk data member and the status monitor. This only works when I flag Chunk Mode Active and enable the Exposure Time at the Chunk Selector. However, there is no reference to any line/gpio/linestatus or anything like that at the chunk selector which I coulde enable in SpinView.

Gonçalo Lopes

unread,
Aug 14, 2017, 5:14:45 PM8/14/17
to Torben Ott, Bonsai Users
Hmmm, there should be a setting for the LineStatus chunk as well. Also I think you may have to enable the lines specifically in SpinView, according to their website: https://www.ptgrey.com/KB/11052

As I said, I can't try it right now, unfortunately. Do let us know if you find a way around it. It will be very good to know.

To unsubscribe from this group and stop receiving emails from it, send an email to bonsai-users+unsubscribe@googlegroups.com.

Torben Ott

unread,
Aug 14, 2017, 8:04:57 PM8/14/17
to Bonsai Users, ott.t...@gmail.com
The line (I'm using Line0) should be enabled. Via SpinView I also see different values for i.e. LineStatusAll when I switch between LOW/HIGH. As far as I understand, and according to the technical reference and the chunk data examples, chunk data simply does not include LineStatus or LineStatusAll. At least in the model I have (Blackfly S USB3: BFS-U3-13Y3M)  and according to the technical reference of this and comparable models (Chameleon3/Grasshopper3 USB3). So it seems LineStatus would have to be read out differently, but since I never programmed with a sdk like that I likely won't get into it. If someone else has a solution I would be glad. I might get one of the FlyCapture2 compatible cameras...

Torben Ott

unread,
Aug 17, 2017, 4:04:15 PM8/17/17
to Bonsai Users, ott.t...@gmail.com
one more update:

I contacted Grey Point support asking about example C code for reading LineStatusAll and if it would be possible to include LineStatusAll in ChunkData. Here is the reply:

-----
The linestatusall feature (within chunk data) is not yet available [for camera model BFS-U3-13Y3C/M - some models seem to have it, in my case I need the high fps of this model], but should be in a future
firmware update.

For now, you would have to check the line status/linestatusall of the camera,
rather than a particular image:

CEnumerationPtr ptrLineSelector = pCam->GetNodeMap().GetNode("LineSelector");CEnumEntryPtr
ptrLine1 = ptrLineSelector->GetEntryByName("Line1");ptrLineSelector->SetIntValue(ptrLine1->GetValue());CBooleanPtr
ptrLineStatus = pCam->GetNodeMap().GetNode("LineStatus");CIntegerPtr
ptrLineStatusAll = pCam->GetNodeMap().GetNode("LineStatusAll"); cout << "the
line status for line " << ptrLineSelector->GetIntValue() << " is " <<
ptrLineStatus->GetValue() << endl;cout << "the line status for all gpio pins
together is " << ptrLineStatusAll->GetValue() << endl;

The code above sets the line to line 1, and checks the line status for that
particular GPIO Line. It also checks line status all, and outputs both values.
-----

In case someone wants to try to implements this within a Bonsai node/module.



On Monday, August 14, 2017 at 5:14:45 PM UTC-4, goncaloclopes wrote:

Torben Ott

unread,
Sep 5, 2017, 5:14:40 PM9/5/17
to Bonsai Users, ott.t...@gmail.com
did someone get the chance to look at it?
Thanks!


On Monday, August 14, 2017 at 5:14:45 PM UTC-4, goncaloclopes wrote:

Gonçalo Lopes

unread,
Sep 6, 2017, 6:14:29 PM9/6/17
to Torben Ott, Bonsai Users
Hi Torben,

To be perfectly honest, I would prefer to wait until they add the LineStatus to the chunk metadata, which is definitely the right solution. If the user has to specifically poll the API after grabbing the image, then you add some extra communication latency to the process, which to me makes no sense when talking about precise synchronization.

Also, I would prefer to avoid adding code to cover special cases in the general Spinnaker module.

However, if you need this for short-term experiments (which I fully understand), why not add the lines to the package and make a custom build? All the code is available at: https://bitbucket.org/horizongir/bonsai.spinnaker

Inside SpinnakerCapture.cs is all the capture code and you should be able to add exactly these lines and check if they work.

The project should build automatically. I would recommend if possible using Visual Studio 2012 to avoid problems restoring packages, but let me know if you have trouble building the code.

Hope this helps.

To unsubscribe from this group and stop receiving emails from it, send an email to bonsai-users+unsubscribe@googlegroups.com.

tomwheat...@gmail.com

unread,
Jan 11, 2018, 11:59:15 AM1/11/18
to Bonsai Users
Hi Goncalo,

Thanks for setting up the Spinnaker node, exciting to hear that it works.

Unfortunately when I click Start with Spinnaker Capture in my workflow the error below arises. Can you offer me any advice?

Thanks!
Tom



Auto Generated Inline Image 1

tomwheat...@gmail.com

unread,
Jan 11, 2018, 12:13:39 PM1/11/18
to Bonsai Users
Apologies! I just found you posted an updated version of the node on another thread. Here -

https://groups.google.com/d/msg/bonsai-users/WKjvUzL6o48/ssBSO2L9AQAJ

My camera works now. Thanks Goncalo!
Reply all
Reply to author
Forward
0 new messages