We found the following commands quite useful when managing the video frames of the dataset. You may find some of them useful too, if you work on a UNIX based machine.

Creating Video From Images: To quickly navigate through images, you may find it easy to first create a video out of images and then flick through the frames of the video. Alternatively you can use gthumb to have a thumbnail view of all the images. Gthumb also lets to edit images. In case you chose the former and want to convert the images to a video, you may find the following command useful.

mencoder mf://@list.txt -mf w=640:h=480:fps=20:type=png -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell -oac copy -o output.avi

The list.txt is a file containing the list of all images you want to make a video out of. More information about mencoder usage can be found here on this webpage.


Batch Removal Of Symbolic Links: We have links in directory for images that are common among different frame-rates. In case you want to remove links in batch, you may find the following command useful. You may need this when you create your own renderings and copy common files and later feel the need to remove the wrong ones copied.

find . -lname '*' -exec rm {} \;

Batch Renaming Files: For batch renaming files, you may find the tool, gprename quite useful. It is a simple GUI interface and lets you select files and rename them in batch very quickly.

gprename: http://gprename.sourceforge.net/

Appending String At The End of Lines In A File: In case you want to add the same string at the end of all the lines in a file, you may find the following command useful. This needs vim in escape (ESC) mode.

%norm A _string_you_want_to_append_

Batch Conversion File Format: If you are looking to batch convert images from one format to other, the following command let us you convert (as an example) all ppm files to png format in batch.

mogrify -format png *.ppm

Averaging Images: At times, you may feel the need to average images. ImageMagick's convert command lets you easily do that on your shell as shown in the following.

convert -average scene_??_0000.png scene_avg_0000.png

Creating Symbolic Links With Shell For Loop: To create symbolic links of files for different frame-rates, you may want to use the shell for loop for that on your command prompt.

for i in {20..200..20}; do `ln -s /vol/robotvision/ahanda/DatasetOnline/$i\fps/$i\fps_perfect_images_format.tgz $i\fps_perfect_images_format.tgz`; done

Replacing a text in multiple files of directory: To replace a given string in multiple files in a directory on your command prompt.

sed -i 's/text to replace/new text/g' *.sh

Deleting line containing a particular text/string in vim :

:g/text_string/d
More here Vim string delete