SIFT(1)                   BSD General Commands Manual                  SIFT(1)

NAME
     sift -- Scale Invariant Feature Transform

SYNOPSIS
     sift [-vhb] [-o filename] [-k filename] [-p prefix] [-S number]
          [-O number] [-t number] [-e number] [--save-gss] [--no-descriptors]
          [--no-orientations] [--stable-order] file.pgm ...

OPTIONS
     --verbose, -v
                 Be verbose.

     --help, -h  Print a summary of options.

     --output outfile, -o outfile
                 Wirte the keypoints to outfile.

     --prefix prefix, -p prefix
                 Derive the output filename prefixing prefix to the input
                 filename.

     --binary, -b
                 Write the descriptors to a binary file. The name of this file
                 is derived from the output filename by removing the `.key'
                 suffix and adding the `.desc' suffix.

     --keypoints filename, -k filename
                 Instead of running the SIFT detector, read the keypoints from
                 filename (but still compute the descriptors).

     --save-gss  Save the layers of the Gaussian scale space. This produces a
                 is derived from the output filename by removing the `.pgm'
                 suffix, and adding the index of the level and the `.pgm' suf-
                 fix.

     --octaves number, -O number
                 Set the number of octave to number. If not specified, this
                 value is automatically computed to span all possible octaves.

     --levels number, -S number
                 Set the number of levels per octave to number. The default
                 value is 3.

     --first-octave number
                 Set the index of the first octave of the pyramid to number.
                 The default value is -1.

     --threshold number, -t number
                 Set the SIFT detector threshold to number.

     --edge-threshold number, -e number
                 Se the SIFT detector edge rejection threshold to number.

     --no-descriptors
                 Do not compute nor wirte to the output file the descriptors.

     --no-orientations
                 Set implicitly the orientation of all keypoints to zero.

     --stable-order
                 Preserve the order of keypoints read from a file.

OVERVIEW
     sift computes D. Lowe's Scale Invariant Feature Transfroms (SIFT). The
     program can be used to process either a single image or several images in
     a batch.  It is possible to customize the most important parameters of
     the algorithm and to generate descriptors for keypoints computed exter-
     nally.

     In the most simple form sift takes an image in PGM format and computes
     its SIFT keypoints and the relative descriptors, producing a `.key' text
     file. This file has one line per keypoint, with the x and y coordiantes
     (pixels), the scale (pixels), the orientation (radians) and 128 numbers
     (in the range 0-255) representing the descriptor. This file is almost
     equivalent to the output of D. Lowe's original implementation, except
     that x and y are swapped and the orientation is negated.

     The SIFT algorithm is based on a Gaussian pyrmaid of the input image. To
     change the number of octaves, the index of the first octave and the num-
     ber of levels per octave of the pyramid use the options --octaves,
     --first-octave and --levels respectively. Note that setting
     --first-octave to -1, -2, ... will cause the base of the pyramid to be
     two, three, ... times larger than the input image.

     In order to select reliable keypoints, SIFT rejects extrema of the Gaus-
     sian scale space which are smaller than a threshold specified by
     --threshold.  It also rejects keypoints that have an on-edge score below
     another threshold specified by --edge-threshold.

     By default, the name of the ouptut file is obtained by removing the
     `.pgm' suffix from the input name (if any) and then appending the `.key'
     suffix. The option --output name changes this behaviro and just uses the
     name name instead.  name works when processing single images. When
     processing batches, use the --prefix prefix options, which constructs the
     name of the output file by prepending the prefix prefix to the base name
     of the input file, and then substituting `.pgm' with `.key' as before.
     Note that, since prefix is added verbatim, if prefix is a directory, one
     should specify explicitly the trailing file separator `/'.

     Descriptors can take a lot of disk space. This problem can be alleviated
     by means of the --binary option, which writes (only) the descriptors to a
     separate binary file.  The name of this file is obtained by removing the
     suffix `.key' from the name of the keypoint output file (if any), and
     then appending the suffix `.desc' to the result. Descriptors are written
     in the same order of the keypoints, with each component taking exactly
     one byte.

     Sometimes one wants to compute the descriptors of keypoints generated
     externally. This can be done by the --keypoints file.key option, which
     reads the keypoints from the file file.key.  This file has the same for-
     mat of the keypoint output files produced by sift, with one keypoint per
     line. Note that, even when this option is used, keypoints are always
     written to the output file along with the descriptors. Normally keypoints
     are re-oder by scale before computing the descriptor, as this speeds up
     the calculation. Reordering can be prevented by means of the switch
     --stalbe-oder.  If this option is used, it is reccomended to provide a
     list of keypoints already ordered by scale.

EXAMPLES
        Read the image `image.pgm' and write keypoints and descriptors to
         `image.key':
               > sift image.pgm

        Same as above, but use null thresholds
               > sift -t 0 -e 0 image.pgm

        Same as above, but do not double the resolution of the image as part
         of the computation of the Gaussian scale space:
               > sift --first-octave 0 image.pgm

        Read the image `image.pgm' and write the keypoints to `image.key' and
         the descriptor in binary format to `image.desc':
               > sift -b image.pgm

        Read the images `image1.pgm' andq `image2.pgm' and write the key-
         points and descriptors to `/tmp/image1.key' and `/tmp/image2.key':
               > sift -p /tmp/ image1.pgm image2.pgm

        Read the image `image.pgm' and the keypoints `image.key' and write
         keypoints and descriptors to `/tmp/image.key':
               > sift -p /tmp/ -k image.key image.pgm

        Same as above, but writes the descriptors in binary format to
         `/tmp/image.desc':
               > sift -b -p /tmp/ -k image.key image.pgm

SEE ALSO
     convert(1),

BSD                             August 22, 2006                            BSD