merge_cont_line_scan_xldmerge_cont_line_scan_xldMergeContLineScanXldMergeContLineScanXldmerge_cont_line_scan_xldmerge_cont_line_scan_xld
Short description
merge_cont_line_scan_xldmerge_cont_line_scan_xldMergeContLineScanXldMergeContLineScanXldmerge_cont_line_scan_xldmerge_cont_line_scan_xld — Merge XLD contours from successive line scan images.
Signature
merge_cont_line_scan_xld( xld_cont CurrConts, xld_cont PrevConts, out xld_cont CurrMergedConts, out xld_cont PrevMergedConts, integer ImageHeight, real Margin, string MergeBorder, integer MaxImagesCont )merge_cont_line_scan_xld( CurrConts, PrevConts : CurrMergedConts, PrevMergedConts : ImageHeight, Margin, MergeBorder, MaxImagesCont : )void MergeContLineScanXld( const HObject& CurrConts, const HObject& PrevConts, HObject* CurrMergedConts, HObject* PrevMergedConts, const HTuple& ImageHeight, const HTuple& Margin, const HTuple& MergeBorder, const HTuple& MaxImagesCont )static void HOperatorSet.MergeContLineScanXld( HObject currConts, HObject prevConts, out HObject currMergedConts, out HObject prevMergedConts, HTuple imageHeight, HTuple margin, HTuple mergeBorder, HTuple maxImagesCont )def merge_cont_line_scan_xld( curr_conts: HObject, prev_conts: HObject, image_height: int, margin: Union[float, int], merge_border: str, max_images_cont: int ) -> Tuple[HObject, HObject]
Herror merge_cont_line_scan_xld( const Hobject CurrConts, const Hobject PrevConts, Hobject* CurrMergedConts, Hobject* PrevMergedConts, const Hlong ImageHeight, double Margin, const char* MergeBorder, const Hlong MaxImagesCont )
Herror T_merge_cont_line_scan_xld( const Hobject CurrConts, const Hobject PrevConts, Hobject* CurrMergedConts, Hobject* PrevMergedConts, const Htuple ImageHeight, const Htuple Margin, const Htuple MergeBorder, const Htuple MaxImagesCont )
HXLDCont HXLDCont::MergeContLineScanXld( const HXLDCont& PrevConts, HXLDCont* PrevMergedConts, Hlong ImageHeight, const HTuple& Margin, const HString& MergeBorder, Hlong MaxImagesCont ) const
HXLDCont HXLDCont::MergeContLineScanXld( const HXLDCont& PrevConts, HXLDCont* PrevMergedConts, Hlong ImageHeight, double Margin, const HString& MergeBorder, Hlong MaxImagesCont ) const
HXLDCont HXLDCont::MergeContLineScanXld( const HXLDCont& PrevConts, HXLDCont* PrevMergedConts, Hlong ImageHeight, double Margin, const char* MergeBorder, Hlong MaxImagesCont ) const
HXLDCont HXLDCont::MergeContLineScanXld( const HXLDCont& PrevConts, HXLDCont* PrevMergedConts, Hlong ImageHeight, double Margin, const wchar_t* MergeBorder, Hlong MaxImagesCont ) const (Windows only)
HXLDCont HXLDCont.MergeContLineScanXld( HXLDCont prevConts, out HXLDCont prevMergedConts, int imageHeight, HTuple margin, string mergeBorder, int maxImagesCont )
HXLDCont HXLDCont.MergeContLineScanXld( HXLDCont prevConts, out HXLDCont prevMergedConts, int imageHeight, double margin, string mergeBorder, int maxImagesCont )
Description
The operator merge_cont_line_scan_xldMergeContLineScanXld connects adjacent XLD
contours, which were extracted from adjacent images with the height
ImageHeightimageHeightimage_height. This operator was especially designed to
connect contours that were extracted from images grabbed by a
line scan camera. CurrContscurrContscurr_conts contains the contours from the
current image and PrevContsprevContsprev_conts the contours from the previous
one.
With the help of the parameter MergeBordermergeBordermerge_border two cases can be
distinguished: If the top (first) line of the current image touches
the bottom (last) line of the previous image, MergeBordermergeBordermerge_border
must be set to 'top'"top", otherwise set MergeBordermergeBordermerge_border to
'bottom'"bottom". MergeBordermergeBordermerge_border defines a margin to the
border. Only those end points of the contours which are inside this
margin are considered for the following merging process.
If the operator merge_cont_line_scan_xldMergeContLineScanXld is used
recursively, the parameter MaxImagesContmaxImagesContmax_images_cont determines the
maximum number of images which are covered by a merged contour. All
points of the merged contour from an older image are removed.
The operator merge_cont_line_scan_xldMergeContLineScanXld returns two contour
arrays. PrevMergedContsprevMergedContsprev_merged_conts contains all those contours from the
previous input contours PrevContsprevContsprev_conts, which could not be merged
with a current contour. CurrMergedContscurrMergedContscurr_merged_conts collects all current
contours together with the merged parts from the previous images.
Merged contours will exceed the original image, because the previous
contours are moved upward (MergeBordermergeBordermerge_border='top'"top") or
downward (MergeBordermergeBordermerge_border='bottom'"bottom") according to the
image height.
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
CurrContscurrContscurr_conts (input_object) xld_cont(-array) → objectobjectHObjectHXLDContHObjectHobject
Current input contours.
PrevContsprevContsprev_conts (input_object) xld_cont(-array) → objectobjectHObjectHXLDContHObjectHobject
Merged contours from the previous iteration.
CurrMergedContscurrMergedContscurr_merged_conts (output_object) xld_cont(-array) → objectobjectHObjectHXLDContHObjectHobject *
Current contours, merged with old ones where applicable.
PrevMergedContsprevMergedContsprev_merged_conts (output_object) xld_cont(-array) → objectobjectHObjectHXLDContHObjectHobject *
Contours from the previous iteration which could not be
merged with the current ones.
ImageHeightimageHeightimage_height (input_control) integer → (integer)(integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)
Height of the line scan images.
Default: 512512
Suggested values: 240, 480, 512240, 480, 512
Marginmarginmargin (input_control) real → (real / integer)(real / integer)HTuple (double / Hlong)HTuple (double / int / long)Union[float, int]Htuple (double / Hlong)
Maximum distance of contours from the image border.
Default: 0.00.0
Suggested values: 0.0, 1.0, 2.0, 3.0, 4.0, 5.00.0, 1.0, 2.0, 3.0, 4.0, 5.0
MergeBordermergeBordermerge_border (input_control) string → (string)(string)HTuple (HString)HTuple (string)strHtuple (char*)
Image line of the current image, which touches the
previous image.
Default: 'top'"top"
List of values: 'bottom', 'top'"bottom", "top"
MaxImagesContmaxImagesContmax_images_cont (input_control) integer → (integer)(integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)
Maximum number of images covered by one contour.
Default: 33
Suggested values: 1, 2, 3, 4, 51, 2, 3, 4, 5
Result
The operator merge_cont_line_scan_xldMergeContLineScanXld returns the value 2 (H_MSG_TRUE)
if the given parameters are correct.
Otherwise, an exception will be raised.
Module
Foundation