Video Edge Detection

Video Edge Detection is a free online tool that finds the edges in every frame of a video: the outlines of people and objects, and every line where the colors or the brightness change. Use the Canny edge detector for thin, clean lines, the gradient magnitude of the Sobel, Scharr, Prewitt or Roberts operators for soft, glowing edges, the Laplacian of Gaussian, or XDoG to turn a video into a moving line drawing.

Use a video file or your camera, adjust the effect while watching, and export the result as an MP4. The filter runs on your graphics card, so the preview is live even in Full HD. Your video is never uploaded anywhere: everything happens inside your own browser.

Drop your video here
MP4, MOV, WebM or MKV.
Original
Edges

Effect
Method

Thin, clean, connected lines. The classic edge detector.

Soft, glowing edges, brighter where the change is stronger. The most stable in videos.

Thin lines where the brightness curves, closed around the shapes.

Smooth lines of varying width, like an ink or pencil drawing.

Operator
How the change of brightness is measured around every pixel.
Blur (sigma): 1.4
Removes noise and small details before the edges are detected. Bigger values keep only the main shapes, and flicker less.

Also finds edges between colors of the same brightness, such as red and green.

Thresholds

Chosen from the frame on screen when the video opens or a setting changes, then kept for the whole video so the edges don't flicker. Turn it off to change them.

Black point: 5%
Changes weaker than this become the background.
White point: 30%
Changes stronger than this get the full edge color.
Lines and colors
Thickness: 1 px
Edge color
Background

How to use this online tool?

  1. Upload a video, or click "Camera" and start your camera. The edges appear next to the original, with thresholds chosen for your video.
  2. Choose the method: gradient magnitude for soft, glowing edges, Canny for thin lines, Laplacian of Gaussian for closed outlines, or XDoG for a hand-drawn look.
  3. Increase the blur to ignore noise and textures and keep only the main shapes, or decrease it to find small details.
  4. Choose the thickness and the colors of the lines: white on black, black on white like a drawing, a rainbow by direction, or over the original video.
  5. Click "Export video (MP4)" to process the whole video, then download the result. You can also save a single frame as a PNG image.

Edge detection methods

MethodLinesDescription
Canny1 pixel, continuous The edge detector created by John Canny in 1986, still the most used one. It blurs the frame, measures the gradient with an operator such as Sobel, keeps only the pixels at the center of each edge, and then follows the edges with two thresholds, so weak parts of an outline are kept when they continue a strong one. The cleanest outlines, but the thin lines can flicker in noisy or heavily compressed videos.
Gradient magnitudeSoft, of varying width The strength of the gradient measured by the operator, without thinning: the stronger the change, the brighter the edge. It's the glowing look of the Sobel filter of video and photo editors, and the most stable method from one frame to the next. With the rainbow edge color, it shows the direction of every edge.
Laplacian of Gaussian1 to 2 pixels, closed The method of Marr and Hildreth (1980). It blurs the frame and takes its Laplacian, the second derivative, which changes sign exactly at the edges. The lines tend to form closed loops around the shapes.
XDoGSmooth, of varying width The eXtended Difference of Gaussians of Winnemöller and others (2012), designed to make images look drawn. The lines are thicker where the edges are stronger, like strokes of a pen, and dark areas can be filled to create a comic or stencil effect.

How does edge detection work?

An edge is a place where the brightness of the picture changes quickly, such as the outline of a person against the sky. To find it, the computer measures the gradient of every frame: how much the brightness changes from left to right, and from top to bottom, around every pixel. The Sobel operator does this with two small 3 x 3 kernels, one for each direction. The length of the gradient is the strength of the edge, and its angle is the direction across the edge.

Real videos have noise, so every grain would become a tiny edge. That is why each frame is blurred first: the blur averages out the noise but keeps the big changes. Finally, the edges are separated from the remaining noise with one or two thresholds.

This tool does all of it on your graphics card, with WebGL: the blur, the gradient, the thresholds, the thickness and the colors are each a small program that runs on every pixel at the same time. A Full HD frame takes a few milliseconds, so the preview keeps up with the video, and the export is limited only by how fast your browser decodes and encodes the video.

Frequently Asked Questions (FAQ)

Why don't the automatic thresholds change during the video?

Thresholds chosen for every frame would change a little from one frame to the next, and the edges would pulse and flicker. So they are chosen from the frame on screen when the video opens or when you change the method, the operator or the blur, and then kept for the whole video. If a later part of the video is much darker or brighter, pause there and click "Choose them again from this frame", or turn off the automatic thresholds and set them yourself.

The edges flicker. How do I make them steadier?

Video compression and the grain of the camera sensor change a little in every frame, and the thin lines of Canny follow those changes. Increase the blur to 2 or 3, raise the thresholds, or switch to the gradient magnitude, which changes smoothly instead of switching lines on and off.

Is it the same as the image edge detection?

The methods and the options are the same, with a few differences that keep the video fast and steady. Canny follows a weak edge for up to 16 pixels from a strong edge, instead of all the way. There's no option to remove short edges, because finding the groups of connected pixels needs a search through the whole frame, which can't run on the graphics card at video speed. And the background can't be transparent, because MP4 videos have no transparency.

Can I use it with my camera?

Yes. Click "Camera", allow the browser to use it, and the edges of everything in front of the camera appear live. You can save a frame as a PNG image; to record a video, record it first with your camera app, and then upload it here.

Is my video uploaded to a server?

No. This tool has no server side at all. Your video, and the image of your camera, are processed by your own browser and never leave your computer.



Related tools

Motion Extraction

Make only the movement in a video visible: everything still turns gray, and everything that moves lights up.

RGB Split Video Effect

Split the red, green and blue layers of a video, shifting them in space and delaying them in time.

Slit-Scan

Turn one direction of a video into time: stretch moving things with the slit-scan effect, or make a photo finish picture.

Webcam Tester

Test your webcam online: see the image, check the resolution and the frame rate, take a photo and test your microphone.

Trim Video (lossless)

Cut a part of a video without re-encoding it: no quality loss, done in seconds, right in your browser.