merge_regions_line_scanmerge_regions_line_scanMergeRegionsLineScanMergeRegionsLineScanmerge_regions_line_scan (Operator)
merge_regions_line_scanmerge_regions_line_scanMergeRegionsLineScanMergeRegionsLineScanmerge_regions_line_scan
— Merge regions from line scan images.
Signature
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)
Description
The operator merge_regions_line_scanmerge_regions_line_scanMergeRegionsLineScanMergeRegionsLineScanmerge_regions_line_scan
connects adjacent
regions, which were segmented from adjacent images with the height
ImageHeightImageHeightImageHeightimageHeightimage_height
. This operator was especially designed to
process regions that were extracted from images grabbed by a
line scan camera. CurrRegionsCurrRegionsCurrRegionscurrRegionscurr_regions
contains the regions from the
current image and PrevRegionsPrevRegionsPrevRegionsprevRegionsprev_regions
the regions from the previous
one.
With the help of the parameter MergeBorderMergeBorderMergeBordermergeBordermerge_border
two cases can be
distinguished: If the top (first) line of the current image touches
the bottom (last) line of the previous image, MergeBorderMergeBorderMergeBordermergeBordermerge_border
must be set to 'top'"top""top""top""top", otherwise set MergeBorderMergeBorderMergeBordermergeBordermerge_border
to
'bottom'"bottom""bottom""bottom""bottom".
If the operator merge_regions_line_scanmerge_regions_line_scanMergeRegionsLineScanMergeRegionsLineScanmerge_regions_line_scan
is used
recursively, the parameter MaxImagesRegionMaxImagesRegionMaxImagesRegionmaxImagesRegionmax_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_scanmerge_regions_line_scanMergeRegionsLineScanMergeRegionsLineScanmerge_regions_line_scan
returns two region
arrays. PrevMergedRegionsPrevMergedRegionsPrevMergedRegionsprevMergedRegionsprev_merged_regions
contains all those regions from
the previous input regions PrevRegionsPrevRegionsPrevRegionsprevRegionsprev_regions
, which could not be
merged with a current region. CurrMergedRegionsCurrMergedRegionsCurrMergedRegionscurrMergedRegionscurr_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
(MergeBorderMergeBorderMergeBordermergeBordermerge_border
='top'"top""top""top""top") or downward
(MergeBorderMergeBorderMergeBordermergeBordermerge_border
='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" (see
also set_systemset_systemSetSystemSetSystemset_system
) will internally be set to 'false'"false""false""false""false".
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
CurrRegionsCurrRegionsCurrRegionscurrRegionscurr_regions
(input_object) region(-array) →
objectHRegionHObjectHObjectHobject
Current input regions.
PrevRegionsPrevRegionsPrevRegionsprevRegionsprev_regions
(input_object) region(-array) →
objectHRegionHObjectHObjectHobject
Merged regions from the previous iteration.
CurrMergedRegionsCurrMergedRegionsCurrMergedRegionscurrMergedRegionscurr_merged_regions
(output_object) region(-array) →
objectHRegionHObjectHObjectHobject *
Current regions, merged with old ones where applicable.
PrevMergedRegionsPrevMergedRegionsPrevMergedRegionsprevMergedRegionsprev_merged_regions
(output_object) region(-array) →
objectHRegionHObjectHObjectHobject *
Regions from the previous iteration which could not be
merged with the current ones.
ImageHeightImageHeightImageHeightimageHeightimage_height
(input_control) integer →
HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Height of the line scan images.
Default:
512
Suggested values:
240, 480, 512, 1024
MergeBorderMergeBorderMergeBordermergeBordermerge_border
(input_control) string →
HTuplestrHTupleHtuple (string) (string) (HString) (char*)
Image line of the current image, which touches the
previous image.
Default:
'top'
"top"
"top"
"top"
"top"
List of values:
'bottom'"bottom""bottom""bottom""bottom", 'top'"top""top""top""top"
MaxImagesRegionMaxImagesRegionMaxImagesRegionmaxImagesRegionmax_images_region
(input_control) integer →
HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Maximum number of images for a single region.
Default:
3
Suggested values:
1, 2, 3, 4, 5
Result
The operator merge_regions_line_scanmerge_regions_line_scanMergeRegionsLineScanMergeRegionsLineScanmerge_regions_line_scan
returns the value 2 (
H_MSG_TRUE)
if the given parameters are correct.
Otherwise, an exception will be raised.
Module
Foundation