Add (Saturated)
min(255, A + B). The default in OpenCV cv2.add; bright areas turn white.
Add 2 images pixel by pixel and get the R, G, B intensity sums of the result.
Enter your values below to get started.
Press Upload image A or B; the file is read locally and the menu switches to it.
Sums grow with the working width; compare means when sizes differ.
Use Average to combine 2 exposures without clipping.
Use Absolute difference to find what changed between 2 photos.
An image sum calculator adds 2 images pixel by pixel and totals the intensity values of the result. Upload 2 photos or pick demo patterns, choose clipped addition, subtraction, averaging, a weighted blend, absolute difference or wrap-around addition, and get the result image with the sum, mean and range of the red, green and blue (RGB) channels. Images are processed on your device and never leave the browser.
An image sum is a new image whose every pixel value is the sum of the matching pixel values of 2 input images. In an 8-bit image each red, green and blue (RGB) channel holds a whole number from 0 to 255, so a pixel of 200 plus a pixel of 100 gives 300, which is clipped to 255.
The term has 2 related meanings in image processing: the pixel-wise sum A + B, and the total intensity of an image, written ΣI, which adds every channel value of every pixel. The image sum calculator gives both: the combined image and its ΣI.
For 2 flat 128 × 96 images with every value at 40, the sum image has every value at 80, and its total intensity is 80 × 12,288 pixels × 3 channels = 2,949,120.
The image sum calculator works in 4 steps: it loads both images onto an HTML canvas, resizes them to one size, combines each channel value and adds up the result. The browser's Canvas 2D API decodes JPEG, PNG, WebP and GIF files locally, so no image is uploaded to a server.
Each image is decoded by the browser and drawn on a hidden canvas.
Both images are resampled to the working width (64–512 px); the height follows image A.
Each of the 3 channel values of each pixel goes through the chosen operation and is clamped to 0–255.
The calculator adds all red, green and blue values, the luma values and the number of clipped values.
The clipped image sum formula is R(x, y) = min(255, A(x, y) + B(x, y)), applied to each channel, and the total intensity is ΣI = Σx Σy Σc Rc(x, y).
A weighted blend mixes 2 images with a weight α between 0 and 1. With α = 0.25, a pixel of 200 in A and 40 in B gives 0.25 × 200 + 0.75 × 40 = 80. The blend never leaves the 0–255 range, and its total is close to α·ΣA + (1 − α)·ΣB.
The mean intensity of a channel is its sum divided by the pixel count W × H, which lets you compare images of different sizes.
There are 6 image sum operations in the calculator: clipped addition, clipped subtraction, averaging, weighted blending, absolute difference and wrap-around addition. The same inputs give different totals: 2 flat images of 200 sum to 9,400,320 with clipping and to 5,308,416 with wrap-around at 128 × 96.
min(255, A + B). The default in OpenCV cv2.add; bright areas turn white.
max(0, A − B). Removes a background or dark frame; negative values become 0.
(A + B) / 2. Combines 2 exposures with no clipping; 200 and 40 give 120.
αA + (1 − α)B. The cross-fade used by cv2.addWeighted and video editors.
|A − B|. Highlights change between 2 frames, the basis of simple motion detection.
(A + B) mod 256. Raw 8-bit integer overflow, as in NumPy uint8 addition: 200 + 200 = 144.
To calculate an image sum by hand, add the matching channel values of each pixel, clip every result to 0–255, then add all results. For pixel A = (200, 100, 50) and pixel B = (100, 100, 250):
Clipping happens when an image sum exceeds 255 in an 8-bit channel, and the calculator replaces every such value with 255. Adding the gradient and sun demos at 128 × 96 clips 12,530 of 36,864 channel values (34%), so the total 7,084,322 is lower than ΣA + ΣB.
Integer overflow is the alternative: an unsigned 8-bit integer (uint8) keeps only the remainder after 256, so 200 + 200 becomes 144 and bright areas turn dark. OpenCV saturates by default, while plain NumPy arrays wrap, a frequent source of bugs. Higher bit depths avoid both: a 16-bit PNG holds values up to 65,535 and 32-bit float images in OpenEXR have no practical ceiling.
The sum of any rectangle in an image takes 4 lookups in a summed-area table (integral image). Each cell of the table holds the sum of all pixels above and to the left of it, so a rectangle sum is D − B − C + A, where A, B, C and D are the table values at the 4 corners.
Franklin Crow introduced summed-area tables for texture mapping in 1984, and Paul Viola and Michael Jones used them in their 2001 face detector to evaluate thousands of rectangle features per image in constant time.
The 5 most common mistakes with image sums are ignoring clipping, mixing image sizes, comparing sums instead of means, forgetting wrap-around and adding gamma-encoded values as if they were light.
Pick or upload image A and image B, choose an operation and a working width, and press Add the images. The result card shows ΣI and the sum of each channel, the preview shows A, B and the result, and the tabs hold the steps, the images and a channel table.
Use a demo pattern or press Upload image A / B to load a JPEG or PNG from your device.
Add, subtract, average, blend (set α), difference or wrap.
8 to 512 px: small widths are fastest, 512 px keeps more detail. Sums scale with the pixel count.
Compare the R, G and B sums, the luma sum and the share of clipped values.
Image sums have 5 main real-life applications: noise reduction by stacking, exposure blending, background removal, change detection and brightness measurement.
Demo images at 128 × 96 px (12,288 pixels) unless noted, with the total intensity ΣI of the result.
| Images | Operation | Mean value | ΣI (all channels) | Calculator |
|---|---|---|---|---|
| 40 + 40 (flat) | Add | 80 | 2,949,120 | |
| 200 + 200 (flat) | Add, clipped | 255 | 9,400,320 | |
| 200 + 200 (flat) | Wrap (mod 256) | 144 | 5,308,416 | |
| 200 − 40 (flat) | Subtract | 160 | 5,898,240 | |
| 40 − 200 (flat) | Subtract, clipped | 0 | 0 | |
| Gradient + sun | Add, clipped | 212.5, 201.1, 162.9 | 7,084,322 | |
| Gradient + sun | Average | 122.2, 110.5, 81.7 | 3,863,660 | |
| Checker vs. stripes (64 × 48) | Difference | 111.1 | 1,023,840 |
Work each one out, then reveal the answer or check it in the calculator.
Two 8 × 6 images have every value at 200 and at 40. What is ΣI of A + B?
Blend the same 8 × 6 images with α = 0.25. What is ΣI?
Add two flat 128 × 96 images of 200 with wrap-around. What is each value and ΣI?
Subtract a flat 200 image from a flat 40 image (clip at 0). What is ΣI?
Add two flat 128 × 96 images of 40. What is the mean value and ΣI?
Add two flat 128 × 96 images of 200 with clipping. How many values clip?
Discover 67 free sum calculators across different categories. Find the right calculator for your needs.
Try a different name or choose another category.
An image sum calculator is an online tool that adds 2 images pixel by pixel and totals the intensity values of the result. It reports the red, green, blue and luma sums, the means and the number of clipped values.
Resize both images to the same width and height, add the matching red, green and blue values of every pixel, and clip each result to the 0–255 range.
No, the images are decoded and processed in your browser with the HTML canvas. No file leaves your device.
The value is clipped to 255 in saturated addition. In wrap-around addition, 256 is subtracted, so 200 + 200 becomes 144.
Image addition adds full values and can clip, while blending mixes αA + (1 − α)B and stays in 0–255. Blending with α = 0.5 equals averaging.
Yes, the calculator resizes both images to the working width and to the height of image A. Image B is stretched if its aspect ratio differs.
The total intensity ΣI is the sum of all channel values of all pixels. A flat 128 × 96 image at 80 has ΣI = 80 × 12,288 × 3 = 2,949,120.
A summed-area table, or integral image, stores the sum of all pixels above and left of each position, so any rectangle sum needs only 4 lookups.
Random noise in independent frames partly cancels, so the noise of an average of N frames falls by a factor of √N.
An image sum combines 2 images pixel by pixel and totals their intensity, and the image sum calculator does both on your own device with 6 operations. Use clipped addition to brighten, averaging or blending to merge exposures, subtraction to remove a background and absolute difference to find changes.
Not sure which operation to choose? Answer the questions below.