Pixlane
Preparing the tool on your device

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

Distance Transform Online — L2 Distance Map Visualizer

The distance transform labels every foreground pixel with its distance to the nearest background pixel — the backbone of watershed segmentation, skeletonization, and shape analysis. Upload any image, binarize it with Otsu or a manual threshold, and explore the L2 distance field as a colormapped heatmap, an overlay, or a raw grayscale field.

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

Frequently Asked Questions

What is a distance transform used for?

It powers watershed marker generation, skeletonization, robot path planning, morphological operations, and shape thickness measurements — anywhere you need how far am I from the boundary per pixel.

Why do I see rings around shapes?

Each colormap band is an iso-distance contour: pixels in the same band sit at the same distance from the nearest edge. Centers of blobs glow brightest because they are farthest from any boundary.

Which metric does this tool compute?

Euclidean (L2) distance with a 3x3 mask via OpenCV distanceTransform, normalized to 0-255 for display.

Is my image uploaded anywhere?

No. The transform runs in WebAssembly entirely in your browser.

Related Tools

Back to all Pixlane tools