ClassesClassesClassesClasses | | | | Operators

expand_lineexpand_lineExpandLineexpand_lineExpandLineExpandLine (Operator)

Name

expand_lineexpand_lineExpandLineexpand_lineExpandLineExpandLine — Expand a region starting at a given line.

Signature

expand_line(Image : RegionExpand : Coordinate, ExpandType, RowColumn, Threshold : )

Herror expand_line(const Hobject Image, Hobject* RegionExpand, const Hlong Coordinate, const char* ExpandType, const char* RowColumn, double Threshold)

Herror T_expand_line(const Hobject Image, Hobject* RegionExpand, const Htuple Coordinate, const Htuple ExpandType, const Htuple RowColumn, const Htuple Threshold)

Herror expand_line(Hobject Image, Hobject* RegionExpand, const HTuple& Coordinate, const HTuple& ExpandType, const HTuple& RowColumn, const HTuple& Threshold)

HRegion HImage::ExpandLine(const HTuple& Coordinate, const HTuple& ExpandType, const HTuple& RowColumn, const HTuple& Threshold) const

HRegionArray HImageArray::ExpandLine(const HTuple& Coordinate, const HTuple& ExpandType, const HTuple& RowColumn, const HTuple& Threshold) const

void ExpandLine(const HObject& Image, HObject* RegionExpand, const HTuple& Coordinate, const HTuple& ExpandType, const HTuple& RowColumn, const HTuple& Threshold)

HRegion HImage::ExpandLine(Hlong Coordinate, const HString& ExpandType, const HString& RowColumn, const HTuple& Threshold) const

HRegion HImage::ExpandLine(Hlong Coordinate, const HString& ExpandType, const HString& RowColumn, double Threshold) const

HRegion HImage::ExpandLine(Hlong Coordinate, const char* ExpandType, const char* RowColumn, double Threshold) const

void HOperatorSetX.ExpandLine(
[in] IHUntypedObjectX* Image, [out] IHUntypedObjectX*RegionExpand, [in] VARIANT Coordinate, [in] VARIANT ExpandType, [in] VARIANT RowColumn, [in] VARIANT Threshold)

IHRegionX* HImageX.ExpandLine(
[in] Hlong Coordinate, [in] BSTR ExpandType, [in] BSTR RowColumn, [in] VARIANT Threshold)

static void HOperatorSet.ExpandLine(HObject image, out HObject regionExpand, HTuple coordinate, HTuple expandType, HTuple rowColumn, HTuple threshold)

HRegion HImage.ExpandLine(int coordinate, string expandType, string rowColumn, HTuple threshold)

HRegion HImage.ExpandLine(int coordinate, string expandType, string rowColumn, double threshold)

Description

expand_lineexpand_lineExpandLineexpand_lineExpandLineExpandLine generates a region by expansion, starting at a given line (row or column). The expansion is terminated when the current gray value differs by more than ThresholdThresholdThresholdThresholdThresholdthreshold from the mean gray value along the line (ExpandTypeExpandTypeExpandTypeExpandTypeExpandTypeexpandType = 'mean'"mean""mean""mean""mean""mean") or from the previously added gray value (ExpandTypeExpandTypeExpandTypeExpandTypeExpandTypeexpandType = 'gradient'"gradient""gradient""gradient""gradient""gradient").

Parallelization

Parameters

ImageImageImageImageImageimage (input_object)  singlechannelimage(-array) objectHImageHImageHImageHImageXHobject (byte)

Input image.

RegionExpandRegionExpandRegionExpandRegionExpandRegionExpandregionExpand (output_object)  region(-array) objectHRegionHRegionHRegionHRegionXHobject *

Extracted segments.

CoordinateCoordinateCoordinateCoordinateCoordinatecoordinate (input_control)  integer HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Row or column coordinate.

Default value: 256

Suggested values: 16, 64, 128, 200, 256, 300, 400, 511

Restriction: Coordinate >= 0

ExpandTypeExpandTypeExpandTypeExpandTypeExpandTypeexpandType (input_control)  string HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Stopping criterion.

Default value: 'gradient' "gradient" "gradient" "gradient" "gradient" "gradient"

List of values: 'gradient'"gradient""gradient""gradient""gradient""gradient", 'mean'"mean""mean""mean""mean""mean"

RowColumnRowColumnRowColumnRowColumnRowColumnrowColumn (input_control)  string HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Segmentation mode (row or column).

Default value: 'row' "row" "row" "row" "row" "row"

List of values: 'column'"column""column""column""column""column", 'row'"row""row""row""row""row"

ThresholdThresholdThresholdThresholdThresholdthreshold (input_control)  number HTupleHTupleHTupleVARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (double / Hlong) (double / Hlong)

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 Threshold Threshold Threshold Threshold threshold ≤ 255.0 (lin)

Minimum increment: 1.0

Recommended increment: 1.0

Restriction: Threshold >= 0.0 && Threshold <= 255.0

Example (C++ (HALCON 5.0-10.0))

#include "HIOStream.h"
#if !defined(USE_IOSTREAM_H)
using namespace std;
#endif
#include "HalconCpp.h"
using namespace Halcon;

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);
}

Example (C)

read_image(&Image,"fabrik");
gauss_image(Image,&Gauss,5);
expand_line(Gauss,&Reg,100,"mean","row",5.0);
set_colored(WindowHandle,12);
disp_region(Maxima,WindowHandle);

Example (C++ (HALCON 5.0-10.0))

#include "HIOStream.h"
#if !defined(USE_IOSTREAM_H)
using namespace std;
#endif
#include "HalconCpp.h"
using namespace Halcon;

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);
}

Example (C++ (HALCON 5.0-10.0))

#include "HIOStream.h"
#if !defined(USE_IOSTREAM_H)
using namespace std;
#endif
#include "HalconCpp.h"
using namespace Halcon;

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);
}

Example (C++ (HALCON 5.0-10.0))

#include "HIOStream.h"
#if !defined(USE_IOSTREAM_H)
using namespace std;
#endif
#include "HalconCpp.h"
using namespace Halcon;

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);
}

Example (C++ (HALCON 5.0-10.0))

#include "HIOStream.h"
#if !defined(USE_IOSTREAM_H)
using namespace std;
#endif
#include "HalconCpp.h"
using namespace Halcon;

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

binomial_filterbinomial_filterBinomialFilterbinomial_filterBinomialFilterBinomialFilter, gauss_imagegauss_imageGaussImagegauss_imageGaussImageGaussImage, smooth_imagesmooth_imageSmoothImagesmooth_imageSmoothImageSmoothImage, anisotropic_diffusionanisotropic_diffusionAnisotropicDiffusionanisotropic_diffusionAnisotropicDiffusionAnisotropicDiffusion, median_imagemedian_imageMedianImagemedian_imageMedianImageMedianImage, affine_trans_imageaffine_trans_imageAffineTransImageaffine_trans_imageAffineTransImageAffineTransImage, rotate_imagerotate_imageRotateImagerotate_imageRotateImageRotateImage

Possible Successors

intersectionintersectionIntersectionintersectionIntersectionIntersection, openingopeningOpeningopeningOpeningOpening, closingclosingClosingclosingClosingClosing

Alternatives

regiongrowing_meanregiongrowing_meanRegiongrowingMeanregiongrowing_meanRegiongrowingMeanRegiongrowingMean, expand_grayexpand_grayExpandGrayexpand_grayExpandGrayExpandGray, expand_gray_refexpand_gray_refExpandGrayRefexpand_gray_refExpandGrayRefExpandGrayRef

Module

Foundation


ClassesClassesClassesClasses | | | | Operators