hamming_change_regionhamming_change_regionHammingChangeRegionHammingChangeRegionhamming_change_region (Operator)

名称

hamming_change_regionhamming_change_regionHammingChangeRegionHammingChangeRegionhamming_change_region — Generate a region having a given Hamming distance.

警告

hamming_change_regionhamming_change_regionHammingChangeRegionHammingChangeRegionHammingChangeRegionhamming_change_region is obsolete and is only provided for reasons of backward compatibility.

签名

hamming_change_region(InputRegion : OutputRegion : Width, Height, Distance : )

Herror hamming_change_region(const Hobject InputRegion, Hobject* OutputRegion, const Hlong Width, const Hlong Height, const Hlong Distance)

Herror T_hamming_change_region(const Hobject InputRegion, Hobject* OutputRegion, const Htuple Width, const Htuple Height, const Htuple Distance)

void HammingChangeRegion(const HObject& InputRegion, HObject* OutputRegion, const HTuple& Width, const HTuple& Height, const HTuple& Distance)

HRegion HRegion::HammingChangeRegion(Hlong Width, Hlong Height, Hlong Distance) const

static void HOperatorSet.HammingChangeRegion(HObject inputRegion, out HObject outputRegion, HTuple width, HTuple height, HTuple distance)

HRegion HRegion.HammingChangeRegion(int width, int height, int distance)

def hamming_change_region(input_region: HObject, width: int, height: int, distance: int) -> HObject

描述

hamming_change_regionhamming_change_regionHammingChangeRegionHammingChangeRegionHammingChangeRegionhamming_change_region changes the region in the left upper part of the image given by WidthWidthWidthWidthwidthwidth and HeightHeightHeightHeightheightheight such that the resulting regions have a Hamming distance of DistanceDistanceDistanceDistancedistancedistance to the input regions. This is done by adding or removing DistanceDistanceDistanceDistancedistancedistance points from the input region.

注意

If WidthWidthWidthWidthwidthwidth and HeightHeightHeightHeightheightheight are chosen too large the resulting region requires a lot of memory.

执行信息

参数

InputRegionInputRegionInputRegionInputRegioninputRegioninput_region (input_object)  region(-array) objectHRegionHObjectHRegionHobject

Region to be modified.

OutputRegionOutputRegionOutputRegionOutputRegionoutputRegionoutput_region (output_object)  region(-array) objectHRegionHObjectHRegionHobject *

Regions having the required Hamming distance.

WidthWidthWidthWidthwidthwidth (input_control)  extent.x HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Width of the region to be changed.

默认值: 100

建议值: 64, 128, 256, 512

值范围: 1 ≤ Width Width Width Width width width ≤ 512 (lin)

最小增量: 1

建议增量: 10

限制: Width > 0

HeightHeightHeightHeightheightheight (input_control)  extent.y HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Height of the region to be changed.

默认值: 100

建议值: 64, 128, 256, 512

值范围: 1 ≤ Height Height Height Height height height ≤ 512 (lin)

最小增量: 1

建议增量: 10

限制: Height > 0

DistanceDistanceDistanceDistancedistancedistance (input_control)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Hamming distance between the old and new regions.

默认值: 1000

建议值: 100, 500, 1000, 5000, 10000

值范围: 0 ≤ Distance Distance Distance Distance distance distance ≤ 10000 (lin)

最小增量: 1

建议增量: 10

限制: Distance >= 0 && Distance < Width * Height

Complexity

Memory requirement of the generated region (worst case): O(2 * WidthWidthWidthWidthwidthwidth * HeightHeightHeightHeightheightheight).

结果

hamming_change_regionhamming_change_regionHammingChangeRegionHammingChangeRegionHammingChangeRegionhamming_change_region returns 2 ( H_MSG_TRUE) if all parameters are correct. The behavior in case of empty input (no regions given) can be set via set_system('no_object_result',<Result>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)set_system("no_object_result",<Result>). If necessary, an exception is raised.

可能的前置算子

connectionconnectionConnectionConnectionConnectionconnection, regiongrowingregiongrowingRegiongrowingRegiongrowingRegiongrowingregiongrowing, pouringpouringPouringPouringPouringpouring, class_ndim_normclass_ndim_normClassNdimNormClassNdimNormClassNdimNormclass_ndim_norm

可能的后继算子

select_shapeselect_shapeSelectShapeSelectShapeSelectShapeselect_shape

另见

hamming_distancehamming_distanceHammingDistanceHammingDistanceHammingDistancehamming_distance

模块

Foundation