ScientiaLux
strataquest Glossary Arithmetic Operations
BOM Group

Arithmetic Operations

Point-wise math on image pixel values

View
Definition
A family of pixel-wise arithmetic operations — add, subtract, multiply, divide, log, exp, polynomial, complement, square, and square root — for combining images, correcting intensities, and transforming pixel value distributions.
19 Operations
Image-to-image and image-to-scalar arithmetic
Point-Wise Processing
Each pixel processed independently
Dynamic Range Management
Log compresses, exp expands, polynomial remaps
Overflow/Underflow Clamping
Results clamped to valid bit-depth range

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)Enhance high intensities, energy computation
Square root (Sqrt)√AModerate dynamic range compression
Simplified

The arithmetic operations do basic math on pixels: add or subtract a value to brighten/darken, multiply to adjust contrast, divide by a reference for normalization. Logarithms compress the range of bright values (useful for 16-bit data). Complement inverts bright↔dark. All operations work pixel by pixel.

When to Use Which

Common arithmetic workflows in tissue image processing:

Background Correction

Subtract images or Divide images — Subtract a background estimate from the signal, or divide by a flat-field reference for illumination normalization. Division is preferred when the artifact is multiplicative (uneven illumination); subtraction when it's additive (constant offset).

Channel Combination

Add weighted images — Combine signals from multiple channels with user-defined weights. Useful for creating virtual channels from partially overlapping fluorophores.

Inversion

Complement — Inverts the image so that bright becomes dark and vice versa. Essential for converting brightfield hematoxylin (dark nuclei on light background) to fluorescence-like representation (bright nuclei on dark background) for detection engines that expect fluorescence-style input.

Dynamic Range

Logarithm — Compresses the wide dynamic range of 16-bit fluorescence images. Also the basis of the OD transform (see Optical Density Conversion).

Polynomial — General-purpose intensity remapping when log/exp/sqrt aren't the right curve shape.

Simplified

Use Subtract to remove background. Use Divide to correct uneven illumination. Use Complement to invert hematoxylin for detection. Use Log to compress 16-bit dynamic range. Use Add weighted to blend channels. Most pipelines use just 2–3 of these operations.

Connected Terms

Share This Term
Term Connections