Skip to main content

基于分水岭范式的图像分割算法

项目描述

请参阅模块 API 页面

https://engineering.purdue.edu/kak/distWatershed/Watershed-2.2.2.html

获取与此模块相关的所有信息,包括与代码的最新更改相关的信息。上面显示的 URL 中的页面列出了您可以在自己的代码中调用的所有模块功能。该页面还介绍了如何在自己的代码中直接访问分段的 blob,以及如何在图像分段之前将滤色器应用于图像。

关于模块的基本用途,它是用于图像分割的分水岭算法的 Python 实现。此实现允许对图像进行全自动和标记辅助分割。

典型使用语法:

    from Watershed import *
    shed = Watershed(
               data_image = "orchid0001.jpg",
               binary_or_gray_or_color = "color",
               size_for_calculations = 128,
               sigma = 1,
               gradient_threshold_as_fraction = 0.1,
               level_decimation_factor = 16,
               padding = 20,
           )
    shed.extract_data_pixels()
    shed.display_data_image()
    shed.mark_image_regions_for_gradient_mods()                     #(A)
    shed.compute_gradient_image()
    shed.modify_gradients_with_marker_minima()                      #(B)
    shed.compute_Z_level_sets_for_gradient_image()
    shed.propagate_influence_zones_from_bottom_to_top_of_Z_levels()
    shed.display_watershed()
    shed.display_watershed_in_color()
    shed.extract_watershed_contours_seperated()
    shed.display_watershed_contours_in_color()

The statements in lines (A) and (B) are needed only for marker-assisted
segmentation with the module.  For a fully automated implemented of the
BLM algorithm, you would need to delete those two statements.

项目详情


下载文件

下载适用于您平台的文件。如果您不确定要选择哪个,请了解有关安装包的更多信息。

源分布

Watershed-2.2.2.tar.gz (12.9 MB 查看哈希

已上传 source