HALCON Reference Manual 10.0.2
Table of Contents / Filters / Edges ClassesClassesClasses | | | Operators

robertsrobertsrobertsRobertsRoberts (Operator)

Name

robertsrobertsrobertsRobertsRoberts — Detect edges using the Roberts filter.

Signature

roberts(Image : ImageRoberts : FilterType : )

Herror roberts(const Hobject Image, Hobject* ImageRoberts, const char* FilterType)

Herror T_roberts(const Hobject Image, Hobject* ImageRoberts, const Htuple FilterType)

Herror roberts(Hobject Image, Hobject* ImageRoberts, const HTuple& FilterType)

HImage HImage::Roberts(const HTuple& FilterType) const

HImageArray HImageArray::Roberts(const HTuple& FilterType) const

void HOperatorSetX.Roberts(
[in] IHUntypedObjectX* Image, [out] IHUntypedObjectX*ImageRoberts, [in] VARIANT FilterType)

IHImageX* HImageX.Roberts([in] BSTR FilterType)

static void HOperatorSet.Roberts(HObject image, out HObject imageRoberts, HTuple filterType)

HImage HImage.Roberts(string filterType)

Description

robertsrobertsrobertsRobertsRoberts calculates the first derivative of an image and is used as an edge operator. If the following mask describes a part of the image,

                        A               B

                        C               D

the different filter types are defined as follows:

   'roberts_max'     max(| A - D |,| B - C |)
   'gradient_max'    max(| A + B - (C + D)|,| A + C - (B + D)|)
   'gradient_sum'    |A + B - (C + D)| + |A + C - (B + D)|

If an overflow occurs the result is clipped. The result of the operator is stored at the pixel with the coordinates of "D".

Parallelization

Parameters

ImageImageImageImageimage (input_object)  (multichannel-)image(-array) objectHImageHImageHImageXHobject (byte / int2 / uint2)

Input image.

ImageRobertsImageRobertsImageRobertsImageRobertsimageRoberts (output_object)  (multichannel-)image(-array) objectHImageHImageHImageXHobject * (byte / int2 / uint2)

Roberts-filtered result images.

FilterTypeFilterTypeFilterTypeFilterTypefilterType (input_control)  string HTupleHTupleVARIANTHtuple (string) (string) (char*) (BSTR) (char*)

Filter type.

Default value: 'gradient_sum' "gradient_sum" "gradient_sum" "gradient_sum" "gradient_sum"

List of values: 'roberts_max'"roberts_max""roberts_max""roberts_max""roberts_max", 'gradient_max'"gradient_max""gradient_max""gradient_max""gradient_max", 'gradient_sum'"gradient_sum""gradient_sum""gradient_sum""gradient_sum"

Example (HDevelop)

read_image(Image,'fabrik')
roberts(Image,Roberts,'roberts_max')
threshold(Roberts,Margin,128,255)

Example (C)

read_image(&Image,"fabrik");
roberts(Image,&Roberts,"roberts_max");
threshold(Roberts,&Margin,128.0,255.0);

Example (HDevelop)

read_image(Image,'fabrik')
roberts(Image,Roberts,'roberts_max')
threshold(Roberts,Margin,128,255)

Example (HDevelop)

read_image(Image,'fabrik')
roberts(Image,Roberts,'roberts_max')
threshold(Roberts,Margin,128,255)

Example (HDevelop)

read_image(Image,'fabrik')
roberts(Image,Roberts,'roberts_max')
threshold(Roberts,Margin,128,255)

Result

robertsrobertsrobertsRobertsRoberts returns 2 (H_MSG_TRUE) if all parameters are correct. If the input is empty the behaviour can be set via set_system('no_object_result',<Result>)set_system("no_object_result",<Result>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>). If necessary, an exception is raised.

Possible Predecessors

binomial_filterbinomial_filterbinomial_filterBinomialFilterBinomialFilter, gauss_imagegauss_imagegauss_imageGaussImageGaussImage

Possible Successors

thresholdthresholdthresholdThresholdThreshold, skeletonskeletonskeletonSkeletonSkeleton

Alternatives

edges_imageedges_imageedges_imageEdgesImageEdgesImage, sobel_ampsobel_ampsobel_ampSobelAmpSobelAmp, frei_ampfrei_ampfrei_ampFreiAmpFreiAmp, kirsch_ampkirsch_ampkirsch_ampKirschAmpKirschAmp, prewitt_ampprewitt_ampprewitt_ampPrewittAmpPrewittAmp

See also

laplacelaplacelaplaceLaplaceLaplace, highpass_imagehighpass_imagehighpass_imageHighpassImageHighpassImage, bandpass_imagebandpass_imagebandpass_imageBandpassImageBandpassImage

Module

Foundation


Table of Contents / Filters / Edges ClassesClassesClasses | | | Operators
HALCON Reference Manual 10.0.2 Copyright © 1996-2011 MVTec Software GmbH