def CalculateDim(data, V, c, screen_width, screen_height, datarate):
n_points = data.shape[1]
m_lines = data.shape[0]
time0 = n_points / datarate
Ltotal = points2range(n_points, datarate, c)
Lpx = Ltotal / n_points
Hpx = V * time0 / 2
Htotal = Hpx * m_lines
scale = Hpx / Lpx
if screen_width == -1:
screen_width = round(screen_height / scale)
elif screen_height == -1:
screen_height = round(screen_width * scale)
dim = (screen_width,screen_height)
# data = cv2.resize(data, dim, interpolation=cv2.INTER_AREA)
return dim
评论列表
文章目录