Geogram
Version 1.9.1
A programming library of geometric algorithms
|
A structuring element, that is the definition of neighborhood used by a morphological operation. More...
#include <geogram/image/morpho_math.h>
Public Member Functions | |
StructuringElement (Image *source) | |
StructuringElement constructor. More... | |
index_t | radius () const |
Gets the radius. More... | |
void | add_neighbor (int xrel, int yrel) |
Adds a neighbor to this structuting element. More... | |
void | convolve (Memory::byte *from, Memory::byte *to) const |
Computes the convolution at a given memory location. More... | |
void | convolve (int x, int y, Image *target_img) const |
Computes the convolution at a given pixel. More... | |
A structuring element, that is the definition of neighborhood used by a morphological operation.
Definition at line 57 of file morpho_math.h.
|
inline |
StructuringElement constructor.
[in] | source | a pointer to the source image. |
Definition at line 64 of file morpho_math.h.
|
inline |
Adds a neighbor to this structuting element.
[in] | xrel,yrel | the coordinates of the neighbor, relative to the center of this structuring element. |
Definition at line 85 of file morpho_math.h.
|
inline |
Computes the convolution at a given pixel.
The source image is the one that was specified to the constructor of this StructuringElement.
[in] | x,y | the coordinates of the pixel. |
[in] | target_img | a pointer to the target image. |
Definition at line 109 of file morpho_math.h.
void GEO::StructuringElement::convolve | ( | Memory::byte * | from, |
Memory::byte * | to | ||
) | const |
Computes the convolution at a given memory location.
[in] | from | a pointer to the source pixel at the center of the structuring element. |
[in] | to | a pointer to the target pixel at the center of the structuring element. |
|
inline |
Gets the radius.
Definition at line 76 of file morpho_math.h.