watersheds_thresholdwatersheds_thresholdWatershedsThresholdWatershedsThresholdwatersheds_threshold(算子)

名称

watersheds_thresholdwatersheds_thresholdWatershedsThresholdWatershedsThresholdwatersheds_threshold — 使用阈值从图像中提取分水岭盆地。

签名

watersheds_threshold(Image : Basins : Threshold : )

Herror watersheds_threshold(const Hobject Image, Hobject* Basins, const Hlong Threshold)

Herror T_watersheds_threshold(const Hobject Image, Hobject* Basins, const Htuple Threshold)

void WatershedsThreshold(const HObject& Image, HObject* Basins, const HTuple& Threshold)

HRegion HImage::WatershedsThreshold(const HTuple& Threshold) const

HRegion HImage::WatershedsThreshold(Hlong Threshold) const

static void HOperatorSet.WatershedsThreshold(HObject image, out HObject basins, HTuple threshold)

HRegion HImage.WatershedsThreshold(HTuple threshold)

HRegion HImage.WatershedsThreshold(int threshold)

def watersheds_threshold(image: HObject, threshold: Union[float, int]) -> HObject

描述

算子 watersheds_thresholdwatersheds_thresholdWatershedsThresholdWatershedsThresholdWatershedsThresholdwatersheds_threshold segments regions (basins) that are separated from each other by a watershed that has a height of at least ThresholdThresholdThresholdThresholdthresholdthreshold

In the first step, watersheds_thresholdwatersheds_thresholdWatershedsThresholdWatershedsThresholdWatershedsThresholdwatersheds_threshold computes the watersheds without applying a threshold, resulting in the same basins that would be obtained when calling watershedswatershedsWatershedsWatershedsWatershedswatersheds (for more details please refer to the description of watershedswatershedsWatershedsWatershedsWatershedswatersheds). In the second step, the basins are successively merged if they are separated by a watershed that is smaller than ThresholdThresholdThresholdThresholdthresholdthreshold. Let and be the minimum gray values of two neighboring basins and W the minimum gray value of the watershed that separates the two basins. The watershed is eliminated and the two basins are merged if The thus obtained basins are returned in BasinsBasinsBasinsBasinsbasinsbasins

If ThresholdThresholdThresholdThresholdthresholdthreshold is set to 0, watersheds_thresholdwatersheds_thresholdWatershedsThresholdWatershedsThresholdWatershedsThresholdwatersheds_threshold is comparable to watershedswatershedsWatershedsWatershedsWatershedswatersheds except that no watersheds but only expanded basins are returned. If ThresholdThresholdThresholdThresholdthresholdthreshold is set to the maximum gray value range of ImageImageImageImageimageimage then no two basins are separated by a watershed exceeding ThresholdThresholdThresholdThresholdthresholdthreshold, and hence, BasinsBasinsBasinsBasinsbasinsbasins will contain only one region.

执行信息

参数

ImageImageImageImageimageimage (输入对象)  singlechannelimage objectHImageHObjectHImageHobject (byte / uint2 / real)

Image to be segmented.

BasinsBasinsBasinsBasinsbasinsbasins (输出对象)  region-array objectHRegionHObjectHRegionHobject *

Segments found (dark basins).

ThresholdThresholdThresholdThresholdthresholdthreshold (输入控制)  number HTupleUnion[float, int]HTupleHtuple (integer / real) (int / long / double) (Hlong / double) (Hlong / double)

Threshold for the watersheds.

默认值: 10

建议值: 0, 5, 10, 20, 30, 50

限制: Threshold >= 0

结果

watershedswatershedsWatershedsWatershedsWatershedswatersheds always 返回 2 (H_MSG_TRUE)。 The behavior with respect to the input image and output regions can be determined by setting the values of the flags 'no_object_result'"no_object_result""no_object_result""no_object_result""no_object_result""no_object_result", 'empty_region_result'"empty_region_result""empty_region_result""empty_region_result""empty_region_result""empty_region_result", and 'store_empty_region'"store_empty_region""store_empty_region""store_empty_region""store_empty_region""store_empty_region" with set_systemset_systemSetSystemSetSystemSetSystemset_system。如有必要,则抛出异常。

可能的前趋

binomial_filterbinomial_filterBinomialFilterBinomialFilterBinomialFilterbinomial_filter, gauss_filtergauss_filterGaussFilterGaussFilterGaussFiltergauss_filter, smooth_imagesmooth_imageSmoothImageSmoothImageSmoothImagesmooth_image, invert_imageinvert_imageInvertImageInvertImageInvertImageinvert_image

可能的后继

expand_regionexpand_regionExpandRegionExpandRegionExpandRegionexpand_region, select_shapeselect_shapeSelectShapeSelectShapeSelectShapeselect_shape, reduce_domainreduce_domainReduceDomainReduceDomainReduceDomainreduce_domain, openingopeningOpeningOpeningOpeningopening

替代

watershedswatershedsWatershedsWatershedsWatershedswatersheds, pouringpouringPouringPouringPouringpouring, watersheds_markerwatersheds_markerWatershedsMarkerWatershedsMarkerWatershedsMarkerwatersheds_marker

模块

基础