How Images Are Edited: Filters, Masks & Histograms
Every photo edit is just pixel math
Every photo edit is just pixel math
Every image is a grid of pixels. Each pixel is three numbers: red, green, and blue (0-255). Hover over the image to inspect individual pixel values. Editing is just math on these numbers.
Hover over the image to see RGB values of each pixel.
Brightness adds or subtracts from every pixel. Contrast pushes pixels away from or toward the middle. Saturation intensifies or mutes the color. Adjust the sliders to see the math in action.
A filter slides a small grid of numbers (the kernel) over every pixel. It multiplies each neighbor by the kernel weight and sums the result. Different kernels create different effects. Click each to see it applied.
Original image. No filter applied.
The same pixel math powers everything from Instagram filters to medical imaging.
RAW processing, color grading, noise reduction, and HDR merging. Professional photo editing is applying hundreds of mathematical operations to millions of pixels.
Instagram filters are presets: specific brightness, contrast, saturation, and color channel adjustments saved as a recipe. One tap applies dozens of operations.
Edge detection filters help radiologists spot tumors in X-rays. Contrast enhancement makes subtle differences visible. The same convolution kernels you just tried.
Self-driving cars use convolution filters to detect lane markings, signs, and obstacles. Neural network image recognition is built on layers of learned convolution kernels.
The first digital image was scanned in 1957 by Russell Kirsch: a 176x176 pixel photo of his baby son. The entire image contained fewer pixels than a single emoji on a modern phone.
You've seen behind the curtain of every photo editor: brightness is addition, contrast is multiplication, blur is averaging neighbors, and sharpen is exaggerating differences. It is all pixel math.
Every pixel is 3 numbers: red (0-255), green (0-255), blue (0-255). Editing an image means doing math on these numbers.
Add 50 to every pixel value and the image gets brighter. Subtract 50 and it gets darker. That is all brightness does.
Replace each pixel with the average of its neighbors. More neighbors = more blur. This is a convolution filter with equal weights.
A histogram counts how many pixels are at each brightness level. Dark images pile up on the left. Bright images pile up on the right.
Put your new knowledge into practice!