Image Edge Detection
Detect image edges with the Sobel operator — 100% in your browser.
Source
Déposez votre image ici
ou cliquez pour parcourir
Options
What is edge detection?
Edge detection is a fundamental image processing technique that identifies the boundaries between objects in an image by finding locations where pixel intensity changes sharply. The result is a binary or grayscale image where edges appear bright and flat regions appear dark. Edge detection is a building block for many computer vision tasks, including object recognition, image segmentation and feature extraction, but it is also a popular artistic effect that turns a photograph into a line-drawing-like outline.
This tool runs entirely in your browser. When you upload an image, it is decoded through the Canvas API. As you drag the threshold slider, the tool converts each pixel to grayscale, applies the Sobel operator to compute the horizontal and vertical gradients, and compares the gradient magnitude to the threshold. Pixels whose gradient exceeds the threshold become white (edge); all others become black. The preview updates instantly, and the result can be downloaded as a PNG file.
The Sobel operator
The Sobel operator is one of the most widely used edge detection kernels. It uses two 3×3 convolution masks — one for the horizontal direction (Gx) and one for the vertical direction (Gy). The Gx kernel detects vertical edges by computing the difference between the left and right columns of the 3×3 neighbourhood, while the Gy kernel detects horizontal edges using the top and bottom rows. The final edge magnitude is computed as the Euclidean norm of the two gradients. A higher threshold produces fewer, stronger edges, while a lower threshold captures more detail but may include noise.
When to use edge detection
Edge detection is useful in both technical and creative contexts. Common use cases include:
Edge detection types
Edge detection is useful in both technical and creative contexts. Common use cases include:
- Line art generation. Convert a photograph into a clean line drawing for illustration, colouring pages or graphic design.
- Object boundary extraction. Identify the outlines of objects for image segmentation or compositing.
- Feature detection. As a pre-processing step for computer vision algorithms that rely on edges, corners or contours.
- Stylised effects. Combine edge detection with colour fills for a comic-book or sketch appearance.
- Quality inspection. Detect defects, cracks or discontinuities in industrial and medical imaging.
Whenever you need to extract the structural skeleton of an image — its edges and outlines — Sobel edge detection is the standard first step.
How to apply edge detection
Detecting edges with this tool takes only a few seconds and runs entirely in your browser — no uploads, no sign-up, no watermark. Follow these steps:
- Upload your image. Click the upload area or drag and drop a JPG, PNG, WebP, GIF or BMP file.
- Adjust the threshold. Drag the slider from 0 to 255. A lower threshold detects more edges (including noise), while a higher threshold keeps only the strongest edges. The preview updates in real time.
- Download the result. Click "Download Edge Image" to save the edge-detected PNG.
Because every step runs locally through JavaScript, your image is never sent to a server. This makes the tool completely private and fast.
Is this edge detection tool free?
Yes, completely free with no sign-up, watermarks or limits.
What threshold should I use?
A threshold of 30–80 works well for most photographs. Use lower values to capture fine detail, or higher values for clean, bold outlines.
Which algorithm does this tool use?
The Sobel operator, which computes horizontal and vertical gradients using two 3×3 convolution kernels and thresholds the combined magnitude.
Are my images uploaded?
No. All processing is local. Your images never leave your browser.