ClassesClassesClassesClasses | | | | Operators

shock_filtershock_filterShockFiltershock_filterShockFilterShockFilter (Operator)

Name

shock_filtershock_filterShockFiltershock_filterShockFilterShockFilter — Apply a shock filter to an image.

Signature

shock_filter(Image : SharpenedImage : Theta, Iterations, Mode, Sigma : )

Herror shock_filter(const Hobject Image, Hobject* SharpenedImage, double Theta, const Hlong Iterations, const char* Mode, double Sigma)

Herror T_shock_filter(const Hobject Image, Hobject* SharpenedImage, const Htuple Theta, const Htuple Iterations, const Htuple Mode, const Htuple Sigma)

Herror shock_filter(Hobject Image, Hobject* SharpenedImage, const HTuple& Theta, const HTuple& Iterations, const HTuple& Mode, const HTuple& Sigma)

HImage HImage::ShockFilter(const HTuple& Theta, const HTuple& Iterations, const HTuple& Mode, const HTuple& Sigma) const

HImageArray HImageArray::ShockFilter(const HTuple& Theta, const HTuple& Iterations, const HTuple& Mode, const HTuple& Sigma) const

void ShockFilter(const HObject& Image, HObject* SharpenedImage, const HTuple& Theta, const HTuple& Iterations, const HTuple& Mode, const HTuple& Sigma)

HImage HImage::ShockFilter(double Theta, Hlong Iterations, const HString& Mode, double Sigma) const

HImage HImage::ShockFilter(double Theta, Hlong Iterations, const char* Mode, double Sigma) const

void HOperatorSetX.ShockFilter(
[in] IHUntypedObjectX* Image, [out] IHUntypedObjectX*SharpenedImage, [in] VARIANT Theta, [in] VARIANT Iterations, [in] VARIANT Mode, [in] VARIANT Sigma)

IHImageX* HImageX.ShockFilter(
[in] double Theta, [in] Hlong Iterations, [in] BSTR Mode, [in] double Sigma)

static void HOperatorSet.ShockFilter(HObject image, out HObject sharpenedImage, HTuple theta, HTuple iterations, HTuple mode, HTuple sigma)

HImage HImage.ShockFilter(double theta, int iterations, string mode, double sigma)

Description

The operator shock_filtershock_filterShockFiltershock_filterShockFilterShockFilter applies a shock filter to the input image ImageImageImageImageImageimage to sharpen the edges contained in it. The principle of the shock filter is based on the transport of the gray values of the image towards an edge from both sides through dilation and erosion and satisfies the differential equation

on the function u defined by the gray values in ImageImageImageImageImageimage at a time . The discretized equation is solved in IterationsIterationsIterationsIterationsIterationsiterations time steps of length ThetaThetaThetaThetaThetatheta, so that the output image SharpenedImageSharpenedImageSharpenedImageSharpenedImageSharpenedImagesharpenedImage contains the gray value function at the time .

The decision between dilation and erosion is made using the sign function s with values {-1,0,+1} on a conventional edge detector. The detector of Canny

is available with ModeModeModeModeModemode='canny'"canny""canny""canny""canny""canny" and the detector of Marr/Hildreth (the Laplace operator)
can be selected by ModeModeModeModeModemode='laplace'"laplace""laplace""laplace""laplace""laplace".

To make the edge detection more robust, in particular on noisy images, it can be performed on a smoothed image matrix. This is done by giving the standard deviation of a Gaussian kernel for convolution with the image matrix in the parameter SigmaSigmaSigmaSigmaSigmasigma.

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.

Parallelization

Parameters

ImageImageImageImageImageimage (input_object)  (multichannel-)image(-array) objectHImageHImageHImageHImageXHobject (byte / uint2 / real)

Input image.

SharpenedImageSharpenedImageSharpenedImageSharpenedImageSharpenedImagesharpenedImage (output_object)  image(-array) objectHImageHImageHImageHImageXHobject * (byte / uint2 / real)

Output image.

ThetaThetaThetaThetaThetatheta (input_control)  real HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Time step.

Default value: 0.5

Suggested values: 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7

Restriction: 0 < Theta <= 0.7

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

Number of iterations.

Default value: 10

Suggested values: 1, 3, 10, 100

Restriction: Iterations >= 1

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

Type of edge detector.

Default value: 'canny' "canny" "canny" "canny" "canny" "canny"

List of values: 'canny'"canny""canny""canny""canny""canny", 'laplace'"laplace""laplace""laplace""laplace""laplace"

SigmaSigmaSigmaSigmaSigmasigma (input_control)  real HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Smoothing of edge detector.

Default value: 1.0

Suggested values: 0.0, 0.5, 1.0, 2.0, 5.0

Restriction: Theta >= 0

References

F. Guichard, J. Morel; “A Note on Two Classical Shock Filters and Their Asymptotics”; Michael Kerckhove (Ed.): Scale-Space and Morphology in Computer Vision, LNCS 2106, pp. 75-84; Springer, New York; 2001.
G. Aubert, P. Kornprobst; “Mathematical Problems in Image Processing”; Applied Mathematical Sciences 147; Springer, New York; 2002.

Module

Foundation


ClassesClassesClassesClasses | | | | Operators