Commit c035e726 authored by smile2019's avatar smile2019

fix:中文字幕推荐 返回的绝对值转为比例

parent 99620bf0
......@@ -82,6 +82,8 @@ def evaluate_position(video_path: str, start_time: float) -> Tuple[float, float]
position_map[(y1,y3)]=1
print(sorted( position_map.items(), key = lambda kv:(kv[1], kv[0])))
y1,y2 = sorted( position_map.items(), key = lambda kv:(kv[1], kv[0]))[-1][0]
y1 = y1/video.get(cv2.CAP_PROP_FRAME_HEIGHT)
y2 = y2/video.get(cv2.CAP_PROP_FRAME_HEIGHT)
return y1,y2
def get_position(video_path: str, start_time: float, rate: float, rate_bottom: float) -> Tuple[float, float]:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment