merge_regions_line_scanmerge_regions_line_scanMergeRegionsLineScanMergeRegionsLineScanmerge_regions_line_scan (算子)

名称

merge_regions_line_scanmerge_regions_line_scanMergeRegionsLineScanMergeRegionsLineScanmerge_regions_line_scan — 合并线扫描图像中的区域。

签名

merge_regions_line_scan(CurrRegions, PrevRegions : CurrMergedRegions, PrevMergedRegions : ImageHeight, MergeBorder, MaxImagesRegion : )

Herror merge_regions_line_scan(const Hobject CurrRegions, const Hobject PrevRegions, Hobject* CurrMergedRegions, Hobject* PrevMergedRegions, const Hlong ImageHeight, const char* MergeBorder, const Hlong MaxImagesRegion)

Herror T_merge_regions_line_scan(const Hobject CurrRegions, const Hobject PrevRegions, Hobject* CurrMergedRegions, Hobject* PrevMergedRegions, const Htuple ImageHeight, const Htuple MergeBorder, const Htuple MaxImagesRegion)

void MergeRegionsLineScan(const HObject& CurrRegions, const HObject& PrevRegions, HObject* CurrMergedRegions, HObject* PrevMergedRegions, const HTuple& ImageHeight, const HTuple& MergeBorder, const HTuple& MaxImagesRegion)

HRegion HRegion::MergeRegionsLineScan(const HRegion& PrevRegions, HRegion* PrevMergedRegions, Hlong ImageHeight, const HString& MergeBorder, Hlong MaxImagesRegion) const

HRegion HRegion::MergeRegionsLineScan(const HRegion& PrevRegions, HRegion* PrevMergedRegions, Hlong ImageHeight, const char* MergeBorder, Hlong MaxImagesRegion) const

HRegion HRegion::MergeRegionsLineScan(const HRegion& PrevRegions, HRegion* PrevMergedRegions, Hlong ImageHeight, const wchar_t* MergeBorder, Hlong MaxImagesRegion) const   ( Windows only)

static void HOperatorSet.MergeRegionsLineScan(HObject currRegions, HObject prevRegions, out HObject currMergedRegions, out HObject prevMergedRegions, HTuple imageHeight, HTuple mergeBorder, HTuple maxImagesRegion)

HRegion HRegion.MergeRegionsLineScan(HRegion prevRegions, out HRegion prevMergedRegions, int imageHeight, string mergeBorder, int maxImagesRegion)

def merge_regions_line_scan(curr_regions: HObject, prev_regions: HObject, image_height: int, merge_border: str, max_images_region: int) -> Tuple[HObject, HObject]

描述

算子 merge_regions_line_scanmerge_regions_line_scanMergeRegionsLineScanMergeRegionsLineScanMergeRegionsLineScanmerge_regions_line_scan connects adjacent regions, which were segmented from adjacent images with the height ImageHeightImageHeightImageHeightImageHeightimageHeightimage_height. This operator was especially designed to process regions that were extracted from images grabbed by a line scan camera. CurrRegionsCurrRegionsCurrRegionsCurrRegionscurrRegionscurr_regions contains the regions from the current image and PrevRegionsPrevRegionsPrevRegionsPrevRegionsprevRegionsprev_regions the regions 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".

If the operator merge_regions_line_scanmerge_regions_line_scanMergeRegionsLineScanMergeRegionsLineScanMergeRegionsLineScanmerge_regions_line_scan is used recursively, the parameter MaxImagesRegionMaxImagesRegionMaxImagesRegionMaxImagesRegionmaxImagesRegionmax_images_region determines the maximum number of images which are covered by a merged region. All older region parts are removed.

算子 merge_regions_line_scanmerge_regions_line_scanMergeRegionsLineScanMergeRegionsLineScanMergeRegionsLineScanmerge_regions_line_scan returns two region arrays. PrevMergedRegionsPrevMergedRegionsPrevMergedRegionsPrevMergedRegionsprevMergedRegionsprev_merged_regions contains all those regions from the previous input regions PrevRegionsPrevRegionsPrevRegionsPrevRegionsprevRegionsprev_regions, which could not be merged with a current region. CurrMergedRegionsCurrMergedRegionsCurrMergedRegionsCurrMergedRegionscurrMergedRegionscurr_merged_regions collects all current regions together with the merged parts from the previous images. Merged regions will exceed the original image, because the previous regions 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. For this the system parameter 'clip_region'"clip_region""clip_region""clip_region""clip_region""clip_region" (see also set_systemset_systemSetSystemSetSystemSetSystemset_system) will internally be set to 'false'"false""false""false""false""false".

执行信息

参数

CurrRegionsCurrRegionsCurrRegionsCurrRegionscurrRegionscurr_regions (输入对象)  region(-array) objectHRegionHObjectHRegionHobject

Current input regions.

PrevRegionsPrevRegionsPrevRegionsPrevRegionsprevRegionsprev_regions (输入对象)  region(-array) objectHRegionHObjectHRegionHobject

Merged regions from the previous iteration.

CurrMergedRegionsCurrMergedRegionsCurrMergedRegionsCurrMergedRegionscurrMergedRegionscurr_merged_regions (输出对象)  region(-array) objectHRegionHObjectHRegionHobject *

Current regions, merged with old ones where applicable.

PrevMergedRegionsPrevMergedRegionsPrevMergedRegionsPrevMergedRegionsprevMergedRegionsprev_merged_regions (输出对象)  region(-array) objectHRegionHObjectHRegionHobject *

Regions 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, 1024

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"

MaxImagesRegionMaxImagesRegionMaxImagesRegionMaxImagesRegionmaxImagesRegionmax_images_region (输入控制)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Maximum number of images for a single region.

默认值: 3

建议值: 1, 2, 3, 4, 5

结果

算子 merge_regions_line_scanmerge_regions_line_scanMergeRegionsLineScanMergeRegionsLineScanMergeRegionsLineScanmerge_regions_line_scan 在给定的参数正确时返回值 2 ( H_MSG_TRUE )。否则,将抛出异常。

模块

基础