INTR2NOT

Name

intr2not -- converts an image comprised of pixels with interleaved color components to an image with non-interleaved component planes.

Synopsis

intr2not <outext><imagefile> [ -raw_in w,h,d, [ppi] [-YCbCr H0,V0:H1,V1:H2,V2]]

DESCRIPTION

Intr2not takes as input an uncompressed image of pixels with interleaved color components and converts the image into non-interleaved component planes. This utility requires there be three color components in the input image. Two input file formats are possible, a NIST IHead file (the default) or a raw pixmap file (specified by the -raw_in option). The non-interleaved results are stored to a raw pixmap file regardless of the input file format, because the IHead format only supports interleaved pixels.

For example, the pixels of an RGB color image are interleaved when a pixel's R, G, and B components are sequentially adjacent in the image byte stream, ie. RGBRGBRGB... . If the color components are non-interleaved, then all (R)ed components in the image are sequentially adjacent in the image byte stream, followed by all (G)reen components, and then lastly followed by all (B)lue components. Each complete sequence of color components is called a plane. The utility not2intr converts non-interleaved to interleaved color components.

It is possible that the component planes of an input YCbCr image have been previously downsampled. If so, the -YCbCr flag must be included on the command line, listing the appropriate component plane downsampling factors. By default, this utility assumes no downsampling. (See YCbCr OPTIONS below.)

OPTIONS

All switch names may be abbreviated; for example, -raw_in may be written -r.

<outext>

the extension of the output file. To construct the output filename, intr2not takes the input filename and replaces its extension with the one specified here.

<image file>

the input file, either an IHead file or raw pixmap file, containing the color image to be converted.

-raw_in w,h,d,[ppi]

the attributes of the input image. This option must be included on the command line if the input is a raw pixmap file.

w

the pixel width of the pixmap

h

the pixel height of the pixmap

d

the pixel depth of the pixmap

ppi

the optional scan resolution of the image in integer units of pixels per inch.

-YCbCr H0,V0:H1,V1:H2,V2

indicates that a YCbCr color image is being input whose component planes have been previously downsampled. (See YCbCr Options below.)

YCbCr OPTIONS

A common compression technique for YCbCr images is to downsample the Cb & Cr component planes. Intr2not can handle a limited range of YCbCr downsampling schemes that are represented by a list of component plane factors. These factors together represent downsampling ratios relative to each other. The comma-separated list of factor pairs correspond to the Y, Cb, and Cr component planes respectively. The first value in a factor pair represents the downsampling of that particular component plane in the X-dimension, while the second represents the Y-dimension. Compression ratios for a particular component plane are calculated by dividing the maximum component factors in the list by the current component's factors. These integer factors are limited between 1 and 4. H,V factors all set to 1 represent no downsampling. For complete details, intr2not implements the downsampling and interleaving schemes described in the following reference:

W.B. Pennebaker and J.L. Mitchell, "JPEG: Still Image Compression Standard," Appendix A - "ISO DIS 10918-1 Requirements and Guidelines," Van Nostrand Reinhold, NY, 1993, pp. A1-A4.

For example the option specification:

-YCbCr 4,4:2,2:1,1

indicates that there has been no downsampling of the Y component plane (4,4 are the largest X and Y factors listed); the Cb component plane has been downsampled in X and Y by a factor of 2 (maximum factors 4 divided by current factors 2); and the Cr component plane has been downsampled in X and Y by a factor of 4 (maximum factors 4 divided by current factors 1). Note that downsampling component planes is a form of lossy compression. The utility rgb2ycc converts RGB pixmaps to the YCbCr colorspace, and it conducts downsampling of the resulting YCbCr component planes upon request.

EXAMPLES

From test/imgtools/execs/intr2not/intr2not.src:

% intr2not nin face.raw -r 768,1024,24 converts the interleaved RGB pixels of a face image in a raw pixmap file into separate color component planes.

SEE ALSO

not2intr(1D), rgb2ycc(1D)

AUTHOR

NIST/ITL/DIV894/Image Group