Integrating Bonsai and MED-PC

139 views
Skip to first unread message

Jocelyn Santiago

unread,
Mar 23, 2022, 2:03:27 PM3/23/22
to Bonsai Users
Good afternoon, 

I am trying to integrate Bonsai with MED-PC. The initial idea is to get both Bonsai and MED-PC open at the same time. We have four behavior boxes that could also potentially be running at the same time and for some experiments we're going to be doing neural recording with Spike Gadgets. 

So far, I have only managed to do recording and I have some idea of how to do tracking but while trying to set up the camera in the arena I'm having an issue with the Crop node. I don't know determine my RegionofInterest. I used someone else's example and it's giving me an error message that says "Incorrect size of input arrayin function cvGetSubRect,array.cpp(1262)".

In summary, I have pretty much no idea on how to get where I want to go with Bonsai, so any insight would be super helpful. Thanks in advance!

brunocruz

unread,
Mar 23, 2022, 2:14:57 PM3/23/22
to Bonsai Users
Hi Jocelyn,

Not sure how we can help with the first part. Could you provide a little more detail on what you want to achieve? Hopefully someone in the foruns will be able to point you in the right direction.

Regarding the error you are getting, it sounds like the Crop you are defining is larger than the image of your camera. In order to fix it, you should reset the ROI. In the top right corner of Bonsai window, under Properties, input '0,0,0,0' in the RegionOfInterest property. This will reset the ROI, and your workflow should be able to run again. If you want to draw a new crop, click in the "..." icon available under the same property and draw the desired rectangular ROI.

Hope this helps,
Bruno

Jocelyn Santiago

unread,
Mar 23, 2022, 3:23:58 PM3/23/22
to Bonsai Users
So my goal is that when I open Bonsai the MED-PC program also opens and they work in sync. I don't know if it's possible, hopefully someone here has done that. I also would like to see if Bonsai can sync the camera input time with the signal input time and the med pc power on. 

I also tried drawing the ROI and was unable too. Any more information on that?
Reply all
Reply to author
Forward
0 new messages