wiki:icp

ossim-icp

The ossim-icp application is an image conversion tool used to translate an input image to another format (e.g. TIF to JPG). It can also be used to crop, band select and convert scalar type. If you wish to resample or reproject your data, please use orthoigen instead. You can find a complete list of supported formats here.

Usage

ossim-icp [options] <output_type> <input_file> <output_file>

Options

  --disable-elev               Will disable the elevation
  --disable-notify             Takes an argument. Arguments are ALL, WARN,
                               NOTICE, INFO, FATAL, DEBUG.  If you want multiple
                               disables then just do multiple --disable-notify
                               on the command line.  All argument are case
                               insensitive.  Default is all are enabled.
  --disable-plugin             Will disable the plugin loader
  --ossim-logfile              takes a logfile as an argument.  All output
                               messages are redirected to the specified log
                               file.  By default there is no log file and all
                               messages are enabled.
  --pixel-type                 Valid values: area or point, this will determine
                               if the tie point is upper left corner of the
                               upper left pixel (area) or the center of the
                               upper left corner (point), default=point.  NOTE:
                               This option will only affect the tiff writer.
  --writer-prop                adds a property to send to the writer. format is
                               name=value
  -K                           specify individual keywords to add to the
                               preferences keyword list: name=value
  -L or --end-line             Which end line do you wish to copy from the
                               input.  If none is given then max line is used
  -P                           specify a preference file to load
  -T                           specify the classes to trace, ex:
                               ossimInit|ossimImage.* 
                               will trace ossimInit and all ossimImage classes
  -a or --use-scalar-remapper  Uses scalar remapper, transforms to 8-bit
  -b or --bands                uses the specified bands: ex. "1, 2, 4" will
                               select bands 1 2 and 4 of the input image.  Note:
                               it is 1 based
  -c or --compression-type     Uses compression.  Currently valid for only tiff
                               output -c jpeg will use jpeg compression
  -e or --entry                For multi image handlers which entry do you wish
                               to extract
  -h or --help                 Display this information
  -l or --start-line           Which start line do you wish to copy from the
                               input. If none is given then 0 is used
  -o or --create-overview      Creates and overview for the output image
  -p or --end-sample           Which end sample do you wish to copy from the
                               input.  If none is given then max sample is used
  -q or --compression-quality  Uses compression.  Valid for jpeg type. default
                               is 75 where 100 is the best and 1 is the worst
  -r or --res-level            Which res level to extract from the input: ex -r
                               1 will get res level 1
  -s or --start-sample         Which start sample do you wish to copy from the
                               input.  If none is given then 0 is used
  -t or --create-thumbnail     Takes an argument which is the maximum pixel
                               dimension desired.
                               Create thumbnail flag is enabled
  -w or --tile-width           Defines the tile width for the handlers that
                               support tiled output


Examples

This will convert input.ntf to a tiled tiff output.tif:
ossim-icp tiff_tiled_band_separate input.ntf output.tif

Conversion to J2K currently requires either the gdal plugin with j2k support or the kakadu plugin.

Using kakadu plugin:

Note the default kakadu writer is numerically lossless. The number of reduced res sets are control by setting the preferences keyword "overview_stop_dimension". If that is not found it will use "tile_size". If that is not found it will default to five.

This will convert point.tif to a JP2 file (using default numerically_lossless).
ossim-icp ossim_kakadu_jp2 point.tif t1.jp2

This will convert point.tif to a numerically lossless jp2 file.
ossim-icp --writer-prop compression_quality=numerically_lossless ossim_kakadu_jp2 point.tif t1.jp2

This will convert point.tif to a visually lossless jp2 file.
ossim-icp --writer-prop compression_quality=visually_lossless ossim_kakadu_jp2 point.tif t2.jp2

This will convert point.tif to a lossyjp2 file.
ossim-icp --writer-prop compression_quality=lossy ossim_kakadu_jp2 point.tif t3.jp2

Actual sizes from the last three examples:

$ ls -l point.tif t1.jp2 t2.jp2 t3.jp2 
 3152350 point.tif
 1938374 t1.jp2
  437769 t2.jp2
  125399 t3.jp2
Last modified 13 years ago Last modified on Mar 3, 2011, 3:39:04 AM
Note: See TracWiki for help on using the wiki.