# seqIo

## PURPOSE

Utilities for reading and writing seq files.

## SYNOPSIS

function out = seqIo( fName, action, varargin )

## DESCRIPTION

     Utilities for reading and writing seq files.

     A seq file is a series of concatentated image frames with a fixed size
     header. It is essentially the same as merging a directory of images into
     a single file. seq files are convenient for storing videos because: (1)
     no video codec is required, (2) seek is instant and exact, (3) seq files
     can be read on any operating system. The main drawback is that each frame
     is encoded independently, resulting in increased file size. The advantage
     over storing as a directory of images is that a single large file is
     created. Currently, either uncompressed, jpg or png compressed frames
     are supported. The seq file format is modeled after the Norpix seq format
     (in fact this reader can be used to read some Norpix seq files). The
     actual work of reading/writing seq files is done by seqReaderPlugin and
     seqWriterPlugin (there is no need to call those functions directly).

     seqIo contains a number of utility functions for working with seq files.
     The format for accessing the various utility functions is:
      out = seqIo( fName, 'action', inputs );
     The list of functions and help for each is given below. Also, help on
     individual subfunctions can be accessed by: "help seqIo>action".

     Create interface sr for reading seq files.
       sr = seqIo( fName, 'reader', [cache] )
     Create interface sw for writing seq files.
       sw = seqIo( fName, 'writer', info )
     Get info about seq file.
       info = seqIo( fName, 'getInfo' )
     Crop sub-sequence from seq file.
       seqIo( fName, 'crop', tName, frames )
     Extract images from seq file to target directory.
       seqIo( fName, 'toImgs', tDir, [skip], [f0], [f1] )
     Make seq file from images in an array or source directory.
       seqIo( fName, 'frImgs', info, varargin )
     Convert seq file by applying imgFun(I) to each frame I.
       seqIo( fName, 'convert', tName, imgFun, [info] )
     Replace header of seq file with provided info.
       seqIo( fName, 'newHeader', info )
     Create interface sr for reading dual seq files.
       sr = seqIo( fNames, 'readerDual', [cache] )

     USAGE
      out = seqIo( fName, action, varargin )

     INPUTS
      fName      - seq file to open
      action     - controls action (see above)
      varargin   - additional inputs (see above)

     OUTPUTS
      out       - depends on action (see above)

     EXAMPLE

     See also seqIo>reader, seqIo>writer, seqIo>getInfo, seqIo>crop,
     seqIo>toImgs, seqIo>frImgs, seqIo>convert, seqIo>newHeader,
     seqIo>readerDual, seqPlayer, seqReaderPlugin, seqWriterPlugin

     Piotr's Image&Video Toolbox      Version 2.51
     Copyright 2010 Piotr Dollar.  [pdollar-at-caltech.edu]
     Please email me if you find bugs, or have suggestions or questions!
     Licensed under the Lesser GPL [see external/lgpl.txt]

## CROSS-REFERENCE INFORMATION

This function calls:

- seqReaderPlugin Plugin for seqIo and videoIO to allow reading of seq files.
- seqWriterPlugin Plugin for seqIo and videoIO to allow writing of seq files.
- getPrmDflt Helper to set default values (if not already set) of parameter struct.
- int2str2 Convert integer to string of given length; improved version of int2str.
- ticStatus Used to display the progress of a long process.
- tocStatus Used to display the progress of a long process.

This function is called by:

- seqPlayer Simple GUI to play seq files.