Encoding Frames into Individual Image Files

This section describes how video data recorded in a log file can be exported into individual image files.


  1. Process the log file with bag-cat:

    $ bag-cat --load-idl "rst/proto/stable/rst/vision/Image.proto"                \
              --style 'programmable/script :script #p"export-video-as-pngs.lisp"' \

    This will generate a PNG file for each recorded video frame with the timestamp of the respective event encoded as the filename.


    The export-video-as-pngs.lisp script is part of the RSBag distribution. Details where these scripts can be found were given under Preparation.


    When the log file has additional channels which are not relevant for the image export, the --channel option can be used to restrict processing to the relevant channel(s).


    The export can be restricted to a specific time interval using the --start-index, --start-time, --end-index and --end-time options.

  2. The bag-cat process will terminate once all events have been processed.