Skip to content

Create player_path_smoothing.py#3

Open
ms82119 wants to merge 1 commit into
fenaux:mainfrom
ms82119:patch-1
Open

Create player_path_smoothing.py#3
ms82119 wants to merge 1 commit into
fenaux:mainfrom
ms82119:patch-1

Conversation

@ms82119

@ms82119 ms82119 commented Oct 16, 2024

Copy link
Copy Markdown

Just an example of trying to smooth out the noisy player radar positions arising from various errors in the homography and detections.

Please feel free to modify and improve, or ignore :)

Just an example of trying to smooth out the noisy player radar positions arising from various errors in the homography and detections.

@fenaux fenaux left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good, your python skill is better than mine ;)

About removing outliers. You eliminate the frame number. That is a coordinate can be an outlier an clothe to the path at an other time. I give an example of such a situation in the notebook. For the ball agglomerative clustering that allow to define a connectivity works better than dbscan. In addition distance_threshold in agglomerative clustering is the actual euclidian distance. The relationship between eps in DBSAN and the actual distance between points is not clear to me.

Savgol filter has not any physical background. So I prefer Kalman smoothing or frequency filtering

Note about acceleration :
y = np.diff(x) and z = np.diff(y)
then z[i] =y[i+1] - y[i]
z[i] = x[i+2] -x[i+1] - (x[i+1] - x[i])
z[i] = x[i+2] - 2*x[i+1] + x[i]
which is a very good approximation of second derivative at frame i+1 so index shift should be 1 and not 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants