Skip to content

Commit fce6b7d

Browse files
author
arch
committed
rename pitch to roll
1 parent f329843 commit fce6b7d

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

funscript_editor/algorithms/funscriptgenerator.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def __init__(self,
9393
'x': [],
9494
'y': [],
9595
'euclideanDistance': [],
96-
'pitch': []
96+
'roll': []
9797
}
9898
self.bboxes = {
9999
'Men': [],
@@ -319,19 +319,19 @@ def calculate_score(self) -> None:
319319
x = self.bboxes['Woman'][i][0] - self.bboxes['Men'][i][0]
320320
y = self.bboxes['Men'][i][1] - self.bboxes['Woman'][i][1]
321321
if x >= 0 and y >= 0:
322-
self.score['pitch'].append(np.arctan(np.array(y / max((10e-3, x)))))
322+
self.score['roll'].append(np.arctan(np.array(y / max((10e-3, x)))))
323323
elif x >= 0 and y < 0:
324-
self.score['pitch'].append(-1.0*np.arctan(np.array(y / max((10e-3, x)))))
324+
self.score['roll'].append(-1.0*np.arctan(np.array(y / max((10e-3, x)))))
325325
elif x < 0 and y < 0:
326-
self.score['pitch'].append(math.pi + -1.0*np.arctan(np.array(y / x)))
326+
self.score['roll'].append(math.pi + -1.0*np.arctan(np.array(y / x)))
327327
elif x < 0 and y >= 0:
328-
self.score['pitch'].append(math.pi + np.arctan(np.array(y / x)))
328+
self.score['roll'].append(math.pi + np.arctan(np.array(y / x)))
329329
else:
330330
# this should never happen
331331
self.logger.error('Calculate score not implement for x=%d, y=%d', x, y)
332332

333333
# invert because math angle is ccw
334-
self.score['pitch'] = [-1.0*item for item in self.score['pitch']]
334+
self.score['roll'] = [-1.0*item for item in self.score['roll']]
335335

336336

337337
else:
@@ -341,7 +341,7 @@ def calculate_score(self) -> None:
341341
self.score['x'] = sp.scale_signal(self.score['x'], 0, 100)
342342
self.score['y'] = sp.scale_signal(self.score['y'], 0, 100)
343343
self.score['euclideanDistance'] = sp.scale_signal(self.score['euclideanDistance'], 0, 100)
344-
self.score['pitch'] = sp.scale_signal(self.score['pitch'], 0, 100)
344+
self.score['roll'] = sp.scale_signal(self.score['roll'], 0, 100)
345345

346346

347347
def scale_score(self, status: str, metric : str = 'y') -> None:

funscript_editor/ui/settings_dialog.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def __setup_combo_boxes(self):
4747
self.ui.videoTypeComboBox.addItems([PROJECTION[key]['name'] \
4848
for key in PROJECTION.keys() \
4949
if 'vr' not in key.lower() or self.include_vr])
50-
self.ui.trackingMetricComboBox.addItems(['y (up-down)', 'x (left-right)', 'euclideanDistance', 'pitch'])
50+
self.ui.trackingMetricComboBox.addItems(['y (up-down)', 'x (left-right)', 'euclideanDistance', 'roll (rotation)'])
5151
self.ui.trackingMethodComboBox.addItems(['Woman', 'Woman + Men'])
5252

5353
def __set_tracking_metric(self, value):

0 commit comments

Comments
 (0)