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)

void Roberts(const HObject& Image, HObject* ImageRoberts, const HTuple& FilterType)

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

HImage HImage::Roberts(const char* FilterType) const

HImage HImage::Roberts(const wchar_t* FilterType) const   (Windows only)

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

HImage HImage.Roberts(string filterType)

def roberts(image: HObject, filter_type: str) -> HObject

Description

robertsrobertsRobertsRobertsRobertsroberts 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".

Attention

Note that filter operators may return unexpected results if an image with a reduced domain is used as input. Please refer to the chapter Filters.

Execution Information

Parameters

ImageImageImageImageimageimage (input_object)  (multichannel-)image(-array) objectHImageHObjectHImageHobject (byte / int2 / uint2)

Input image.

ImageRobertsImageRobertsImageRobertsImageRobertsimageRobertsimage_roberts (output_object)  (multichannel-)image(-array) objectHImageHObjectHImageHobject * (byte / int2 / uint2)

Roberts-filtered result images.

FilterTypeFilterTypeFilterTypeFilterTypefilterTypefilter_type (input_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Filter type.

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

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

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

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

Possible Predecessors

binomial_filterbinomial_filterBinomialFilterBinomialFilterBinomialFilterbinomial_filter, gauss_filtergauss_filterGaussFilterGaussFilterGaussFiltergauss_filter

Possible Successors

thresholdthresholdThresholdThresholdThresholdthreshold, skeletonskeletonSkeletonSkeletonSkeletonskeleton

Alternatives

edges_imageedges_imageEdgesImageEdgesImageEdgesImageedges_image, sobel_ampsobel_ampSobelAmpSobelAmpSobelAmpsobel_amp, frei_ampfrei_ampFreiAmpFreiAmpFreiAmpfrei_amp, kirsch_ampkirsch_ampKirschAmpKirschAmpKirschAmpkirsch_amp, prewitt_ampprewitt_ampPrewittAmpPrewittAmpPrewittAmpprewitt_amp

See also

laplacelaplaceLaplaceLaplaceLaplacelaplace, highpass_imagehighpass_imageHighpassImageHighpassImageHighpassImagehighpass_image, bandpass_imagebandpass_imageBandpassImageBandpassImageBandpassImagebandpass_image

Module

Foundation