# 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 or array.
       Is = seqIo( fName, 'toImgs', [tDir], [skip], [f0], [f1], [ext] )
     Create seq file from an array or directory of images or from an AVI file.
       seqIo( fName, 'frImgs', info, varargin )
     Convert seq file by applying imgFun(I) to each frame I.
       seqIo( fName, 'convert', tName, imgFun, varargin )
     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.61
     Copyright 2012 Piotr Dollar.  [pdollar-at-caltech.edu]
     Please email me if you find bugs, or have suggestions or questions!
     Licensed under the Simplified BSD License [see external/bsd.txt]