自迁移出 MediaWiki 以来,本页内容尚未经过审查。如果您愿意帮忙,请查看帮助指南!
|
|
|
| 软件 | IJPB-plugins |
| 来源 |
简介
在二值图像中分离接触物体的经典方法是利用距离变换和分水岭方法。这个想法是创建一个距离重叠物体的中心边界远的边界。这种策略对于矩形物体非常有效,它被称为距离变换分水岭。它包括计算二值图像的距离变换,将其工具(因此图像最暗的部分是对象的中心),然后使用我们的原始图像作为应用其分水岭(见下图)。在我们的实现中,包括一个使用具有扩展性的简单的分水岭的选项,以便用户可以控制对象分割和合并的数量。
Basics of the Distance Transform Watershed algorithm. From left to right: sample image of touching DAPI stained cell nuclei from a confocal laser scanning microscope, binary mask calculated after filtering and thresholding input image, inverse of the distance transform applied to the binary mask (Chamfer distance map using normalized Chessknight weights and 32-bit output) and resulting labeled image after applying watershed to the inverse distance image using the binary mask (dynamic of 1 and 4-connectivity).
MorphoLibJ在Help › Update…菜单下提供了两个插件来关注策略评估2D和3D图像:
距离变换分水岭
距离变换分水岭需要一张 2D 8 位二值图像才能运行。如果是这种情况,将弹出如下对话框:

插件参数分为距离转换和分水岭选项:
- 距离地图选项:
- Distances: allows selecting among a pre-defined set of weights that can be used to compute the distance transform using Chamfer approximations of the Euclidean metric. They affect the location but specially the shape of the border in the final result. The options are:
- Chessboard (1,1): weight equal to 1 for all neighbors.
- City-Block (1,2): weights 1 for orthogonal neighbors and 2 for diagonal neighbors.
- Quasi-Euclidean (1,1.41): weights 1 for orthogonal neighbors and \(\sqrt{2}\) for diagonal neighbors.
- Borgefors (3,4): weights 3 for orthogonal neighbors and 4 for diagonal neighbors (best approximation of Euclidean distance for 3-by-3 masks).
- Weights (2,3): weights 2 for orthogonal neighbors and 3 for diagonal neighbors.
- Weights (5,7): weights 5 for orthogonal neighbors and 7 for diagonal neighbors.
- Chessknight (5,7,11): weights 5 for orthogonal neighbors and 7 for diagonal neighbors, and 11 for chess-knight moves (best approximation for 5-by-5 masks).
- Output type: 16 or 32-bit, to calculate distance with short or float precision.
- Normalize weights: indicates whether the resulting distance map should be normalized (divide distances by the first Chamfer weight).
- Distances: allows selecting among a pre-defined set of weights that can be used to compute the distance transform using Chamfer approximations of the Euclidean metric. They affect the location but specially the shape of the border in the final result. The options are:
- 分水岭选项:
- Dynamic: same as in the Morphological Segmentation plugin, this is the dynamic of intensity for the search of regional minima in the inverse of the distance transform image. Basically, by increasing its value there will be more object merges and by decreasing it there will be more object splits.
- Connectivity: pixel connectivity (4 or 8). Selecting non-diagonal connectivity (4) usually provides more rounded objects. 最后,单击“preview”选项可以可视化当前插件配置的结果。
结果:2D 32位标签图像(每个对象一个索引值)。
距离变换分水岭(3D)
距离变换 Watershed 3D 需要一张 3D 8 位二值图像才能运行。如果是这种情况,将会弹出如下对话框:

这些参数与 2D 版本中相同,但其中一些参数适用于 3D 图像:
- 距离地图选项:
- Distances: Now the available options are:
- Chessboard (1,1,1): weight equal to 1 for all neighbors.
- City-Block (1,2,3): weights 1 for orthogonal neighbors, 2 for diagonal neighbors and 3 for cube-diagonals.
- Quasi-Euclidean (1,1.41,1.73): weights 1 for orthogonal neighbors, \(\sqrt{2}\) for diagonal neighbors and \(\sqrt{3}\) for cube-diagonals.
- Borgefors (3,4,5): weights 3 for orthogonal neighbors, 4 for diagonal neighbors and 5 for cube-diagonals (best approximation of Euclidean distance for 3-by-3-by-3 masks).
- Output type: 16 or 32-bit, to calculate distance with short or float precision.
- Normalize weights: indicates whether the resulting distance map should be normalized (divide distances by the first Chamfer weight).
- Distances: Now the available options are:
- 分水岭选项:
- Dynamic: same as in the 2D version, this is the dynamic of intensity for the search of regional minima in the inverse of the distance transform image. Basically, by increasing its value there will be more object merges and by decreasing it there will be more object splits.
- Connectivity: voxel connectivity (6 or 26). Selecting non-diagonal connectivity (6) usually provides more rounded objects. 与 ImageJ 中的一样,这里不提供预览,因为我们正在处理 3D 图像。
结果:3D 32位标签图像(每个对象一个索引值)。
安装
距离变换分水岭插件(2D 和 3D)是 §§2§§§ 库的一部分。要安装它们,您只需 add IJPB-插件更新站点:
1) 从斐济菜单中选择Plugins › MorphoLibJ › Binary Images…即可启动更新程序。
2) 单击管理更新站点。这将弹出一个对话框,您可以在其中激活其他更新站点。
3) 激活 IJPB 插件更新站点并关闭对话框。现在您应该会看到一个额外的 jar 文件供下载。
4) 单击应用更改并重新启动斐济。
您现在应该在子菜单Plugins › MorphoLibJ › Segmentation下找到该插件。
注意:距离变换分水岭插件只是 MorphoLibJ 套件中包含的两个插件。通过遵循这些安装步骤,您将安装套件中的其余插件。
参考文献
- 大卫·勒格兰、伊格纳西奥·阿尔甘达-卡雷拉斯、菲利普·安德烈; MorphoLibJ: integrated library and plugins for mathematical morphology with ImageJ。生物信息学2016; 32(22):3532-3534。 doi:10.1093/生物信息学/btw413
另请参阅
- Marker-controlled Watershed,一个通过从特定种子点或标记进行洪水来执行分水岭的插件。
- Morphological Segmentation,一个带有图形用户界面的插件,用于根据形态学操作和分水岭算法分割图像。
- Serge Beucher’s site,带有分水岭算法的图形描述和动画。
- G. Bertrand’s Topological Watershed site,包含论文、幻灯片和来源代码。
许可证
该是免费软件;您可以根据自由软件基金会 (http://www.gnu.org/licenses/gpl.txt) 发布的 GNU 通用公共许可证 程序的条款重新分发和/或修改它。
分发此程序的目的是希望它有用,但不提供任何保证;甚至没有适用性或特定用途适用性的默许保证。有关更多详细信息,请参阅 GNU 通用公共许可证。