예제 #1
0
def main():
    if len(sys.argv) < 3:
        print "Usage: {0} <top_dir> <vid_name>".format(sys.argv[0])
        sys.exit()

    top_dir = sys.argv[1]
    video_name = sys.argv[2]

    options = "-t 2 -w 100 -p"

    from make_video import convert_to_video

    for dir_name, subdirList, fileList in os.walk(top_dir):
        if dir_name.endswith('raw'):
            parent_dir = os.path.dirname(dir_name)
            horizon_file = os.path.join(parent_dir, "imuLog.txt")

            output_dir = os.path.join(parent_dir, "tmp")
            rescale(dir_name,
                    output_dir,
                    options=options,
                    horizon_file=horizon_file)

            video_file = os.path.join(parent_dir, video_name)
            convert_to_video(output_dir, video_file)
예제 #2
0
def convert_to_video( frame_dir, imu_file ):
    parent_dir = os.path.dirname( frame_dir )
    tmp_dir = os.path.join(parent_dir, 'tmp')
    rescale( frame_dir, tmp_dir, horizon_file=imu_file )
    video_file = os.path.join(parent_dir, 'out.avi')
    vid.convert_to_video(tmp_dir, video_file)
    shutil.rmtree(tmp_dir)
예제 #3
0
def main():
    if len(sys.argv) < 3:
        print "Usage: {0} <top_dir> <vid_name>".format(sys.argv[0])
        sys.exit()

    top_dir = sys.argv[1]
    video_name = sys.argv[2]
    
    options = "-t 2 -w 100 -p"

    from make_video import convert_to_video

    for dir_name, subdirList, fileList in os.walk(top_dir):
        if dir_name.endswith('raw'):
            parent_dir = os.path.dirname(dir_name)
            horizon_file = os.path.join(parent_dir, "imuLog.txt")

            output_dir = os.path.join(parent_dir, "tmp")
            rescale(dir_name, output_dir, options=options, horizon_file=horizon_file)
            
            video_file = os.path.join(parent_dir, video_name)
            convert_to_video( output_dir, video_file)