Runs locally No signup No watermark
Pixlane
Preparing the tool on your device

Pixlane is loading locally. No upload, no signup, and your files stay on your device.

Contour Detection Online Free — Find Outlines

Identify and draw contours around objects in any image. Useful for shape analysis, object counting, and boundary visualization.

Find and draw contours around objects — outline shapes and regions in images.

All processing runs locally in your browser. Your files never leave your device — no upload, no server, no signup required.

How contour detection actually works

A contour is a connected curve that traces the boundary of a single object as one ordered chain of points. Under the hood this tool runs OpenCV's findContours, which uses the Suzuki-Abe border-following algorithm. That algorithm needs a clean binary image to trace, so the pipeline first reduces the picture to a single channel and then separates foreground from background. Converting to a grayscale image collapses color into luminance, and a binarization step — a fixed or adaptive cutoff like the ones in threshold segmentation — turns it into the black-and-white mask the tracer follows. The output is a set of point chains, one per closed shape, drawn back over your original image.

Contours are not the same as edges. Edge detection with operators like Canny or Sobel marks every intensity transition as a scattered set of pixels; contour detection links those boundary pixels into complete, closed outlines you can measure, count, or fill.

Choosing retrieval and approximation modes

Two settings control the output. The retrieval mode decides which contours come back and how they relate: external mode keeps only the outermost boundary of each object, while a tree mode also returns inner holes and nested shapes and records the parent-child relationships between them. The approximation method controls how each boundary is stored — keeping every point gives a pixel-perfect outline, while simple approximation collapses straight horizontal, vertical, and diagonal runs down to their endpoints, which stores far fewer points without changing the shape.

  • Counting separate objects on a plain background: external retrieval with simple approximation.
  • Analyzing objects that contain holes or sit nested inside one another: tree retrieval, so the hierarchy is preserved.
  • Noisy or textured input: clean the binary mask first, since stray specks create spurious tiny contours.

Real-world uses and why on-device matters

Contour detection underpins a lot of practical vision work: counting cells, parts, or items on a conveyor; measuring object area and perimeter; isolating shapes for inspection; and prototyping a segmentation step before a later stage. If a result looks too busy, smooth the input with a blur filter to suppress texture before tracing, or raise your binarization threshold to drop faint detail.

Because this runs entirely in your browser through WebAssembly-compiled OpenCV, your images are never uploaded to a server — every step happens on your own device. That means no sign-up, no watermark, and instant results even on sensitive material like medical scans, product designs, or research imagery. It is private by construction and completely free to use as often as you need.

Frequently Asked Questions

What is contour detection?

Contour detection finds continuous curves that form the boundaries of objects in an image. It is used in shape analysis, object counting, gesture recognition, and industrial inspection.

What is the difference between external and all contours?

External mode detects only outermost contours (no nested boundaries). All mode returns every contour including holes. Tree mode preserves the parent-child hierarchy.

Related Tools

Back to all Pixlane tools