Table of Contents

NAME

imgtodat - converts image to dataset

SYNOPSIS

imgtodat [-ts tilesize] [-tw tilewidth] [-th tileheight] imgfile datfiles...

DESCRIPTION

imgtodat converts imgfile, an image, to DAT-format dataset files, datfiles. Two-dimensional tiles are extracted from imgfile in raster-scan order, converted to one-dimensional vectors, and written sequentially to each datfile. Option -ts specifies that square tiles of size sqrt(tilesize) x sqrt(tilesize) are extracted from imgfile and written to each datfile as vectors with dimension tilesize. The -tw and -th options are used together to specify that vectors of dimension tilewidth x tileheight are written to each datfile from rectangular tiles extracted from imgfile. Note: either -ts or -tw and -th must be given.

If the input image imgfile is a color image, imgtodat expects three output DAT files specified, datfile_Y, datfile_U, and datfile_V for the Y, U, and V components, respectively, of the image. For grayscale images, only one output DAT file is to be specified.

If the image imgfile does not have size that is a multiple of the requested tile size, then tiles are extracted from the upper-left part of the image. Leftover rows and/or columns at the bottom and right sides of the image, if any, are ignored and not output to datfile.

imgtodat calls QccIMGImageComponentToDataset(3) for each component of the image.

Note: converting from PGM or PPM images to DAT format implies converting integer pixels to floating-point values.

SEE ALSO

dattoimg(1) , QccIMGImageComponentToDataset(3) , QccPackIMG(3) , QccPack(3)

AUTHOR

Copyright (C) 1997-2021 James E. Fowler


Table of Contents



Get QccPack at SourceForge.net. Fast, secure and Free Open Source software downloads