How Edge Detection Decides Where an Effect Lands
Edge detection finds the places in a frame where colour changes sharply, and applying an effect only at those places is what separates a deliberate-looking treatment from a filter smeared over the whole image.
Two clips can use identical settings and land completely differently, because one applied the effect everywhere and the other applied it only where the drawing is.
What an edge is, to software
An edge is a place where the value of neighbouring pixels changes quickly. Software finds them by measuring the rate of change across the frame in both directions, then keeping the places where that rate is above some threshold.
Everything that follows comes from one consequence: noise is also a rapid change between neighbouring pixels. Detectors cannot tell a real outline from a grainy patch, because at the pixel level they look the same.
Why detecting on colour matters
The simplest detectors convert the frame to greyscale first, then look for changes in brightness. That is fast and it throws away real edges.
Two areas can have the same brightness and completely different colours. A mid-red next to a mid-green reads as a single flat grey once you discard hue, so the boundary between them vanishes and no effect gets applied along it. On flat-coloured animation, where large areas share tone but differ in hue, this failure is constant.
Measuring change across all three channels and combining the results catches those boundaries. It is more work per frame and it is the difference between an effect that follows every outline and one that skips half of them.
Sensitivity, and what it trades
Sensitivity is the threshold: how much change is enough to count.
- High sensitivity catches soft, gradual transitions. It also catches compression blocking, grain, and gradients you did not think of as edges.
- Low sensitivity restricts the effect to hard outlines only. Cleaner, but a soft-focus source may end up with almost nothing detected.
The right value depends entirely on the footage, which is why judging it on a single frame first is worth the minute it takes.
The noise trap
On grainy or heavily compressed footage, high sensitivity finds thousands of edges that are not in the image, only in its artifacts. The effect then decorates the noise.
The result is unmistakable once you know it: a shimmer that has no relationship to the shapes on screen, crawling across flat areas where nothing should be moving. It reads as a broken encode.
Two ways out. Lower the sensitivity until only real outlines survive. Or denoise before detecting, then add grain afterwards if you wanted grain, because grain laid on top is under your control and grain fed into a detector is not.
Weighting, not switching
Edge detection does not have to be a yes or no decision. The useful version produces a map, where each pixel carries a strength rather than a flag, and the effect scales by that strength.
That gives a dial. At full weight, only the strongest edges move and flat interiors are perfectly still, which reads as redrawing. At low weight, everything moves somewhat, which reads as a warp of the whole image. The interesting settings are usually between, where outlines move a lot and interiors move a little, the way a redrawn cel does.
The practical order
1. Look at one frame with the effect at an obvious strength, so you can see where it is landing.
2. Adjust sensitivity until the effect covers the outlines you care about and nothing else.
3. Then set the strength.
Doing it in the other order means tuning the amount of an effect while it is still landing in the wrong places.
Keep reading
- How to Add Film Grain to Video Without Overdoing It
Add film grain as the very last step in your effect chain, keep it subtle enough that it is barely visible on a paused frame, and choose fine grain fo
- How to Make a Line Boil in After Effects
In After Effects, a line boil is made with Turbulent Displace set to a small amount and a large size, with the Evolution property driven by an express
- How to Make AI-Generated Video Look Hand-Drawn
AI-generated animation looks synthetic mostly because its edges are perfectly stable frame to frame, so the fix is to add line boil, hold each drawing
- How to Make a Convincing VHS Effect
A convincing VHS look comes from horizontal color bleed, a red and blue channel offset of two or three pixels, soft focus, and a small amount of stati
- Why Generated Video Looks Uncanny Even When Each Frame Looks Fine
Generated video looks uncanny because each frame is produced independently or interpolated smoothly, so surfaces drift and edges hold perfectly still
- Animating on Ones, Twos, and Threes
Animating on twos means holding each drawing for two frames, producing twelve drawings per second in twenty-four frame footage, which is the standard
- Chromatic Aberration in Video, and How to Fake It Well
Chromatic aberration is the colored fringing that appears when a lens or a printing process fails to land the red, green, and blue components of an im
- Free Ways to Make Video Look Like Animation on a Mac
On a Mac you can make video look hand-drawn for free using Boiler for line boil and grain, ffmpeg for frame rate and color work from the command line,
- How to Add Line Boil to a Video on a Mac
To add line boil to a video on a Mac, open the clip in Boiler, set Max Shift to 3 pixels and Hold Frames to 2, cycle 4 variations, then process and sa
- Every Line Boil Setting, Explained
The six settings that matter in a line boil are Max Shift (how far edges move), Region Size (how large the moving areas are), Hold Frames (how long ea
- How to Make a Video Look Hand-Drawn
To make a video look hand-drawn, add line boil so the edges are redrawn each frame, hold each drawing for two frames instead of one, split the color c
- What Is Line Boil in Animation?
Line boil is the constant shimmer along the outlines in hand-drawn animation, caused by an artist redrawing every frame slightly differently so no lin
Boiler does this
Free Mac app. Drop a video in, move the sliders, save it out. macOS 12+ on Apple Silicon for the prebuilt app; runs from source on Intel Macs, Windows and Linux.
While you are here
The same studio makes Halfsies, a daily game about cutting things exactly in half by eye. One puzzle a day, one attempt, scored on how close you got. It is free on iPhone.