Averaging multiple 2d histograms from folder of videos #875
Answered
by
bruno-f-cruz
bruno-f-cruz
asked this question in
Q&A
-
The following question was asked in the Bonsai Users - Google Groups Original post I have developed a pipeline (shown here) that tracks an animals movement and creates a 2d density plot of their location. I'm having trouble, however, identifying how to do this across multiple videos and then averaging the density plots to get 1 for the experimental condition. Any help would be greatly appreciated! |
Beta Was this translation helpful? Give feedback.
Answered by
bruno-f-cruz
Apr 18, 2022
Replies: 1 comment
-
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
bruno-f-cruz
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Brandon,
I will split the answer in a few self-contained points. Let me know if something is not clear.
1. How to load multiple videos?
I am assuming you want to load several videos and analyze them offline. The easist way to achieve this is using
GetFiles
which returns all files that match a specific search pattern inside a folder. I am also going to assume you want to load ALL video files inside a folder. This means we can simply load all files with an ".avi" extension (SearchPattern
= "*.avi). The output of this node will be an array of strings which contains all the files matching the search pattern. I will also take note of the length of the array which may be handy to have around…