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
ssm(): add combine=True for a single horizontal+vertical motion SSM
ssm(features='motiongrams', combine=True) concatenates the horizontal and
vertical motiongram feature sequences per frame and computes one self-similarity
matrix, returning a single MgImage that captures both axes of motion in one
display (instead of the default MgList of two separate SSMs).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: musicalgestures/_ssm.py
+32Lines changed: 32 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -75,6 +75,7 @@ def mg_ssm(
75
75
use_median=False,
76
76
kernel_size=5,
77
77
invert_yaxis=True,
78
+
combine=False,
78
79
title=None,
79
80
target_name=None,
80
81
overwrite=False):
@@ -89,6 +90,9 @@ def mg_ssm(
89
90
blur (str, optional): 'Average' to apply a 10px * 10px blurring filter, 'None' otherwise. Defaults to 'None'.
90
91
norm (int, optional): Normalize the columns of the feature sequence. Possible to compute Manhattan norm (1), Euclidean norm (2), Minimum norm (-np.inf), Maximum norm (np.inf), etc. Defaults to np.inf.
91
92
norm_threshold (float, optional): Only the columns with norm at least `norm_threshold` are normalized. Defaults to 0.001.
93
+
combine (bool, optional): For 'motiongrams', compute a single SSM from the concatenated
94
+
horizontal + vertical motiongram features (both axes of motion in one display) and
95
+
return a single MgImage instead of an MgList of two. Defaults to False.
92
96
cmap (str, optional): A Colormap instance or registered colormap name. The colormap maps the C values to colors. Defaults to 'gray_r'.
93
97
use_median (bool, optional): If True the algorithm applies a median filter on the thresholded frame-difference stream. Defaults to False.
94
98
kernel_size (int, optional): Size of the median filter (if `use_median=True`) or the erosion filter (if `filtertype='blob'`). Defaults to 5.
0 commit comments