Edge Detection (Canny)
Trace the outlines in any photo with OpenCV's Canny edge detector, running entirely in your browser. Drop in a PNG, JPEG, WebP, GIF, or BMP, then pick a preset or drag two threshold sliders to keep more or fewer edges. The preview redraws as you adjust, and the OpenCV engine downloads only when you first open the tool.
How to detect edges in an image
- Drop an image onto the drop zone or click to browse (PNG, JPEG, WebP, GIF, or BMP).
- Pick a preset, Fine, Balanced, or Bold, to set both thresholds at once.
- Drag the Low threshold and High threshold sliders to keep more or fewer edges.
- Tick 'Dark lines on white' for black line art on a white background.
- Click 'Download PNG' to save the edge map.
Examples
Outline a portrait with the Balanced preset
A head-and-shoulders portrait photo, Balanced preset (low 75, high 200)
White contours tracing the face, hairline, and shoulders over a solid black background
Pull out fine detail with the Fine preset
A photo of a building facade, Fine preset (low 50, high 150)
A denser web of white lines catching window frames, brick joints, and railings
Make a coloring-page outline
A pet photo, Bold preset (low 100, high 250) with 'Dark lines on white' turned on
Clean black outlines of the main shapes on a white background, like a coloring-page sketch
Frequently asked questions
Is my image uploaded anywhere?
No. Edge detection runs entirely in your browser with OpenCV compiled to WebAssembly. The image is decoded, processed, and saved on your own device, so nothing is sent to a server.
What do the two thresholds do?
Canny uses a low and a high threshold. Edges stronger than the high threshold are always kept, while weaker edges survive only if they connect to a strong one. Lowering both thresholds finds more edges and more noise; raising them keeps only the boldest lines.
What are the Fine, Balanced, and Bold presets?
They set both sliders in one click: Fine is 50 and 150 for the most detail, Balanced is 75 and 200 for a middle ground, and Bold is 100 and 250 for only the strongest edges. You can still nudge either slider afterward.
How do I get black lines on a white background?
Tick 'Dark lines on white'. By default the tool draws white edges on black; inverting gives dark edges on white, which reads better as line art or a coloring-page style outline.
Which image formats can I open?
Anything your browser can decode: PNG, JPEG, WebP, GIF, and BMP are all supported. The result is always saved as a PNG named after your original file with an -edges suffix.
Why is the first run slow?
The OpenCV WebAssembly module downloads once on first use, then your browser caches it for later. Large images also take a moment to process because every pixel is scanned for gradients.
The output is too noisy or too sparse. What should I change?
Too many speckled lines means the thresholds are too low, so drag both sliders up or switch to the Bold preset. Missing edges mean the thresholds are too high, so lower them or try the Fine preset. There is a brief pause after each change while the preview redraws.
Is the edge map in color?
No. Canny produces a single-channel edge map, so the output is black and white (or white and black when inverted). Color information from the original photo is discarded during detection.
What size is the output image?
The edge map keeps the same pixel dimensions as the image you dropped in. Downscale large photos before uploading if you want a smaller file or faster processing.
Learn more
- How Canny edge detection works
A plain-language walk through the Canny algorithm: gradients, non-max suppression, and the two thresholds that decide which edges survive.
Related tools
Photo to Coloring Page
Turn any photo into a printable black-and-white coloring page with edge detection. Adjust the line detail, then download a PNG. Free and runs in your browser.
Image Filters and Effects
Apply grayscale, sepia, invert, brightness, contrast, and saturation to an image with live preview. Free, private, and runs in your browser.
Image Converter
Convert images to PNG, JPEG, or WebP in your browser. Flatten transparency onto a background, set quality, compare sizes, and download. Nothing is uploaded.
Add Border to Image
Add a colored border or frame around an image, with adjustable width and color. Live preview, runs in your browser, nothing uploaded.
AI Alt Text Generator
Generate accessible alt text for any image with AI, right in your browser. Copy clean alt text or a ready HTML img tag. Nothing is uploaded.
AI Background Remover
Remove the background from a photo automatically with AI, right in your browser. Get a transparent PNG or a solid color. Nothing is uploaded.