
#!/bin/bash
python ../rectify_events_and_frames.py $1/events.h5 \
                                       $1/events_rectified.h5 \
                                       --calibration_file $1/K.yaml \
                                       --are_events \
                                       --map_key inv_map $2

python ../rectify_events_and_frames.py $1/images_png/ \
                                       $1/images_rectified/ \
                                       --calibration_file $1/K.yaml \
                                       --map_key img_map $2 $3

cp $1/images_png/timestamps.txt $1/images_rectified/

python ../rectify_events_and_frames.py $1/reconstructions/e2calib/ \
                                       $1/reconstructions_rectified/ \
                                       --calibration_file $1/K.yaml $2\
                                       --map_key ev_map

cp $1/images_png/timestamps.txt $1/reconstructions_rectified/