HALCON Reference Manual 10.0.2
Table of Contents / XLD / Creation ClassesClassesClasses | | | Operators

mod_parallels_xldmod_parallels_xldmod_parallels_xldModParallelsXldModParallelsXld (Operator)

Name

mod_parallels_xldmod_parallels_xldmod_parallels_xldModParallelsXldModParallelsXld — Extract parallel XLD polygons enclosing a homogeneous area.

Signature

mod_parallels_xld(Parallels, Image : ModParallels, ExtParallels : Quality, MinGray, MaxGray, MaxStandard : )

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)

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

HXLDModParaArray HXLDParaArray::ModParallelsXld(const HImage& Image, HXLDExtParaArray* ExtParallels, const HTuple& Quality, const HTuple& MinGray, const HTuple& MaxGray, const HTuple& MaxStandard) const

void HOperatorSetX.ModParallelsXld(
[in] IHUntypedObjectX* Parallels, [in] IHUntypedObjectX* Image, [out] IHUntypedObjectX*ModParallels, [out] IHUntypedObjectX*ExtParallels, [in] VARIANT Quality, [in] VARIANT MinGray, [in] VARIANT MaxGray, [in] VARIANT MaxStandard)

IHXLDModParaX* HXLDParaX.ModParallelsXld(
[in] IHImageX* Image, [out] IHXLDExtParaX*ExtParallels, [in] VARIANT Quality, [in] Hlong MinGray, [in] Hlong MaxGray, [in] VARIANT MaxStandard)

static void HOperatorSet.ModParallelsXld(HObject parallels, HObject image, out HObject modParallels, out HObject extParallels, HTuple quality, HTuple minGray, HTuple maxGray, HTuple maxStandard)

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_xldmod_parallels_xldmod_parallels_xldModParallelsXldModParallelsXld selects XLD parallels enclosing homogeneous areas from the input parallels ParallelsParallelsParallelsParallelsparallels. The parameter ImageImageImageImageimage contains the corresponding gray value image.

Only parallels having a quality factor larger than QualityQualityQualityQualityquality 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 [MinGrayMinGrayMinGrayMinGrayminGray,MaxGrayMaxGrayMaxGrayMaxGraymaxGray], and if the mean of all standard deviations is smaller than the upper threshold MaxStandardMaxStandardMaxStandardMaxStandardmaxStandard, the corresponding parallels are returned as modified parallels in ModParallelsModParallelsModParallelsModParallelsmodParallels.

In a second step, all polygon segments adjacent to parallels bordering homogeneous areas are checked for homogeneity. To do so, a rectangle having the witdth 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 ExtParallelsExtParallelsExtParallelsExtParallelsextParallels.

Parallelization

Parameters

ParallelsParallelsParallelsParallelsparallels (input_object)  xld_para-array objectHXLDParaHXLDParaArrayHXLDParaXHobject

Input XLD parallels.

ImageImageImageImageimage (input_object)  image objectHImageHImageHImageXHobject (byte)

Corresponding gray value image.

ModParallelsModParallelsModParallelsModParallelsmodParallels (output_object)  xld_mod_para-array objectHXLDModParaHXLDModParaArrayHXLDModParaXHobject *

Modified XLD parallels.

ExtParallelsExtParallelsExtParallelsExtParallelsextParallels (output_object)  xld_ext_para-array objectHXLDExtParaHXLDExtParaArrayHXLDExtParaXHobject *

Modified XLD parallels.

QualityQualityQualityQualityquality (input_control)  number HTupleHTupleVARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (double / Hlong)

Minimum quality factor (measure of parallelism).

Default value: 0.4

Suggested values: 0.1, 0.2, 0.3, 0.4, 0.5, 0.6

Restriction: (0.0 <= Quality) && (Quality <= 1.0)

MinGrayMinGrayMinGrayMinGrayminGray (input_control)  integer HTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong)

Minimum mean gray value.

Default value: 160

Suggested values: 80, 100, 120, 140, 160, 180

Restriction: (0 <= MinGray) && (MinGray <= 255)

MaxGrayMaxGrayMaxGrayMaxGraymaxGray (input_control)  integer HTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong)

Maximum mean gray value.

Default value: 220

Suggested values: 140, 160, 180, 200, 220, 240

Restriction: ((0 <= MaxGray) && (MaxGray <= 255)) && (MaxGray >= MinGray)

MaxStandardMaxStandardMaxStandardMaxStandardmaxStandard (input_control)  number HTupleHTupleVARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (double / Hlong)

Maximum allowed standard deviation.

Default value: 10.0

Suggested values: 5.0, 10.0, 15.0, 20.0

Restriction: MaxStandard >= 0.0

Possible Predecessors

gen_parallels_xldgen_parallels_xldgen_parallels_xldGenParallelsXldGenParallelsXld

Possible Successors

max_parallels_xldmax_parallels_xldmax_parallels_xldMaxParallelsXldMaxParallelsXld

See also

info_parallels_xldinfo_parallels_xldinfo_parallels_xldInfoParallelsXldInfoParallelsXld

Module

Foundation


Table of Contents / XLD / Creation ClassesClassesClasses | | | Operators
HALCON Reference Manual 10.0.2 Copyright © 1996-2011 MVTec Software GmbH