Skip to content

Commit 863b0fc

Browse files
committed
fix masking issue in interpolate
1 parent 14b3b92 commit 863b0fc

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/python/pose_format/numpy/pose_body.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -339,13 +339,18 @@ def interpolate(self, new_fps: int = None, kind='cubic'):
339339
for people in points:
340340
new_frames = []
341341
for frames in people:
342-
mask = frames.transpose()[0].mask
342+
mask = frames.transpose()[-1].mask
343+
# print(mask)
343344

344345
partial_steps = ma.array(steps, mask=mask).compressed()
345346

346347
if partial_steps.shape[0] == 0: # No data for this point
347348
new_frames.append(np.zeros((_new_frames, frames.shape[1])))
348349
else:
350+
# print(frames)
351+
# print(frames.shape)
352+
# print(frames.compressed().shape)
353+
# print(partial_steps.shape)
349354
partial_frames = frames.compressed().reshape(partial_steps.shape[0], frames.shape[1])
350355

351356
if len(partial_steps) == 1:

0 commit comments

Comments
 (0)