area_holesarea_holesAreaHolesAreaHolesarea_holes (算子名称)

名称

area_holesarea_holesAreaHolesAreaHolesarea_holes — Compute the area of holes of regions.

参数签名

area_holes(区域 : : : Area)

Herror area_holes(const Hobject 区域, Hlong* Area)

Herror T_area_holes(const Hobject 区域, Htuple* Area)

void AreaHoles(const HObject& 区域, HTuple* Area)

HTuple HRegion::AreaHoles() const

static void HOperatorSet.AreaHoles(HObject 区域, out HTuple area)

HTuple HRegion.AreaHoles()

def area_holes(区域: HObject) -> Sequence[int]

def area_holes_s(区域: HObject) -> int

描述

The operator area_holesarea_holesAreaHolesAreaHolesAreaHolesarea_holes calculates the area of the holes in the input regions. The area is defined as the number of pixels contained in the holes. If a region has more than one hole the sum of the areas of all holes in this region are returned. The neighborhood type is set via set_system('neighborhood',<4/8>)set_system("neighborhood",<4/8>)SetSystem("neighborhood",<4/8>)SetSystem("neighborhood",<4/8>)SetSystem("neighborhood",<4/8>)set_system("neighborhood",<4/8>) (default: 8-neighborhood).

In the documentation of this chapter (Regions / Features), you can find an image illustrating regions which vary in the area of their holes.

If more than one region is passed the results are stored in tuples with the index of a value in the tuple corresponding to the index of the input region. In case of an empty region the area has the value 0.

运行信息

参数表

区域区域区域区域区域区域 (input_object)  region(-array) objectHRegionHObjectHRegionHobject

Region(s) to be examined.

AreaAreaAreaAreaareaarea (output_control)  integer(-array) HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Area(s) of holes of the region(s).

例程 (HDevelop)

read_image(Image,'modules/modules_01')
threshold(Image,Region,50,250)
area_holes(Region,Area)

结果

The operator area_holesarea_holesAreaHolesAreaHolesAreaHolesarea_holes returns 2 ( H_MSG_TRUE) if all parameters are correct.

可能的前置算子

thresholdthresholdThresholdThresholdThresholdthreshold, regiongrowingregiongrowingRegiongrowingRegiongrowingRegiongrowingregiongrowing, connectionconnectionConnectionConnectionConnectionconnection

参考其它

area_centerarea_centerAreaCenterAreaCenterAreaCenterarea_center, fill_upfill_upFillUpFillUpFillUpfill_up

模块

Foundation