How Emboss, Edge Detection, Posterize, and Threshold Work
A plain-language look at 3×3 convolution kernels, the Sobel operator, level quantization, and thresholding as used by browser image effects.
Primary Browser Tool
Image Effects Studio
Apply artistic effects such as duotone, posterize, halftone, pencil sketch, emboss, edge detection, vignette, and film grain.
Point Operations and Neighborhood Operations
Image effects fall into two families. Point operations change each pixel using only that pixel’s own value. Posterize, Threshold, Solarize, and Duotone are point operations, which makes them fast and predictable. Neighborhood operations compute each output pixel from the pixels around it. Emboss, Edge Detect, blur, and sharpening belong here.
Convolution Kernels and the Sobel Operator
A convolution kernel is a small grid of weights, usually 3×3. For every pixel, the nine pixels under the grid are multiplied by the weights and added up. Different weights give different effects.
The emboss kernel has negative weights toward the top-left and positive weights toward the bottom-right. In a flat area the positives and negatives cancel and the result is zero, which is shifted to middle gray. Where brightness changes, one side outweighs the other and the pixel becomes lighter or darker, producing the look of a surface lit from one corner.
Edge detection uses two Sobel kernels: one responds to left-to-right brightness changes, the other to top-to-bottom changes. The two results are combined into a single strength value using the Pythagorean formula. Strong edges come out bright; flat areas come out black. The “Dark lines on white” switch simply inverts that result.
Posterize and Threshold: Reducing the Number of Levels
Each color channel normally has 256 possible values. Posterize rounds them down to a handful. With 4 levels per channel, the image has at most 4 × 4 × 4 = 64 colors, so smooth gradients turn into visible bands, which is the effect.
Threshold is the extreme case applied to luminance: every pixel becomes either black or white depending on whether it is darker or lighter than the cutoff. Moving the cutoff changes how much of the image falls on each side. Solarize is related: values above its threshold are inverted, and values below are left alone, giving the partially reversed look of an overexposed darkroom print.
| Effect | Family | Keeps color? |
|---|---|---|
| Posterize | Point | Yes, with fewer levels |
| Threshold | Point | No, black and white only |
| Solarize | Point | Yes, partly inverted |
| Emboss | Neighborhood (3×3) | No, gray relief |
| Edge Detect | Neighborhood (two 3×3 Sobel kernels) | No, line strength only |
Practical Examples
Why a blurry photo gives weak edges
A Sobel kernel measures the brightness difference across three pixels. In a blurred photo an edge is spread over ten or more pixels, so each three-pixel window sees only a small change and the detected line is faint.
Common Mistakes & Honest Limitations
Mistakes to Avoid
- Expecting Edge Detect to find object outlines. It finds brightness changes, which includes texture, noise, and compression artifacts.
Technical Limitations
- A 3×3 kernel responds to fine detail only. Detecting large soft edges needs a larger kernel or a blurred copy, which this tool does not offer for Emboss and Edge Detect.