Capture.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:GidroGraf-Sirius 作者: alf3r 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号