merge_cont_line_scan_xldmerge_cont_line_scan_xldMergeContLineScanXldMergeContLineScanXldmerge_cont_line_scan_xld (算子)
名称
merge_cont_line_scan_xldmerge_cont_line_scan_xldMergeContLineScanXldMergeContLineScanXldmerge_cont_line_scan_xld — 合并连续线扫描图像中的 XLD 轮廓。
签名
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)
void MergeContLineScanXld(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)
static void HOperatorSet.MergeContLineScanXld(HObject currConts, HObject prevConts, out HObject currMergedConts, out HObject prevMergedConts, HTuple imageHeight, HTuple margin, HTuple mergeBorder, HTuple maxImagesCont)
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)
描述
算子 merge_cont_line_scan_xldmerge_cont_line_scan_xldMergeContLineScanXldMergeContLineScanXldMergeContLineScanXldmerge_cont_line_scan_xld connects adjacent XLD
contours, which were extracted from adjacent images with the height
ImageHeightImageHeightImageHeightImageHeightimageHeightimage_height. This operator was especially designed to
connect contours that were extracted from images grabbed by a
line scan camera. CurrContsCurrContsCurrContsCurrContscurrContscurr_conts contains the contours from the
current image and PrevContsPrevContsPrevContsPrevContsprevContsprev_conts the contours from the previous
one.
With the help of the parameter MergeBorderMergeBorderMergeBorderMergeBordermergeBordermerge_border two cases can be
distinguished: If the top (first) line of the current image touches
the bottom (last) line of the previous image, MergeBorderMergeBorderMergeBorderMergeBordermergeBordermerge_border
must be set to 'top'"top""top""top""top""top", otherwise set MergeBorderMergeBorderMergeBorderMergeBordermergeBordermerge_border to
'bottom'"bottom""bottom""bottom""bottom""bottom". MergeBorderMergeBorderMergeBorderMergeBordermergeBordermerge_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_xldmerge_cont_line_scan_xldMergeContLineScanXldMergeContLineScanXldMergeContLineScanXldmerge_cont_line_scan_xld is used
recursively, the parameter MaxImagesContMaxImagesContMaxImagesContMaxImagesContmaxImagesContmax_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.
算子 merge_cont_line_scan_xldmerge_cont_line_scan_xldMergeContLineScanXldMergeContLineScanXldMergeContLineScanXldmerge_cont_line_scan_xld returns two contour
arrays. PrevMergedContsPrevMergedContsPrevMergedContsPrevMergedContsprevMergedContsprev_merged_conts contains all those contours from the
previous input contours PrevContsPrevContsPrevContsPrevContsprevContsprev_conts, which could not be merged
with a current contour. CurrMergedContsCurrMergedContsCurrMergedContsCurrMergedContscurrMergedContscurr_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 (MergeBorderMergeBorderMergeBorderMergeBordermergeBordermerge_border='top'"top""top""top""top""top") or
downward (MergeBorderMergeBorderMergeBorderMergeBordermergeBordermerge_border='bottom'"bottom""bottom""bottom""bottom""bottom") according to the
image height.
执行信息
- 多线程类型:可重入(与非独占算子并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 未采用并行化处理。
参数
CurrContsCurrContsCurrContsCurrContscurrContscurr_conts (输入对象) xld_cont(-array) → objectHXLDContHObjectHXLDContHobject
Current input contours.
PrevContsPrevContsPrevContsPrevContsprevContsprev_conts (输入对象) xld_cont(-array) → objectHXLDContHObjectHXLDContHobject
Merged contours from the previous iteration.
CurrMergedContsCurrMergedContsCurrMergedContsCurrMergedContscurrMergedContscurr_merged_conts (输出对象) xld_cont(-array) → objectHXLDContHObjectHXLDContHobject *
Current contours, merged with old ones where applicable.
PrevMergedContsPrevMergedContsPrevMergedContsPrevMergedContsprevMergedContsprev_merged_conts (输出对象) xld_cont(-array) → objectHXLDContHObjectHXLDContHobject *
Contours from the previous iteration which could not be
merged with the current ones.
ImageHeightImageHeightImageHeightImageHeightimageHeightimage_height (输入控制) integer → HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Height of the line scan images.
默认值:
512
建议值:
240, 480, 512
MarginMarginMarginMarginmarginmargin (输入控制) real → HTupleUnion[float, int]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Maximum distance of contours from the image border.
默认值:
0.0
建议值:
0.0, 1.0, 2.0, 3.0, 4.0, 5.0
MergeBorderMergeBorderMergeBorderMergeBordermergeBordermerge_border (输入控制) string → HTuplestrHTupleHtuple (string) (string) (HString) (char*)
Image line of the current image, which touches the
previous image.
默认值:
'top'
"top"
"top"
"top"
"top"
"top"
值列表:
'bottom'"bottom""bottom""bottom""bottom""bottom", 'top'"top""top""top""top""top"
MaxImagesContMaxImagesContMaxImagesContMaxImagesContmaxImagesContmax_images_cont (输入控制) integer → HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Maximum number of images covered by one contour.
默认值:
3
建议值:
1, 2, 3, 4, 5
结果
算子 merge_cont_line_scan_xldmerge_cont_line_scan_xldMergeContLineScanXldMergeContLineScanXldMergeContLineScanXldmerge_cont_line_scan_xld 在给定的参数正确时返回值 2 ( H_MSG_TRUE )。否则,将抛出异常。
模块
基础