Runs locally No signup No watermark
开发者 工具
距离变换可视化工具

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.

✓ 100% 免费 ✓ 无需注册 🔒 文件保留在设备上
1

上传

2

调整和预览

Pixlane
Preparing the tool on your device

Pixlane is loading locally. Supported local media processing, no signup, and supported file contents are not uploaded for processing.

距离变换可视化工具

距离变换会为每个前景像素标注其到最近背景像素的距离——它是分水岭分割、骨架化和形状分析的核心基础。上传任意图像,用 Otsu 或手动阈值将其二值化,即可以彩色映射热力图、叠加图或原始灰度场的形式探索 L2 距离场。

可视化欧氏(L2)距离变换,支持 Otsu/手动阈值、色彩映射和叠加模式——经典计算机视觉,在浏览器中运行。

常见问题

距离变换有什么用途?

它可以驱动分水岭标记生成、骨架化、机器人路径规划、形态学运算以及形状厚度测量——凡是需要按像素知道"我离边界有多远"的场景,都能用得上。

为什么我看到形状周围有一圈圈的环?

色彩映射的每一条色带都是一条等距离等值线:处于同一色带内的像素,到最近边缘的距离相同。团块的中心之所以最为明亮,是因为它们离任何边界都最远。

这个工具计算的是哪种度量?

通过 OpenCV 的 distanceTransform,使用 3x3 掩膜计算的欧氏(L2)距离,并归一化到 0-255 用于显示。

我的图像会被上传到某个地方吗?

不会。距离变换在 WebAssembly 中完全于你的浏览器内运行。

相关工具