Skip to content

mod_parallels_xldModParallelsXldModParallelsXldmod_parallels_xldmod_parallels_xld🔗

Short description🔗

mod_parallels_xldModParallelsXldModParallelsXldmod_parallels_xldmod_parallels_xld — Extract parallel XLD polygons enclosing a homogeneous area.

Signature🔗

mod_parallels_xld( xld_para Parallels, image Image, out xld_mod_para ModParallels, out xld_ext_para ExtParallels, number Quality, integer MinGray, integer MaxGray, number MaxStandard )void ModParallelsXld( const HObject& Parallels, const HObject& Image, HObject* ModParallels, HObject* ExtParallels, const HTuple& Quality, const HTuple& MinGray, const HTuple& MaxGray, const HTuple& MaxStandard )static void HOperatorSet.ModParallelsXld( HObject parallels, HObject image, out HObject modParallels, out HObject extParallels, HTuple quality, HTuple minGray, HTuple maxGray, HTuple maxStandard )def mod_parallels_xld( parallels: HObject, image: HObject, quality: Union[float, int], min_gray: int, max_gray: int, max_standard: Union[float, int] ) -> Tuple[HObject, HObject]

Herror mod_parallels_xld( const Hobject Parallels, const Hobject Image, Hobject* ModParallels, Hobject* ExtParallels, double Quality, const Hlong MinGray, const Hlong MaxGray, double MaxStandard )

Herror T_mod_parallels_xld( const Hobject Parallels, const Hobject Image, Hobject* ModParallels, Hobject* ExtParallels, const Htuple Quality, const Htuple MinGray, const Htuple MaxGray, const Htuple MaxStandard )

HXLDModPara HXLDPara::ModParallelsXld( const HImage& Image, HXLDExtPara* ExtParallels, const HTuple& Quality, Hlong MinGray, Hlong MaxGray, const HTuple& MaxStandard ) const

HXLDModPara HXLDPara::ModParallelsXld( const HImage& Image, HXLDExtPara* ExtParallels, double Quality, Hlong MinGray, Hlong MaxGray, double MaxStandard ) const

HXLDModPara HXLDPara.ModParallelsXld( HImage image, out HXLDExtPara extParallels, HTuple quality, int minGray, int maxGray, HTuple maxStandard )

HXLDModPara HXLDPara.ModParallelsXld( HImage image, out HXLDExtPara extParallels, double quality, int minGray, int maxGray, double maxStandard )

Description🔗

mod_parallels_xldModParallelsXld selects XLD parallels enclosing homogeneous areas from the input parallels Parallelsparallelsparallels. The parameter Imageimageimage contains the corresponding gray value image.

Only parallels having a quality factor larger than Qualityqualityquality are examined. The algorithm performs parallel cross sections one pixel apart, and parallel to the line segments in the area of overlap between two parallel line segments.

In the first iteration, the mean gray value for each of the lines in the cross section is calculated. In the second iteration, the standard deviations of the gray values along each line are computed.

If the mean gray value of an area between parallels lies in the interval [MinGrayminGraymin_gray,MaxGraymaxGraymax_gray], and if the mean of all standard deviations is smaller than the upper threshold MaxStandardmaxStandardmax_standard, the corresponding parallels are returned as modified parallels in ModParallelsmodParallelsmod_parallels.

In a second step, all polygon segments adjacent to parallels bordering homogeneous areas are checked for homogeneity. To do so, a rectangle having the width of the last area enclosed by a modified parallel is constructed, and checked for homogeneity using the algorithm described above. This process is continued as long as there are adjacent polygon segments. The polygons thus found are returned as extended parallels in ExtParallelsextParallelsext_parallels.

Execution information🔗

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

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

  • Processed without parallelization.

Parameters🔗

Parallelsparallelsparallels (input_object) xld_para-array → objectHObjectHXLDParaHObjectHobject

Input XLD parallels.

Imageimageimage (input_object) singlechannelimage → object (byte)HObject (byte)HImage (byte)HObject (byte)Hobject (byte)

Corresponding gray value image.

ModParallelsmodParallelsmod_parallels (output_object) xld_mod_para-array → objectHObjectHXLDModParaHObjectHobject *

Modified XLD parallels.

ExtParallelsextParallelsext_parallels (output_object) xld_ext_para-array → objectHObjectHXLDExtParaHObjectHobject *

Extended XLD parallels.

Qualityqualityquality (input_control) number → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)Union[float, int]Htuple (double / Hlong)

Minimum quality factor (measure of parallelism).

Default: 0.40.4
Suggested values: 0.1, 0.2, 0.3, 0.4, 0.5, 0.60.1, 0.2, 0.3, 0.4, 0.5, 0.6
Restriction: 0.0 <= Quality && Quality <= 1.0

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

Minimum mean gray value.

Default: 160160
Suggested values: 80, 100, 120, 140, 160, 18080, 100, 120, 140, 160, 180
Restriction: 0 <= MinGray && MinGray <= 255

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

Maximum mean gray value.

Default: 220220
Suggested values: 140, 160, 180, 200, 220, 240140, 160, 180, 200, 220, 240
Restriction: 0 <= MaxGray && MaxGray <= 255 && MaxGray >= MinGray

MaxStandardmaxStandardmax_standard (input_control) number → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)Union[float, int]Htuple (double / Hlong)

Maximum allowed standard deviation.

Default: 10.010.0
Suggested values: 5.0, 10.0, 15.0, 20.05.0, 10.0, 15.0, 20.0
Restriction: MaxStandard >= 0.0

Combinations with other operators🔗

Combinations

Possible predecessors

gen_parallels_xldGenParallelsXld

Possible successors

max_parallels_xldMaxParallelsXld

See also

info_parallels_xldInfoParallelsXld

Module🔗

Foundation