Herror ::expand_line (
    Hobject Image,
    Hobject *RegionExpand,
    const HTuple &Index,
    const HTuple &ExpandType,
    const HTuple &RowColumn,
    const HTuple &Threshold
)
HRegion HImage::ExpandLine (
    const HTuple &Index,
    const HTuple &ExpandType,
    const HTuple &RowColumn,
    const HTuple &Threshold
) const
HRegionArray HImageArray::ExpandLine (
    const HTuple &Index,
    const HTuple &ExpandType,
    const HTuple &RowColumn,
    const HTuple &Threshold
) const

Expand a region starting at a given line.

::expand_line generates a region by expansion, starting at a given line (row or column).


Parameters

Image (input_object)
image(-array) -> Hobject: HImage(Array) ( byte )
Image to be segmented.

RegionExpand (output_object)
region(-array) -> Hobject * : HRegion(Array)
Extracted segments.

Index (input_control)
integer -> HTuple.long
Row or column index.
Default value: 256
Suggested values: 16, 64, 128, 200, 256, 300, 400, 511
Restriction: Index >= 0

ExpandType (input_control)
string -> HTuple.char *
Stopping criterion.
Default value: 'gradient'
List of values: 'gradient', 'mean'

RowColumn (input_control)
string -> HTuple.char *
Segmentation mode (row or column).
Default value: 'row'
List of values: 'row', 'column'

Threshold (input_control)
number -> HTuple.double / long
Threshold for the expansion.
Default value: 3.0
Suggested values: 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 13.0, 17.0, 20.0, 30.0
Typical range of values: 1.0 <= Threshold <= 255.0 (lin)
Minimum increment: 1.0
Recommended increment: 1.0
Restriction: (Threshold >= 0.0) && (Threshold <= 255.0)


Example
#include  <iostream.h>
#include  "HalconCpp.h"

int main (int argc, char *argv[])
{
  HImage   image (argv[1]),
           gauss;
  HWindow  win;

  win.SetDraw ("margin");
  win.SetColored (12);

  image.Display (win);

  gauss = image.GaussImage (5);

  HRegionArray reg = gauss.ExpandLine (100, "mean", "row", 5.0);

  reg.Display (win);
  win.Click ();

  return (0);
}

Possible Predecessors

::gauss_image, ::smooth_image, ::anisotrope_diff, ::median_image, ::affine_trans_image, ::rotate_image


Possible Successors

::intersection, ::opening, ::closing


Alternatives

::regiongrowing_mean, ::expand_gray, ::expand_gray_ref


Module

Region processing



Copyright © 1996-2002 MVTec Software GmbH