ROI detection when Object/stimulus animal is in the ROI? #964
-
Hello, Through other posts, I've been able to make an ROI detection script that will count the frames where the ROI has activity. However, for my set up, there will always be a container/stimulus animal in the ROI, which tends to also appear as "in the ROI" with basic range threshold and ROI activity methods. Is it possible to still get ROI detection despite this? I thought about maybe detecting if a moving centroid is in the ROI? Any help you be greatly appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Heya! Two related solutions:
Hope it helps! |
Beta Was this translation helpful? Give feedback.
Heya!
Two related solutions:
Use
backgroundSubtraction
with a very small adaptation rate (i would probably start with 0 actually) and play with the subtract method to check what gives you the best results.Alternatively, you could do your own motion detector by taking the difference between two frames. In its simplest form it would look something like this in Bonsai:
Hope it helps!