Anyone got experience using Basler with or without Directshow?

1,065 views
Skip to first unread message

Eirinn Mackay

unread,
Jun 12, 2019, 1:45:07 PM6/12/19
to Bonsai Users
Hi all,

I'm trying to set up a Basler camera with Bonsai. The Pylon viewer works. Bonsai's PylonCapture does not work (I manually gave it a PFS file but it still causes an external exception). I saw on this forum some people have used Basler cameras as DirectShow devices, however it doesn't show up as a DirectShow camera even thought Pylon should install it.

I've tried both x86 and x64 Bonsai, and 2.3 and 2.4. I think if I can just get the camera appearing as a directshow device then it'll all be fine, but I've run out of ideas on how to get that going.

Cheers,
Eirinn

Puja Patel

unread,
Jun 12, 2019, 2:31:43 PM6/12/19
to Bonsai Users
I have just recently started using Basler/Pylon with Bonsai and I'm coming across issues as well, but if you're talking about simply getting an image to show from Basler cameras to Bonsai, I was able to get that by installing the 5.1.0 version of Pylon and using that viewer version to save the configuration file that I would later have to attach into the PylonCapture node as "Parameter file". You would also have to put the camera's serial number, then create a Source.Image node following that, then doing the HSVthreshold and FindContour (if needed for an object). That's where I got to so far, and I'm not completely sure if it is going in the right direction considering I am still trying to find a way to record the raw video data, but I hope that somehow helps you!
-Puja

Eirinn Mackay

unread,
Jun 13, 2019, 6:02:47 AM6/13/19
to Bonsai Users
Hi Puja, thanks for that - it made me go back and try it again. After a restart I was able to select the camera's serial number and it works great! Previously Bonsai would crash when I tried to click the drop down menu. So I think the solution is: install Pylon (in developer mode) then restart, and then use Pylon's gui to save the preferences for the camera and select that file in Bonsai, and hopefully the camera serial number will be in the drop down list. Hope this helps anyone stuck with this in the future.
Cheers
Eirinn

Char K

unread,
Jul 1, 2020, 3:54:25 AM7/1/20
to Bonsai Users
Hello, 

I know this post is from a year ago, but I'm now trying to set up a Basler camera with Bonsai as well, and I can get the camera to work on Pylon Viewer but can't get it to work with PylonCapture too. 

From Pylon Viewer, I go to Camera > Save Features to save the .pfs file, and select this file for the ParameterFile in the PylonCapture node; I type the serial number of the camera according to the S/N on the sticker on the camera for SerialNumber in the PylonCapture node. However, when I click the green play button in Bonsai, I get the error "External component has thrown an exception.". Then, if I connect the VideoWriter node to the PylonCapture node, there is an error that says "No method overload found for the given arguments."

I just want to get Bonsai to take videos from the Basler camera, but I'm not sure what I am doing wrong. 

Puja said to "create a Source.Image node following that"- does this mean to connect the Source.Image node following PylonCapture? But I can't find the Source.Image node. 

I think I installed Pylon viewer as a camera user and not in "developer mode" and restarted the computer but I'm not sure if developer mode is necessary.

I would really appreciate some advice on this! Thank you!

Cheers,
Charmay

Gonçalo Lopes

unread,
Jul 8, 2020, 3:35:59 PM7/8/20
to Char K, Bonsai Users
Hi Charmay and welcome to the forums,

This is probably a compatibility issue. The current Bonsai - Pylon package requires the 5.1.0 pylon runtime. Unfortunately Basler doesn't make their drivers backwards compatible... what version is it at right now? If you can install the 5.1.0 version it should work.

Hope this helps.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/bonsai-users/69a96909-4064-4447-ad81-5670ebfa5f6fo%40googlegroups.com.

Jonah Pearl

unread,
Feb 14, 2022, 4:56:28 PM2/14/22
to Bonsai Users
Hi other Bonsai + Pylon users,

Thank you for this thread -- it helped me get set up quickly. Can confirm that you need to install 5.1.0 pylon runtime, add the serial number from the Pylon Viewer, and provide a config file. After that, it works beautifully using either 4CC "DIB " (note the space) or "FFV1" (requires ffmpeg I think). But I'm experiencing an issue where I can't actually open the video for viewing as it records -- if I double click any of the nodes, the program thinks for a few seconds, and then exits quickly (crashes) with no error message. For the others on this thread, are you / were you able to view the videos being captured in real time? Worst case, I can use the pylon viewer to set up the video, and Bonsai to capture, but I have a feeling that something is wrong somewhere if I can't view the video and I want to catch it early. Project is attached.

Thanks!
Jonah

basler_capture.bonsai

Chi-Yu Lee

unread,
Jan 19, 2023, 11:36:44 AM1/19/23
to Bonsai Users
just a note that there is a new pylon library available on Bonsai using 7.1.0 pylon runtime so you dont need to go back to the old 5.1.0 anymore.
For more discussion: please go to the github page <https://github.com/bonsai-rx>

Reply all
Reply to author
Forward
0 new messages