tracker.py 文件源码

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

项目:MultiObjectTracker 作者: alokwhitewolf 项目源码 文件源码
def get_fps(source, Videolength):
    cap = cv2.VideoCapture(source)
    frame_counter = 0
    print "Calculating Frames per second . . . "

    while (True):
        # Capture frame-by-frame

        ret, frame = cap.read()
        if not ret:
            break

        frame_counter += 1

    cap.release()
    cv2.destroyAllWindows()
    fps = float(frame_counter/Videolength)
    print "\nFPS is " +str(fps)+"\n"

    return fps

#Algorithm to check intersection of line segments
#It checks iteratively intersection between a pair of points(Last location of the vehicle) and pairs of points of another List(Pedestrian path)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号