classPiiImage::RadiansToPoints
#include <PiiImage.h>
A unary function that converts radians to points of the compass.
Inherits Pii::UnaryFunction< T, int >
Description
Angles in
turned to 0, angles
in
to 1 and so on.
Public member functions
|
int
|
(
|
|
template<class T, class U, class Quantizer>
PiiMatrix< T >
|
Thin edge detection result. |
Function details
-
int operator()
(- T radians
[inline] -
template<class T, class U, class Quantizer>
PiiMatrix< T > suppressNonMaxima
Thin edge detection result.
This function checks each pixel in
magnitudeto see if it is a local maximum. It searches up toradiuspixels to the direction of the gradient. Only the maximum pixels are retained in the result image; others are set to zero.// Typical case: thin edges using a gradient direction image (in radians) PiiMatrix<int> gradientX, gradientY, edges; edges = PiiImage::suppressNonMaxima(PiiImage::gradientMagnitude(gradientX, gradienY), PiiImage::gradientDirection(gradientX, gradientY), PiiImage::RadiansToPoints<float>()); // If you have already quantized the gradient direction image into 8 levels: PiiMatrix<int> gradientDirection; edges = PiiImage::suppressNonMaxima(PiiImage::gradientMagnitude(gradientX, gradienY), gradientDirection, Pii::Identity<int>());
Parameters
- magnitude
-
gradient magnitude image. (see gradientMagnitude())
- direction
-
gradient direction image (see gradientDirection()).
- quantizer
-
a unary function that converts the angles stored in
directioninto points of the compass (0-7, 0 = east, 1 = north-east, ..., 7 = south-east).
Add a note
Not a single note added yet. Be the first, add yours.