StrataQuest Home › StrataQuest Glossary › Arithmetic Operations
BOM Group

Arithmetic Operations

Point-wise math on image pixel values

View
Definition
Subtract a background image from a signal image, and each output pixel is the signal there minus the background there. Every operation in this group follows that pattern, for combining images, adjusting intensities and reshaping value distributions: add, subtract, multiply, divide, log, exp, polynomial, complement, square and square root.
19 operations
Image-to-image and image-to-scalar arithmetic
Point-wise processing
Each pixel processed independently
Reshaping the dynamic range
Log compresses, exp expands, polynomial remaps
Keeping results in range
Scaling factor multiplies results by 2^value

Operations Reference

OperationFormulaUse Case
Add imagesA + BCombine signals from two channels
Add value / Add value (RGB)A + cBrighten image by constant offset
Add weighted imagesw₁·A + w₂·BWeighted blend of two channels
Subtract imagesA − BBackground subtraction, change detection
Subtract value / (RGB)A − cRemove constant background offset
Multiply imagesA × BMasking (multiply by binary mask)
Multiply with value / (RGB)A × cContrast scaling, gain adjustment
Divide imagesA / BRatio imaging, flat-field correction
Divide by value / (RGB)A / cNormalize intensity range
Complementmax − AInvert image (e.g., hematoxylin → fluorescence-like)
Logarithm (Ln)ln(A)Dynamic range compression, OD-related transforms
Exponential (Exp)exp(A)Reverse log transform
Polynomiala + b·A^cFlexible intensity curve remapping
Square (Sqr)A²Enhance high intensities, energy computation
Square root (Sqrt)√AModerate dynamic range compression
Simplified

These operations do simple math on each pixel. Add or subtract a value to brighten or darken; multiply to adjust contrast; divide by a reference to normalize. Logarithm compresses bright values, which helps with 16-bit data, and Complement swaps bright and dark.

When to Use Which

Common arithmetic workflows in tissue image processing:

Background Correction

Subtract images or Divide images. Subtract a background estimate when the background adds a constant offset to the signal. Divide by a flat-field reference when uneven illumination multiplies it.

Channel Combination

Add weighted images combines two images with weights you set (Weight 1 and Weight 2, both default 0; a negative weight subtracts). It can build a virtual channel from partially overlapping fluorophores.

Inversion

Complement swaps bright and dark. Brightfield hematoxylin shows dark nuclei on a light background; complemented, it shows bright nuclei on a dark one. That is the fluorescence-style input some detection engines require.

Dynamic Range

Logarithm compresses the wide dynamic range of 16-bit fluorescence images. It is also the basis of the OD transform (see Optical Density Conversion).

Polynomial remaps intensity when log, exp or sqrt isn't the curve shape you need.

Simplified

Subtract a background; Divide by a reference to even out illumination; Complement hematoxylin for detection; Log to compress 16-bit range; Add weighted to blend channels. Most pipelines use only two or three of these.

Connected Terms

Share This Term
Term Connections