Runs locally No signup No watermark
Dev Tool
Distance Transform 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.

✓ Core Access ✓ No signup 🔒 Supported file contents are not uploaded for processing
1

Upload

2

Adjust & Preview

Pixlane
Preparing the tool on your device

Pixlane is loading on your device. Supported file contents are not uploaded for processing. Site analytics and the assistant are separate; tool-specific limits may apply.

Distance Transform Visualizer

Visualize the Euclidean (L2) distance transform with Otsu/manual thresholding, colormaps, and overlay mode. Classic CV, in-browser.

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.

How to Use Distance Transform Visualizer

  1. Upload an image: Upload one of the formats listed by the tool (JPG, PNG, WebP) and wait for the local preview.
  2. Adjust settings and process: Adjust the available controls, then run the selected image processing workflow in your browser.
  3. Review and download: Review the result, then download it in one of the formats offered by this tool.

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.

Back to computer vision tools