Measuring the total time spent in the ROI region

162 views
Skip to first unread message

Ryan R. Avenido

unread,
Jan 30, 2021, 10:47:15 AM1/30/21
to Bonsai Users
Hello again,
I'm sorry for repeated emails about the same thing, but I just feel like I'm not specific enough. Fortunately, I'm able to see the time markers (through Accumulate) when my object (the mouse) enters/leaves the cropped ROI region. However, I'm more interested in calculating/finding the total time that the mouse spends in the ROI (for example: a mouse spends 1.43 seconds in the ROI). Is there a way in the workflow I can do this? Any help will be greatly appreciated. 

Here is a screenshot of the workflow template I'm using. Where in the workflow can I include a module that tracks down total time spent rather than just time markers when the mouse exits/enters?
Workflow template.png

Charis Brakatselos

unread,
Jan 30, 2021, 12:06:28 PM1/30/21
to Bonsai Users
Hello, 
I have a similar workflow for measuring accumulating time that a mouse spends in a ROI. In my case it works fine. Are you sure that the value you take from Last visualization is not the total time? In order to "catch" the value you probably have to set your file capture not to play as loop, so when the video ends, there are no more frames of video comming through the workflow, so the Last node can display the last vale that the Acumulate node shows. 
Hope this helps.

frrav...@gmail.com

unread,
Jan 30, 2021, 12:22:13 PM1/30/21
to Charis Brakatselos, Bonsai Users

Hello Charis—

 

Thanks for the email. To answer your question, I had file capture NOT playing a loop. I had it as False. Yes, I’m sure the value from Last visualization is not the total time. It just states the time markers that the mouse has entered and exited. Attached is a screenshot, so that you and others can help figure this issue out. Thanks!

 

--
You received this message because you are subscribed to a topic in the Google Groups "Bonsai Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/bonsai-users/rIVF25Dy1GM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to bonsai-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bonsai-users/922765e9-66a3-4b56-9944-a2e4c870f14bn%40googlegroups.com.

Workflow template 2.png

frrav...@gmail.com

unread,
Jan 30, 2021, 12:27:00 PM1/30/21
to Charis Brakatselos, Bonsai Users

Also, how do you interpret the time values? I’ve recently been accustomed to this feature of Bonsai.

 

Thanks,

Ryan

frrav...@gmail.com

unread,
Jan 30, 2021, 2:44:01 PM1/30/21
to Charis Brakatselos, Bonsai Users

Based on the screenshot, I doubt that the mouse spent 37 seconds in the ROI region. That’s why I have doubt, because the mouse rarely spends time in the region.

 

From: frrav...@gmail.com <frrav...@gmail.com>
Sent: Saturday, January 30, 2021 11:22 AM
To: 'Charis Brakatselos' <ch.brak...@gmail.com>; 'Bonsai Users' <bonsai...@googlegroups.com>

frrav...@gmail.com

unread,
Jan 30, 2021, 3:13:34 PM1/30/21
to Charis Brakatselos, Bonsai Users

Another question:

 

Are the numbers in the form of milleseconds, or minutes and seconds in Accumulate and Last?

 

From: bonsai...@googlegroups.com <bonsai...@googlegroups.com> On Behalf Of Charis Brakatselos
Sent: Saturday, January 30, 2021 11:06 AM
To: Bonsai Users <bonsai...@googlegroups.com>
Subject: [bonsai-users] Re: Measuring the total time spent in the ROI region

 

Hello, 

 

Gonçalo Lopes

unread,
Feb 7, 2021, 12:19:16 PM2/7/21
to Ryan R. Avenido, Charis Brakatselos, Bonsai Users
Hi Ryan,

Can you attach the .bonsai workflow file and an example video so it is easier to investigate? Often the behavior will depend on parameters which are not visible from the screenshots, so it is hard to say exactly without playing around with the file.

Also, if these questions are all relating to the same issue, it is actually helpful to keep them to one thread, so that answers are not duplicated and potentially lost in the middle of the other posts.

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/000001d6f744%2460eefc40%2422ccf4c0%24%40gmail.com.
Reply all
Reply to author
Forward
0 new messages