Overview of Masks and Image Statistics
Mathematical operations used with images include logic (conditional) operations and statistics. Logic operations are used to make masks to apply threshold levels to clip the pixel values of an image, and to locate pixel values. These operations help to segment features in an image, after which statistics can be derived to provide a means of comparison.
Masks are used to isolate specific features. A mask is a binary image, made by using relational operators. A binary mask is multiplied by the original image to omit specific areas. For more information, see Masking Images.
Threshold levels can be applied to an image to clip the pixel values to a floor or a ceiling. Clipping enhances specific features, and is applied through minimum and maximum operators. After the resulting images are byte-scaled, the specific features remain while the other areas become part of the background. For more information, see Clipping Images.
Locating pixel values is another way to segment specific features. Mathematical expressions are used to determine the location of pixels with particular values within the two-dimensional array representing the image. For more information, see Locating Pixel Values in an Image.
When specific features have been segmented, image statistics (such as total, mean, standard deviation, and variance) can be derived to quantify and compare them. For more information, see Calculating Image Statistics.
Note
In this book, Direct Graphics examples are provided by default. Object Graphics examples are provided in cases where significantly different methods are required.
The following list introduces image math operations and associated IDL math operators and routines covered in this chapter.
Note
This chapter uses data files from the IDL examples/data and examples/demo/demodata directories. Two files, data.txt and index.txt, contain descriptions of the files, including array sizes.