Exemplo n.º 1
0
def edit_movie_example2():
    movie_fol = '/home/noam/Videos/mmvt'
    if not op.isdir(movie_fol):
        movie_fol = '/cluster/neuromind/npeled/videos/mmvt'
    subclips_times = [(2, 34)]
    mu.cut_movie(movie_fol, 'out-6.ogv', 'freeview-mmvt-electrodes.mp4',
                 subclips_times)
    mu.crop_movie(movie_fol, 'freeview-mmvt-electrodes.mp4',
                  'freeview-mmvt-electrodes_crop.mp4')
    subs = [((0, 3), 'Choosing the LAT lead'),
            ((3, 7), 'Choosing the first electrode in the lead (LAT1)'),
            ((7, 11), "The current electrode's averaged evoked response"),
            ((11, 14), "The program estimates the electrode's sources"),
            ((14, 18),
             "The sources' probabilities are colored from yellow to red"),
            ((18, 20), "The electrode (green dot) in FreeView"),
            ((20, 24), "Going over the different electrodes in the lead"),
            ((24, 26), "By combing MMVT and Freeview"),
            ((26, 32), "The user can benefit from both 3D and 2D views")]
    mu.add_text_to_movie(movie_fol,
                         'freeview-mmvt-electrodes.mp4',
                         'freeview-mmvt-electrodes_sub.mp4',
                         subs,
                         fontsize=60)
    mu.create_animated_gif(movie_fol, 'mg78_elecs_coh_meg_diff.mp4',
                           'mg78_elecs_coh_meg_diff.gif')
Exemplo n.º 2
0
def ski_movie():
    do_merge_images = False
    do_cut = False
    do_crop = True
    do_merge = True

    images_fol = '/home/npeled/mmvt/mg78/figures/meg_white'
    frames = glob.glob(op.join(images_fol, '*.png'))
    frames = sorted(frames, key=utils.natural_keys)
    fps = 1
    frames_output_fname = op.join(images_fol, 'meg_trans.mp4')
    if do_merge_images:
        mu.images_to_video(frames, fps, frames_output_fname)

    movie_fol1 = '/home/npeled/Documents/darpa_year3_meeting'
    movie_name1 = 'Skiing.mp4'
    out_movie_name1 = 'skiing_cut.mp4'
    subclips_times = [(35, 50)]
    if do_cut:
        mu.cut_movie(movie_fol1, movie_name1, out_movie_name1, subclips_times)

    movie_fol2 = '/home/npeled/mmvt/mg78/figures/meg_white'
    movie_name2 = 'meg_white.mp4'
    out_movie_name2 = 'meg_white_crop.mp4'
    if do_crop:
        mu.crop_movie(movie_fol2, movie_name2, out_movie_name2, crop_xs=(100, 670))

    movie1_fname = op.join(movie_fol1, out_movie_name1)
    movie2_fname = op.join(movie_fol2, 'meg_trans.mp4')
    output_fname = op.join(movie_fol1, 'ski_brain.mp4')
    if do_merge:
        mu.movie_in_movie(movie1_fname, movie2_fname, output_fname, pos=('right', 'top'), margin=1)
Exemplo n.º 3
0
def edit_movie_example():
    movie_fol = '/cluster/neuromind/npeled/Documents/brain-map'
    mu.cut_movie(movie_fol, 'out-7.ogv', 'freeview-mmvt.mp4')
    mu.crop_movie(movie_fol, 'freeview-mmvt.mp4', 'freeview-mmvt_crop.mp4')
    subs = [((0, 4), 'Clicking on the OFC activation in Freeview'),
            ((4, 9), 'The cursor moved to the same coordinates in the MMVT'),
            ((9, 12), 'Finding the closest activation in the coordinates'),
            ((12, 16), 'The activation is displayed with its statistics')]
    mu.add_text_to_movie(movie_fol, 'freeview-mmvt_crop.mp4', 'freeview-mmvt_crop_text.mp4', subs)
    mu.create_animated_gif(movie_fol, 'mg78_elecs_coh_meg_diff.mp4', 'mg78_elecs_coh_meg_diff.gif')
Exemplo n.º 4
0
def edit_movie_example():
    movie_fol = '/cluster/neuromind/npeled/Documents/brain-map'
    mu.cut_movie(movie_fol, 'out-7.ogv', 'freeview-mmvt.mp4')
    mu.crop_movie(movie_fol, 'freeview-mmvt.mp4', 'freeview-mmvt_crop.mp4')
    subs = [((0, 4), 'Clicking on the OFC activation in Freeview'),
            ((4, 9), 'The cursor moved to the same coordinates in the MMVT'),
            ((9, 12), 'Finding the closest activation in the coordinates'),
            ((12, 16), 'The activation is displayed with its statistics')]
    mu.add_text_to_movie(movie_fol, 'freeview-mmvt_crop.mp4', 'freeview-mmvt_crop_text.mp4', subs)
    mu.create_animated_gif(movie_fol, 'mg78_elecs_coh_meg_diff.mp4', 'mg78_elecs_coh_meg_diff.gif')
Exemplo n.º 5
0
def edit_movie_example2():
    movie_fol = '/home/noam/Videos/mmvt'
    if not op.isdir(movie_fol):
        movie_fol = '/cluster/neuromind/npeled/videos/mmvt'
    subclips_times = [(2, 34)]
    mu.cut_movie(movie_fol, 'out-6.ogv', 'freeview-mmvt-electrodes.mp4', subclips_times)
    mu.crop_movie(movie_fol, 'freeview-mmvt-electrodes.mp4', 'freeview-mmvt-electrodes_crop.mp4')
    subs = [((0, 3), 'Choosing the LAT lead'),
            ((3, 7), 'Choosing the first electrode in the lead (LAT1)'),
            ((7, 11), "The current electrode's averaged evoked response"),
            ((11, 14), "The program estimates the electrode's sources"),
            ((14, 18), "The sources' probabilities are colored from yellow to red"),
            ((18, 20), "The electrode (green dot) in FreeView"),
            ((20, 24), "Going over the different electrodes in the lead"),
            ((24, 26), "By combing MMVT and Freeview"),
            ((26, 32), "The user can benefit from both 3D and 2D views")]
    mu.add_text_to_movie(movie_fol, 'freeview-mmvt-electrodes.mp4', 'freeview-mmvt-electrodes_sub.mp4', subs, fontsize=60)
    mu.create_animated_gif(movie_fol, 'mg78_elecs_coh_meg_diff.mp4', 'mg78_elecs_coh_meg_diff.gif')
Exemplo n.º 6
0
def edit_movie_example4():
    movie_fol = '/home/noam/Pictures/mmvt/mg99/lvf4-3_4_1'
    movie_name = 'mg99_LVF4-3_stim_srouces_long.mp4'
    out_movie_name = 'mg99_LVF4-3_stim_srouces.mp4'
    subclips_times = [(0, 29)]
    mu.cut_movie(movie_fol, movie_name, out_movie_name, subclips_times)
Exemplo n.º 7
0
def edit_movie_example4():
    movie_fol = '/home/noam/Pictures/mmvt/mg99/lvf4-3_4_1'
    movie_name = 'mg99_LVF4-3_stim_srouces_long.mp4'
    out_movie_name = 'mg99_LVF4-3_stim_srouces.mp4'
    subclips_times = [(0, 29)]
    mu.cut_movie(movie_fol, movie_name, out_movie_name, subclips_times)