Skip to content

merge_regions_line_scanmerge_regions_line_scanMergeRegionsLineScanMergeRegionsLineScanmerge_regions_line_scanmerge_regions_line_scanπŸ”—

Short descriptionπŸ”—

merge_regions_line_scanmerge_regions_line_scanMergeRegionsLineScanMergeRegionsLineScanmerge_regions_line_scanmerge_regions_line_scan β€” Merge regions from line scan images.

SignatureπŸ”—

merge_regions_line_scan( region CurrRegions, region PrevRegions, out region CurrMergedRegions, out region PrevMergedRegions, integer ImageHeight, string MergeBorder, integer MaxImagesRegion )merge_regions_line_scan( CurrRegions, PrevRegions : CurrMergedRegions, PrevMergedRegions : ImageHeight, MergeBorder, MaxImagesRegion : )void MergeRegionsLineScan( const HObject& CurrRegions, const HObject& PrevRegions, HObject* CurrMergedRegions, HObject* PrevMergedRegions, const HTuple& ImageHeight, const HTuple& MergeBorder, const HTuple& MaxImagesRegion )static void HOperatorSet.MergeRegionsLineScan( HObject currRegions, HObject prevRegions, out HObject currMergedRegions, out HObject prevMergedRegions, HTuple imageHeight, HTuple mergeBorder, HTuple 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]

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 )

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)

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

DescriptionπŸ”—

The operator merge_regions_line_scanMergeRegionsLineScan connects adjacent regions, which were segmented from adjacent images with the height ImageHeightimageHeightimage_height. This operator was especially designed to process regions that were extracted from images grabbed by a line scan camera. CurrRegionscurrRegionscurr_regions contains the regions from the current image and PrevRegionsprevRegionsprev_regions the regions 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".

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

The operator merge_regions_line_scanMergeRegionsLineScan returns two region arrays. PrevMergedRegionsprevMergedRegionsprev_merged_regions contains all those regions from the previous input regions PrevRegionsprevRegionsprev_regions, which could not be merged with a current region. CurrMergedRegionscurrMergedRegionscurr_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 (MergeBordermergeBordermerge_border='top'"top") or downward (MergeBordermergeBordermerge_border='bottom'"bottom") according to the image height. For this the system parameter 'clip_region'"clip_region" (see alsoΒ set_systemSetSystem) will internally be set to 'false'"false".

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πŸ”—

CurrRegionscurrRegionscurr_regions (input_object) region(-array) β†’ objectobjectHObjectHRegionHObjectHobject

Current input regions.

PrevRegionsprevRegionsprev_regions (input_object) region(-array) β†’ objectobjectHObjectHRegionHObjectHobject

Merged regions from the previous iteration.

CurrMergedRegionscurrMergedRegionscurr_merged_regions (output_object) region(-array) β†’ objectobjectHObjectHRegionHObjectHobject *

Current regions, merged with old ones where applicable.

PrevMergedRegionsprevMergedRegionsprev_merged_regions (output_object) region(-array) β†’ objectobjectHObjectHRegionHObjectHobject *

Regions 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, 512, 1024240, 480, 512, 1024

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"

MaxImagesRegionmaxImagesRegionmax_images_region (input_control) integer β†’ (integer)(integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Maximum number of images for a single region.

Default: 33
Suggested values: 1, 2, 3, 4, 51, 2, 3, 4, 5

ResultπŸ”—

The operator merge_regions_line_scanMergeRegionsLineScan returns the value 2 (H_MSG_TRUE) if the given parameters are correct. Otherwise, an exception will be raised.

ModuleπŸ”—

Foundation