wiki:icp

Version 3 (modified by pborissow, 14 years ago) ( diff )

--

icp

The ossim-icp application is an image conversion tool used to copy any supported input image to any supported output image format. It can also crop by start/stop line/sample, band select and convert scalar type. If you wish to resample or reproject your data, use orthoigen instead.

The iView GUI application operates as a viewer and a way to set up parameters for icp. icp can be called from the command line or from an application - e.g. iView.

Usage

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


Valid output writer types

tiff_strip
tiff_strip_band_separate
tiff_tiled
tiff_tiled_band_separate
jpeg
general_raster_bip
general_raster_bil
general_raster_bsq
general_raster_bip_envi
general_raster_bil_envi
general_raster_bsq_envi
nitf_block_band_separate
nitf_block_band_sequential
nitf20_block_band_separate
nitf20_block_band_sequential
ossim_png
ossim_kakadu_nitf_j2k
ossim_kakadu_jp2
gdal_VRT
gdal_GTiff
gdal_NITF
gdal_HFA
gdal_ELAS
gdal_AAIGrid
gdal_DTED
gdal_PNG
gdal_JPEG
gdal_MEM
gdal_GIF
gdal_XPM
gdal_BMP
gdal_PCIDSK
gdal_PCRaster
gdal_ILWIS
gdal_SGI
gdal_SRTMHGT
gdal_Leveller
gdal_Terragen
gdal_ERS
gdal_FIT
gdal_RMF
gdal_RST
gdal_INGR
gdal_GSAG
gdal_GSBG
gdal_R
gdal_PNM
gdal_ENVI
gdal_EHdr
gdal_PAux
gdal_MFF
gdal_MFF2
gdal_BT
gdal_IDA
gdal_USGSDEM
gdal_ADRG
gdal_BLX

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
Note: See TracWiki for help on using the wiki.