Skip to content

Commit 69f7622

Browse files
author
arch
committed
add todo
1 parent c6ed34e commit 69f7622

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

funscript_editor/algorithms/funscriptgenerator.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,9 @@ def scale_score(self, status: str, metric : str = 'y') -> None:
275275
max_distance_frame = FFmpegStream.get_frame(self.params.video_path, max_distance_frame_num)
276276
max_distance_frame = FFmpegStream.get_projection(max_distance_frame, self.projection_config)
277277
center_line = self.ui.line_selector(max_distance_frame, "draw line on center of dick")
278+
max_distance_roll_score = self.score['roll'][max_distance_frame_num - self.params.start_frame]
278279
print('center line', center_line)
280+
# TODO calc angel of line and apply max_distance_roll_score to get real center offset and appl offset to all items in roll score
279281

280282
min_tracking_points = self.get_tracking_points_by_frame_number(min_frame - self.params.start_frame)
281283
max_tracking_points = self.get_tracking_points_by_frame_number(max_frame - self.params.start_frame)

funscript_editor/ui/opencvui.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,12 @@ def was_key_pressed(self, key: str) -> bool:
100100

101101

102102
class DrawSingleLineWidget(object):
103-
def __init__(self, background_img, window_name, preview_scaling):
103+
def __init__(self, background_img, window_name, preview_scaling, color=(36,255,12)):
104104
self.original_image = background_img
105105
self.clone = self.original_image.copy()
106106
self.window_name = window_name
107107
self.preview_scaling = preview_scaling
108+
self.color = color
108109

109110
cv2.namedWindow(window_name)
110111
cv2.setMouseCallback(window_name, self.extract_coordinates)
@@ -122,7 +123,7 @@ def extract_coordinates(self, event, x, y, flags, parameters):
122123
elif event == cv2.EVENT_LBUTTONUP:
123124
self.end_coordinate = (x,y)
124125
self.clone = self.original_image.copy()
125-
cv2.line(self.clone, self.start_coordinate, self.end_coordinate, (36,255,12), 2)
126+
cv2.line(self.clone, self.start_coordinate, self.end_coordinate, self.color, 2)
126127

127128
def show_image(self):
128129
return self.clone

0 commit comments

Comments
 (0)