Main Page   Modules   Class Hierarchy   Compound List   File List   Compound Members   Related Pages   Examples  

Edge detection


Functions

void Normalize (vector< FloatImage > &v)
void Magnitude (vector< FloatImage > &v, FloatImage &magnit)
void GradientMap (Image< T > &input, FloatImage &gx, FloatImage &gy)
void EdgePrewitt (Image< T > &input, int type, Image< T > &output)
void EdgeSobel (Image< T > &input, int type, Image< T > &output)
void EdgeKirsch (Image< T > &input, Image< T > &output)

Detailed Description

This group contains stand-alone functions implementing the following edge detection algorithms: Prewitt, Sobel, Kirsch, Laplace.

Function Documentation

void EdgeKirsch ( Image< T > & input,
Image< T > & output )
 

Detects the edges in the input image using Kirsch's compass edge detector and stores the result in the output image.

For more details regarding Kirsch's compass edge detector algorithm we refer to to Sonka M., Hlavac, V. , Boyle R.:Image Processing, Understanding, and Machine Vision, 2nd edition, PWS Boston, 1999.

Examples:
test_edge.cpp.

Definition at line 142 of file Edge.cpp.

void EdgePrewitt ( Image< T > & input,
int type,
Image< T > & output )
 

Detects the edges in the input image using Prewitt's edge detector and stores the result in the output image. The parameter type determines the way the output is computed. If type is 0 then the output is computed according to the following formula:

otherwise, the output is computed according to the following formula:

For more details regarding Prewitt's edge detector algorithm we refer to Sonka M., Hlavac, V. , Boyle R.:Image Processing, Understanding, and Machine Vision, 2nd edition, PWS Boston, 1999.

Examples:
test_edge.cpp.

Definition at line 97 of file Edge.cpp.

void EdgeSobel ( Image< T > & input,
int type,
Image< T > & output )
 

Detects the edges in the input image using Sobel's edge detector and stores the result in the output image. The parameter type determines the way the output is computed. If type is 0 then the output is computed according to the following formula:

otherwise, the output is computed according to the following formula:

For more details regarding Sobel's edge detector algorithm we refer to Sonka M., Hlavac, V. , Boyle R.:Image Processing, Understanding, and Machine Vision, 2nd edition, PWS Boston, 1999.

Examples:
test_edge.cpp.

Definition at line 120 of file Edge.cpp.

void GradientMap ( Image< T > & input,
FloatImage & gx,
FloatImage & gy )
 

Computes the gradient map of the input image according to the following formulas:

  • on the boundaries (forward and backward differences):

  • inside the image (central difference):

Examples:
test_edge.cpp.

Definition at line 72 of file Edge.cpp.

void Magnitude ( vector< FloatImage > & v,
FloatImage & magnit )
 

This function takes as input a set of images (i.e. , , ..., and ), considers that each set of corresponding pixels (i.e. , , ..., and ) is a vector, and computes the magnitude of these vectors. The magnitude of vector is stored in . The computation is performed only if all of the images stored in have the same size.

Examples:
test_edge.cpp.

Definition at line 52 of file Edge.cpp.

void Normalize ( vector< FloatImage > & v )
 

This function takes as input a set of images (i.e. , , ..., and ), considers that each set of corresponding pixels (i.e. , , ..., and ) is a vector, and normalizes these vectors. The normalization is performed only if all of the images stored in have the same size.

Examples:
test_edge.cpp.

Definition at line 34 of file Edge.cpp.