Binary selection mask
ID: binary-selection-mask
A binary selection mask records which pixels belong to a chosen subset of an image. On a finite pixel grid , it is the indicator functionIt can represent an area region of interest, the result of image thresholding or a combination of selection rules. The mask describes membership; its entries need not equal the underlying image intensities.
For a selected pixel count , the count and selected arithmetic mean areConsider the original arraysThe selected values are 0, 20 and 40, so and . The selected zero-valued pixel still contributes to the denominator. Replacing excluded pixels by zeros and averaging all six entries would instead give : that asks a different question. An empty mask has , so this selected-mean formula is undefined.
For rectangular pixels with calibrated dimensions and , the complete-pixel area from a calibrated pixel count is . These are stipulated array values and cell dimensions, not a measurement of an object.
A stored mask can use another two-value encoding. ImageJ's Create Mask command stores 255 inside an area selection and 0 outside, corresponding to in this model.[ref]
ImageJ User Guide by Tiago Ferreira and Wayne Rasband. IJ1.46r, section27.12.10, Create Mask
Summing gives 765 in the example, rather than the selected count 3. Convert the encoding or count selected entries before interpreting a sum as an area.Two normalized masks and combine by set intersection through . Their complement within the specified grid is . Record the foreground-background polarity, coordinate alignment and grid extent when transferring a mask between images.
New to topics? Read the docs here!