Skip to content

hamming_change_regionhamming_change_regionHammingChangeRegionHammingChangeRegionhamming_change_regionhamming_change_region🔗

Short description🔗

hamming_change_regionhamming_change_regionHammingChangeRegionHammingChangeRegionhamming_change_regionhamming_change_region — Generate a region having a given Hamming distance.

Warning🔗

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

Signature🔗

hamming_change_region( region InputRegion, out region OutputRegion, extent.x Width, extent.y Height, integer Distance )hamming_change_region( InputRegion : OutputRegion : Width, Height, Distance : )void HammingChangeRegion( const HObject& InputRegion, HObject* OutputRegion, const HTuple& Width, const HTuple& Height, const HTuple& Distance )static void HOperatorSet.HammingChangeRegion( HObject inputRegion, out HObject outputRegion, HTuple width, HTuple height, HTuple distance )def hamming_change_region( input_region: HObject, width: int, height: int, distance: int ) -> HObject

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 )

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

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

Description🔗

hamming_change_regionHammingChangeRegion changes the region in the left upper part of the image given by Widthwidthwidth and Heightheightheight such that the resulting regions have a Hamming distance of Distancedistancedistance to the input regions. This is done by adding or removing Distancedistancedistance points from the input region.

Attention🔗

If Widthwidthwidth and Heightheightheight are chosen too large the resulting region requires a lot of memory.

Execution information🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Automatically parallelized on tuple level.

Parameters🔗

InputRegioninputRegioninput_region (input_object) region(-array) → objectobjectHObjectHRegionHObjectHobject

Region to be modified.

OutputRegionoutputRegionoutput_region (output_object) region(-array) → objectobjectHObjectHRegionHObjectHobject *

Regions having the required Hamming distance.

Widthwidthwidth (input_control) extent.x → (integer)(integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Width of the region to be changed.

Default: 100100
Suggested values: 64, 128, 256, 51264, 128, 256, 512
Value range: 1 ≤ Width ≤ 512 (lin)
Minimum increment: 1
Recommended increment: 10
Restriction: Width > 0

Heightheightheight (input_control) extent.y → (integer)(integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Height of the region to be changed.

Default: 100100
Suggested values: 64, 128, 256, 51264, 128, 256, 512
Value range: 1 ≤ Height ≤ 512 (lin)
Minimum increment: 1
Recommended increment: 10
Restriction: Height > 0

Distancedistancedistance (input_control) integer → (integer)(integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Hamming distance between the old and new regions.

Default: 10001000
Suggested values: 100, 500, 1000, 5000, 10000100, 500, 1000, 5000, 10000
Value range: 0 ≤ Distance ≤ 10000 (lin)
Minimum increment: 1
Recommended increment: 10
Restriction: Distance >= 0 && Distance < Width * Height

Complexity🔗

Memory requirement of the generated region (worst case): \(O(2 * \textrm{Width} * \textrm{Height})\).

Result🔗

hamming_change_regionHammingChangeRegion 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>). If necessary, an exception is raised.

Combinations with other operators🔗

Combinations

Possible predecessors

connectionConnection, regiongrowingRegiongrowing, pouringPouring, class_ndim_normClassNdimNorm

Possible successors

select_shapeSelectShape

See also

hamming_distanceHammingDistance

Module🔗

Foundation