You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What was the reasoning for using a window size of 25 when smoothing coordinates and in general for this type of data what is the best way to decide what parameters to use? Does it by any chance depend on frame rate?
Thanks!
The text was updated successfully, but these errors were encountered:
That was really just an example -- you can do whatever smoothing you'd like (or none at all) depending on the nature of your analysis.
A window size of 25 is pretty big; as a rule of thumb, you want the smallest window that will still eliminate the majority of artifacts that you want to eliminate. Larger window sizes will give you fewer artifacts but make it harder to retain fast motions, whereas smaller window sizes may not suffice to get rid of your artifacts and may even introduce new ones.
If the framerate of your video is low or the animal moves quickly, a large window size may get rid of real biological signal. A small window size may overfit the interpolation kernel to noise, especially if artifacts (like tracking errors) occur over multiple frames.
Ultimately it's something you'll have to experiment with yourself for the issues present in your own data. My recommendations are:
To get rid of sharp 1-2 frame jumps, use a median filter with a small window (5-7).
To get rid of small jumps, use a Savitzky Golay filter with a slightly larger window (7-15) and relatively low degree (4-8).
To get rid of discretization artifacts or high frequency/small magnitude errors, first try a Gaussian filter with small sigma (1-2) or moving average filter with small window size (3-7). If that doesn't work well, try the Savitzky Golay filter.
Let me know if that makes sense or if you have any other questions. Cheers!
What was the reasoning for using a window size of 25 when smoothing coordinates and in general for this type of data what is the best way to decide what parameters to use? Does it by any chance depend on frame rate?
Thanks!
The text was updated successfully, but these errors were encountered: