VistaIOImage(3)
๐ NAME ๐
VistaIOImage โ the image representation, bestie. That's the whole assignment โจ
๐ฆ SYNOPSIS ๐ฆ
#include <vistaio.h>
VistaIOImage image;
๐ธ DESCRIPTION ๐ธ
๐ Introduction ๐
ok so picture this: Vista stores an image as one or more two-dimensional arrays of pixel values. Each one of those 2-D arrays is called a band, and every band in a given image has the same size โ same number of rows, same number of columns, no exceptions ๐
Why would you want multiple bands? so many reasons, literally:
- multiple color components ๐จ
- multiple frames of a motion sequence ๐ฌ
- the real and imaginary components of a complex image ๐ง
- or honestly some combination of all of the above ๐
And it's not just pixels โ an image can also carry an arbitrary list of attributes hanging off it. Extra info, no cap.
When an image is chilling in memory, you point at it with the C pointer type VistaIOImage. In data files, it goes by the type name image, and in memory it's identified by the VistaIORepnKind code VistaIOImageRepn. Because it's a standard object type with built-in support in the Vista library, images can be:
- read from data files
- written to data files
- manipulated as part of attribute lists by routines like
VistaIOReadFile(3),VistaIOWriteFile(3), andVistaIOGetAttr(3)
it's giving full citizenship in the object ecosystem fr fr ๐
๐ Creating and Destroying Images ๐
These are the routines that bring images into existence and then let them go. very main character energy ๐ซถ
VistaIOImage VistaIOCreateImage (int nbands, int nrows, int ncolumns, VistaIOPixelRepn pixel_repn)
VistaIOCreateImage allocates memory for a brand new image with the numbers of bands, rows, and columns you specify. Heads up though:
its pixel values are not initialized ๐ญ and it's handed an empty attribute list.
The pixel_repn argument gets explained down below under ``Pixel Representation''. (Peep VistaIOCreateImage(3) for the full details.)
void VistaIODestroyImage (VistaIOImage image)
VistaIODestroyImage releases the memory that image is occupying โ and yes, that includes the memory used by its pixel data and its attribute list. clean sweep ๐งน
๐ Image Size ๐
An image's numbers of bands, rows, and columns get abbreviated as nbands, nrows, and ncolumns. These macros are how you get at those numbers:
int VistaIOImageNBands (VistaIOImage image)int VistaIOImageNRows (VistaIOImage image)int VistaIOImageNColumns (VistaIOImage image)
VistaIOImageNBands, VistaIOImageNRows, and VistaIOImageNColumns return the number of bands, rows, and columns that image has. one each, no overlap ๐
int VistaIOImageNPixels (VistaIOImage image)
VistaIOImageNPixels returns the total number of pixel values image has altogether โ like, the whole entire count. That's the product nbands * nrows * ncolumns. math ate ๐
๐จ Pixel Representation ๐จ
An image's pixel values can be any one of these types:
VistaIOBit, VistaIOUByte, VistaIOSByte, VistaIOShort, VistaIOLong, VistaIOFloat, or VistaIODouble
And listen โ variables that are meant to hold pixel values, or pointers to pixel values, should be defined using these same types rather than built-in C types such as short and long. That's the portability move, bestie. don't skip it ๐ซถ
These macros hand you the tea about an image's pixel representation:
VistaIORepnKind VistaIOPixelRepn (VistaIOImage image)
VistaIOPixelRepn returns a code indicating image's pixel representation. If image has VistaIOBit pixels, for example, it returns VistaIOBitRepn.
size_t VistaIOPixelSize (VistaIOImage image)
VistaIOPixelSize returns the size, in bytes, used for storing a single pixel of image โ meaning one pixel within a single band, row, and column. This value depends on machine architecture, so don't go assuming ๐
int VistaIOPixelPrecision (VistaIOImage image)
VistaIOPixelPrecision returns the minimum size, in bits, needed to represent a single pixel of image. This one does not depend on machine architecture โ it only depends on the kind of pixel value representation image uses. If image has VistaIOBit pixels, for example, this macro returns 1. โจ
VistaIOStringConst VistaIOPixelRepnName (VistaIOImage image)
VistaIOPixelRepnName returns a string describing the type of pixel value representation used by image. For example, if image has VistaIOBit pixels, the string ``bit'' is returned.
VistaIODouble VistaIOPixelMaxValue (VistaIOImage image)
VistaIOPixelMaxValue returns the maximum value a pixel of image may have. For example, if image has VistaIOSByte pixels, it returns 127.0.
VistaIODouble VistaIOPixelMinValue (VistaIOImage image)
VistaIOPixelMinValue returns the minimum value a pixel of image may have. For example, if image has VistaIOSByte pixels, it returns -128.0.
size_t VistaIOImageSize (VistaIOImage image)
VistaIOImageSize returns the size, in bytes, of image's block of pixel data โ the whole thing, holding the values of every pixel in every band. This value depends on machine architecture. ๐
๐ฆ Pixel VistaIOalues ๐ฆ
A particular pixel value gets indexed by a band number, a row number, and a column number. Bands, rows, and columns are all numbered consecutively from zero. Rows number down and columns number to the right, which means row 0, column 0 sits at the upper-left corner of the image. ๐บ๏ธ
type VistaIOPixel (VistaIOImage image, int band, int row, int column, type)
VistaIOPixel accesses the pixel at a specified band, row and column in an image whose pixels are of a specified type. That pixel type, type, has to be one of VistaIOBit, VistaIOUByte, VistaIOSByte, VistaIOShort, VistaIOLong, VistaIOFloat, or VistaIODouble. The macro can be used either as an rvalue (to fetch the pixel's value) or as an lvalue (to modify it or obtain its address). The ``EXAMPLES'' section, further down, shows it off as an rvalue. ๐
VistaIOPointer VistaIOPixelPtr (VistaIOImage image, int band, int row, int column)
VistaIOPixelPtr returns the address of a pixel specified by its band, row, and column coordinates. You can fetch or modify the pixel at that address by first coercing the pointer to the appropriate type for the pixel. Like so:
pixel = VistaIOPixelPtr (image, band, row, column);
if (VistaIOPixelRepn (image) == VistaIOBitRepn)
* (VistaIOBit *) pixel = new_value;
else ...
type ** VistaIOPixelArray (VistaIOImage image, type)
VistaIOPixelArray returns a pointer you can use to access any image pixel by indexing it first with the pixel's band number, then its row number, and then its column number. Example time:
VistaIOUByte **pixels = VistaIOPixelArray (image, VistaIOUByte);
pixels[band][row][column] = new_value;
VistaIOPointer VistaIOImageData (VistaIOImage image)
VistaIOImageData returns a pointer to image's block of pixel data. That block has the size VistaIOImageSize (image) bytes. ๐ง
๐ Other Image Attributes ๐
On top of its pixel values, an image may have any number of other attributes, and they're represented as an attribute list.
VistaIOAttrList VistaIOImageAttrList (VistaIOImage image)
VistaIOImageAttrList is a macro for accessing the attribute list associated with an image. You can use it as an rvalue to reach attributes inside the list:
VistaIOGetAttr (VistaIOImageAttrList (image), VistaIONameAttr, ...)
or as an lvalue to mess with the entire list:
VistaIODestroyAttrList (VistaIOImageAttrList (image));
VistaIOImageAttrList (image) = VistaIOCopyAttrList (other_list);
๐ Band Interpretation ๐
The bands of a multi-band image might represent the successive frames of a motion sequence, the left and right halves of a stereo pair, or the red, green, and blue channels of a color image. They might even represent a combination of such dimensions โ for example, a stereo pair of color images. iconic honestly ๐ฌ
Because there are so many different ways people might want to use the bands, every image carries information describing how its bands should be interpreted. This info assigns each band an interpretation in terms of four dimensions:
frameโ covers the various frames of a motion sequenceviewpointโ covers, for example, the left and right channels of a stereo paircolorโ covers, for example, the red, green, and blue channels of a color imagecomponentโ covers, for example, the real and imaginary components of a complex image
Now, these four dimensions do not account for every conceivable way you might want to use the bands of a multi-band image โ let's be real โ but they do cover most cases. And the scheme can usually be adapted to cover cases it doesn't explicitly handle. For example, a collection of images obtained under various lighting conditions could be represented by using the frame dimension to index the lighting condition. see? adaptable ๐ก
Each image specifies the sizes of its four band interpretation dimensions. For a stereo pair of color images, for example, the size of the viewpoint dimension is two, the size of the color dimension is three, and the remaining dimensions have sizes of one. Those dimension sizes are often abbreviated as nframes, nviewpoints, ncolors, and ncomponents. Their product should always equal the number of bands in the image. no cap. ๐ฅ
These macros exist for accessing the sizes:
int VistaIOImageNFrames (VistaIOImage image)int VistaIOImageNViewpoints (VistaIOImage image)int VistaIOImageNColors (VistaIOImage image)int VistaIOImageNComponents (VistaIOImage image)
Each macro may be used as an rvalue to obtain the size of a dimension, or as an lvalue to set it. ๐
The four dimensions get mapped onto the single dimension, band, according to a particular ordering: component varies most rapidly, then color, then viewpoint, and finally frame. There's a macro for computing this mapping:
int VistaIOBandIndex (VistaIOImage image, int frame, int viewpoint, int color, int component)
VistaIOBandIndex returns the index of the band that corresponds to a particular combination of frame, viewpoint, channel, and component indices. ๐ฏ
An image's attribute list may include attributes indicating how the image employs the four band interpretation dimensions. One attribute for each dimension provides the first level of description. Its value is an integer code, with some standard codes defined for common uses. Below is a list of the four attributes and their standard values. Shown in are both the symbolic constants that can be used C programs to refer to the integer values, and (in parentheses) the keywords used to represent the values externally, in Vista data files.
frame_interp, which currently has no standard values defined for itVistaIOBandInterpStereoPair(stereo_pair) โ the two viewpoints are, respectively, the left and right images of a stereo pair. Stereo vision, we love to see it. ๐ซถ
And color_interp? It's got these standard values:
VistaIOBandInterpRGB(rgb) โ the three colors are (respectively) the red, green, and blue color channels. The classic. ๐
Then component_interp, with these standard values:
VistaIOBandInterpComplex(complex) โ the two components are (respectively) the real and imaginary components of a complex image. โจVistaIOBandInterpGradient(gradient) โ either there's a single component representing gradient magnitude, or two components representing (respectively) the x (rightward) and y (upward) components of the gradient, or three representing the x, y, and z (forward in band sequence) components of the gradient. Pick your fighter. ๐VistaIOBandInterpIntensity(intensity) โ a single component representing image intensity. For integer pixel representations, pixel values normally span the range between zero and the maximum representable pixel values (e.g.,[0,127]forVistaIOSBytepixels). For floating point pixel representations, pixel values normally span the range[-1,+1]. ๐VistaIOBandInterpOrientation(orientation) โ a single component representing orientation. Pixel values express orientation in radians, counterclockwise from the direction of increasing column number (rightward). ๐งญ
Okay so to stop yourself from accidentally misspelling these attribute names (it happens to the best of us ๐ญ), use these symbolic constants:
#define VistaIOFrameInterpAttr "frame_interp"
#define VistaIOViewpointInterpAttr "viewpoint_interp"
#define VistaIOColorInterpAttr "color_interp"
#define VistaIOComponentInterpAttr "component_interp"
And there's a dictionary, VistaIOBandInterpDict, that defines the mapping between the band interpretation codes (like VistaIOBandInterpComplex) and their keywords (like complex):
VistaIODictEntry VistaIOBandInterpDict[];
For each of those four band interpretation dimensions, there's a routine you can use to simultaneously check both the dimension's size and, if present, its interpretation attribute. The VistaIOBandInterp(3) man page walks you through all four routines. ๐
๐ฆ Pixel Aspect Ratio ๐ฆ
Pixel aspect ratio is defined as the ratio of pixel width to pixel height. An image can have, on its attribute list, an attribute specifying that ratio as a floating point value. The attribute's name is pixel_aspect_ratio, and there's a symbolic constant for referring to it:
#define VistaIOPixelAspectRatioAttr "pixel_aspect_ratio"
When that attribute isn't there, a pixel aspect ratio of 1.0 is assumed. ๐
๐ธ Calling Conventions ๐ธ
A Vista library routine that processes one image to produce another usually takes three or more arguments, like this:
VistaIOImage VistaIOProcessImage (VistaIOImage src,
VistaIOImage dest, VistaIOBand band)
The first argument is the source image to be processed. The second is the destination image, which is gonna hold the result. You generally have three choices for how that destination image gets provided:
- you can have the routine create a destination image. If you pass
NULLfor dest, the routine creates and returns a destination image that's appropriate for the source image and for the type of operation being performed on it:
dest = VistaIOProcessImage (src, NULL, band);
- you can supply a destination image yourself, as long as it has the correct properties (usually an appropriate size and pixel representation):
dest = VistaIOCreateImageLike (src);
VistaIOProcessImage (src, dest, band);
- you can specify the same image as both source and destination, in which case the source pixel values get replaced by destination pixel values. This choice is only available for operations where the source and destination images have the same size and pixel representation.
VistaIOProcessImage (src, src, band);
In all cases, the routine returns the destination image if it's successful, and NULL otherwise. And if NULL is returned, the routine has already called VistaIOWarning(3) to issue a warning message describing the problem. ๐ญ
The third argument to most image processing routines, band, may specify a particular band of the source image to be processed; or it may be the constant VistaIOAllBands (defined as -1) to say that all bands of the source image are to be processed. When a particular band is specified, band must be at least 0 and less than the number of bands in the source image; the destination image will usually have a single band to contain the result. When VistaIOAllBands is specified, the destination image will usually have the same number of bands as the source image. โจ
Normally a routine copies the source image's attribute list to the destination image, replacing any attributes the destination image already had. The sizes of the four band interpretation dimensions (nframes, nviewpoints, etc.) are copied too. When appropriate, though, a routine may delete or modify the attributes and dimensional sizes as it copies them from source to destination. For example, a routine that converts an RGB color image to a grey-scale one (VistaIORGBImageToGray(3)) expects a source image with the properties ncolors: 3 and color_interp: rgb; the destination image it produces has ncolors: 1 and no color_interp attribute. ๐
๐ Image Representation in Memory ๐
typedef struct {
int nbands; /* number of bands */
int nrows; /* number of rows */
int ncolumns; /* number of columns */
VistaIORepnKind pixel_repn;/* representation of pixel values */
unsigned long flags; /* various flags */
VistaIOAttrList attributes;/* list of other image attributes */
VistaIOPointer data; /* array of image pixel values */
VistaIOPointer *row_index;/* ptr to first pixel of each row */
VistaIOPointer *band_index;/* ptr to first row of each band */
int nframes; /* number of motion frames */
int nviewpoints; /* number of camera viewpoints */
int ncolors; /* number of color channels */
int ncomponents; /* number of vector components */
} VistaIOImageRec, *VistaIOImage;
An image is represented in memory by a value of type VistaIOImage, which points to a VistaIOImageRec structure. If you're programming with images you usually won't need to access this structure's fields directly, because there are Vista library routines and macros available for basically every purpose. But when you're debugging, you might occasionally need to examine a VistaIOImageRec structure's fields directly. The next few paragraphs describe those fields. ๐
The nbands, nrows, and ncolumns fields of the structure describe how many bands, rows, and columns the image has. Its pixel_repn field specifies how the image's pixel values are represented; it contains one of the constants VistaIOBitRepn, VistaIOUByteRepn, VistaIOSByteRepn, VistaIOShortRepn, VistaIOLongRepn, VistaIOFloatRepn, or VistaIODoubleRepn. Its attributes field contains the list of attributes associated with the image. ๐
An image's pixel values are stored in a contiguous block of memory where they're arranged like this: within each band, pixel values are ordered beginning with the pixel at row 0, column 0, proceeding to row 0, column 1, etc., and ending with the highest numbered row and column. Each band's array of pixel values occupies a separate block of memory, and these blocks are arranged contiguously. All of band 0's pixel values come first, followed by all of band 1's, etc. So in summary, pixel values are ordered by band, then by row within each band, and then by column. The pixel values themselves are of type VistaIOBit, VistaIOUByte, ..., or VistaIODouble. ๐
The data field of a VistaIOImageRec points to the block of memory containing pixel values. The row_index field points to a vector of pointers to the first pixel value of each row within each band; that vector is of length (nbands * nrows) and it's indexed by an expression of the form (band * nrows + row). The band_index field points to a vector of pointers to the first row_index entry of each band; this vector is of length nbands and it's indexed by band number. ๐ง
Individual bits of a VistaIOImageRec's flags field are used to denote various things. One bit is currently defined:
VistaIOImageSingleAllocโ this bit, if nonzero, indicates that theVistaIOImageRec, the block of pixel values, the row index, and the band index were all obtained with a single call toVistaIOMalloc(3). If the bit is zero, these things were allocated separately and therefore they must be released separately. ๐
The nframes, nviewpoints, ncolors, and ncomponents fields describe the number of motion frames, camera positions, color channels, and vector components that the image's various bands represent. Together they should account for all bands of the image โ i.e., their product should equal nbands. The image's bands are ordered according to these fields, with the component index incrementing most rapidly and the frame index incrementing least rapidly. โญ
๐ Image Representation in a File ๐
attribute-name: image {
nbands: nbands
nrows: nrows
ncolumns: ncolumns
repn: pixel-representation
nframes: nframes
nviewpoints: nviewpoints
ncolors: ncolors
ncomponents: ncomponents
data: data-offset
length: data-length
other attributes
}
pixel-representation ::=
bit | ubyte | sbyte | short | long | float | double
An image is represented in a Vista data file as an attribute. The attribute's value is an object of type image containing the following attributes, in any order:
nbandsโ an integer-valued attribute specifying the number of bands in the image.nrowsโ an integer-valued attribute specifying the number of rows in the image.ncolumnsโ an integer-valued attribute specifying the number of columns in the image.repnโ a string-valued attribute, and it's the one that spills the tea on your image's pixel value representation. It's gotta be one of these keywords:bit,ubyte,sbyte,short,long,float, ordouble. โจnframesโ integer-valued, telling you how many motion frames the image's bands are representing. cinematic vibes fr ๐ฌnviewpointsโ integer-valued, the number of camera viewpoints the image's bands represent. main character angles only ๐ncolorsโ integer-valued, how many color channels the image's bands represent. ๐ncomponentsโ integer-valued, the number of vector components the image's bands represent.dataโ integer-valued, giving you the offset of the image's pixel data within the binary data section of the file. it's literally just "where do the pixels start" ๐ซถlengthโ integer-valued, the size, in bytes, of the image's pixel data. the pixel data's whole entire size, no cap.
An nbands, nframes, nviewpoints, ncolors, or ncomponents attribute may be omitted if its value is 1 โ so if it's just one, you can ghost it entirely, bestie. ๐
Moreover, the image object's attribute list may contain any other attributes associated with the image. See, for example, the data file listed under EXAMPLES, below. ๐
๐ฆ Pixel Representation in a File ๐ฆ
Image pixel values are represented in binary form in the binary data section of a file. They occupy a contiguous block in which pixel values are ordered by band, row, and column โ same order as in memory. so organized. so slay. ๐
Single-bit pixel values are packed eight to a byte, beginning with the most-significant bit of each byte. Pixel values of more than 8 bits are packed into multiple bytes, beginning with the most-significant byte of the pixel value. Consecutive pixel values are packed together, without intervening bits for padding or alignment. If necessary, however, the entire block of pixel values is padded so that its length is a multiple of 8 bits. no gaps, no awkward pauses, just pixels stacked together like a group photo. ๐ธ
Each kind of pixel is represented as follows in the Vista data file:
VistaIOBitโ as a 1-bit unsigned integerVistaIOUByteโ as an 8-bit unsigned integerVistaIOSByteโ as an 8-bit two's-complement integerVistaIOShortโ as a 16-bit two's-complement integerVistaIOLongโ as a 32-bit two's-complement integerVistaIOFloatโ as a 32-bit IEEE floating-point numberVistaIODoubleโ as a 64-bit IEEE floating point number
Note that a pixel's representation in a Vista data file is independent of the form it takes when stored in memory on any particular machine. Thus a VistaIOBit pixel may occupy 8 bits in the main memory of a Sun SPARCstation 32 bits on a Cray machine, but it always occupies a single bit in a Vista data file. ๐
like... your machine's memory is a whole different situation and that's fine, that's her business. but in the file, one bit is one bit. periodt. ๐
๐ธ EXAMPLES ๐ธ
This code fragment sets all pixels with 1 in a one-band image of single-bit pixels:
for (i = 0; i < VistaIOImageNRows (image); i++)
for (j = 0; j < VistaIOImageNColumns (image); j++)
VistaIOPixel (image, 0, i, j, VistaIOBit) = 1;
The previous example may be made more efficient by avoiding the repeated computation of pixel addresses โ glow-up edition, literally just caching the pointer once:
VistaIOBit *p = & VistaIOPixel (image, 0, 0, 0, VistaIOBit);
for (i = 0; i < VistaIOImageNPixels (image); i++)
*p++ = 1;
This code fragment creates an image of complex pixel values. it's giving imaginary numbers, and we're obsessed:
image = VistaIOCreateImage (2, 256, 256, VistaIOFloatRepn);
VistaIOImageNFrames (image) = VistaIOImageNViewpoints (image) =
VistaIOImageNColors (image) = 1;
VistaIOImageNComponents (image) = 2;
VistaIOSetAttr (VistaIOImageAttrList (image),
VistaIOComponentInterpAttr, NULL, VistaIOLongRepn,
(VistaIOLong) VistaIOBandInterpComplex);
Here is an example of a Vista data file containing two images:
V-data 2 {
one: image {
nbands: 2
nrows: 256
ncolumns: 256
ncomponents: 2
component_interp: complex
repn: float
data: offset of first image's pixel values
length: 524288
name: "UFO sighted over VistaIOancouver"
pixel_aspect_ratio: 1.25
}
two: image {
nrows: 32
ncolumns: 32
repn: ubyte
data: offset of second image's pixel values
length: 128
name: "UFO icon"
}
}
^L
first image's pixel values
second image's pixel values
๐ SEE ALSO ๐
๐ AUTHOR ๐
Art Pope <pope@cs.ubc.ca>
Adaption to vistaio: Gert Wollny <gw.fossdev@gmail.com>
โจ LIST OF ROUTINES โจ
Okay bestie, gather round ๐. This is the master list of every Vista library routine that operates on images. The original calls it a table โ we're doing cute bullets, same energy. Many of these routines are documented elsewhere, by a section 3 man page named for the routine. So if you want the full deep dive, go find that page. This is the group chat recap. ๐ซถ
๐ For creating and destroying images in memory ๐
VistaIOCreateImageโ creates an image. โจVistaIOCreateImageLikeโ creates one image just like another. twin energy ๐ฏVistaIODestroyImageโ releases the memory an image was occupying. bye bye ๐
๐ For fetching and storing pixel values ๐
VistaIOGetPixelโ fetches a pixel value with any pixel representation. ๐VistaIOSetPixelโ stores a pixel value with any pixel representation. ๐พVistaIOSelectBandโ selects bands of image pixels for processing. ๐๏ธVistaIOSelectDestIamgeโ selects a destination for an image processing operation. ๐ฏ
๐ For getting band interpretation information ๐
VistaIOImageFrameInterpโ reports the meaning of the frame dimension. ๐ผ๏ธVistaIOImageColorInterpโ reports the meaning of the color dimension. ๐VistaIOImageComponentInterpโ reports the meaning of the component dimension. ๐งฉVistaIOImageViewpointInterpโ reports the meaning of the viewpoint dimension. ๐๏ธ
๐ For reading and writing images ๐
VistaIOReadImagesโ reads a set of images from a data file. ๐VistaIOReadPlainโ reads an image in Vista plain file format. ๐VistaIOReadPnmโ reads an image in Portable Anymap (PNM) format. ๐ผ๏ธVistaIOReadUbcIffโ reads an image in UBC image file format. ๐๏ธVistaIOWriteImagesโ writes a set of images to a data file. ๐ฝVistaIOWriteUbcIffโ writes an image in UBC image file format. โ๏ธ
๐ For comparing images ๐
VistaIOSameImageRangeโ tests whether two images have the same size and pixel representation. ๐VistaIOSameImageSizeโ tests whether two images have the same size. ๐
๐ For copying images ๐
VistaIOCombineBandsโ copies selected bands of pixel values from various source images to a single destination image. ๐งฌVistaIOCopyBandโ copies one or all bands of pixel values from one image to another. ๐ตVistaIOCopyImageโ copies one image to another. ๐VistaIOCopyImageAttrsโ copies one image's attributes to another. ๐ท๏ธVistaIOCopyImagePixelsโ copies one image's pixel values to another. ๐ข
๐ For converting an image's pixel representation ๐
VistaIOConvertImageCopyโ converts an image's pixel representation while simply copying pixel values. ๐VistaIOConvertImageLinearโ converts an image's pixel representation using some linear mapping of pixel values. ๐VistaIOConvertImageOptโ converts an image's pixel representation while mapping the actual range of source pixel values to the full range of possible destination pixel values. ๐ฏVistaIOConvertImageRangeโ converts an image's pixel representation while mapping the full range of possible source pixel values to the full range of possible destination pixel values. ๐
๐ For rotating or transposing an image ๐
VistaIOFlipImageโ flips an image horizontally or vertically. ๐VistaIORotateImageโ rotates an image by any angle. ๐VistaIOTransposeImageโ transposes the rows and columns of an image. ๐
๐ For changing the size of an image ๐
VistaIOCropImageโ extracts a rectangular region from an image. โ๏ธVistaIOExpandImageโ increases the size of an image by an integer factor. ๐VistaIOReduceImageโ decreases the size of an image by an integer factor. ๐VistaIOScaleImageโ scales the size of an image, up or down, by any factor. ๐
๐ For filtering and transforming images ๐
VistaIOAdjustImageโ adjusts image brightness and/or contrast. โ๏ธVistaIOCannyโ detects edges in an image using a Canny operator. ๐ต๏ธVistaIOConvolveImageโ convolves an image with a mask. ๐ญVistaIOGaussianConvolveImageโ convolves an image with a Gaussian filter or its derivative. ๐ซ๏ธVistaIOImageFFTโ computes a forward or inverse Fourier transform. ๐VistaIOImageGradientโ computes the horizontal and vertical components of image gradient. ๐VistaIOImageOpโ performs an arithmetic or logical operation on an image's pixel values. โVistaIOInvertImageโ inverts an image's pixel values, swapping black and white. โซโชVistaIOLinkImageโ creates an edge set by linking connected, non-zero image pixels. ๐VistaIONegateImageโ negates an image's pixel values. โVistaIOZeroCrossingsโ marks the zero crossings in an image. 0๏ธโฃ
๐ For computing image statistics ๐
VistaIOImageStatsโ computes the minimum, maximum, mean, and variance of an image's pixel values. ๐
๐ For working with complex images ๐
VistaIOBuildComplexImageโ builds a complex image from separate images of real and imaginary components. ๐งVistaIOImageMagnitudeโ computes the magnitude of a complex image. ๐VistaIOImagePhaseโ computes the phase of a complex image, or the gradient direction of a two-component gradient image. ๐
๐ For displaying or rendering images ๐
VistaIOImageBandToPSโ renders an image band using PostScript. ๐จ๏ธVistaIORGBImageToPSโ renders an RGB color image using PostScript. ๐VistaIOImageViewโ an X Toolkit widget for displaying an image. ๐ชVistaIOImageWindowSizeโ computes appropriate window dimensions for displaying an image. ๐
๐ For filling images with patterns ๐
VistaIOFillImageโ fills an image with a constant pixel value. ๐ชฃVistaIORampImageโ fills an image with an intensity ramp. ๐VistaIOSineGratingImageโ fills an image with a sine grating. ๐VistaIOZonePlateImageโ fills an image with a zone plate pattern. ๐ฏVistaIOBilinearNoiseImageโ fills an image with a random mixture of two pixel values. ๐ฒVistaIONormalNoiseImageโ fills an image with pixel values drawn from a normal distribution. ๐VistaIOUniformNoiseImageโ fills an image with pixel values drawn from a uniform distribution. ๐ฒ
๐ฆ Miscellaneous ๐ฆ
VistaIOOptFlowWLSโ compute optical flow by weighted least squares. ๐งฎ
That's the whole lineup, bestie! This page is from VistaIO Version 1.2.14, dated 12 April 1994, and it's the VistaIOImage(3) man page. Now go make those pixels behave. ๐ ๐ฆ
๐ฆ where this page comes from
- debian bookworm: libvistaio-dev 1.2.19-3 ยท libvista-orig
- debian trixie: libvistaio-dev 1.2.19-3+b2 ยท libvista-orig
- ubuntu jammy: libvistaio-dev 1.2.19-3 ยท libvista-orig
- ubuntu noble: libvistaio-dev 1.2.19-3 ยท libvista-orig
- ubuntu questing: libvistaio-dev 1.2.19-4
- ubuntu resolute: libvistaio-dev 1.2.19-4build1 ยท libvista-orig
- ubuntu stonking: libvistaio-dev 1.2.19-4build1 ยท libvista-orig
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms