Mamba C API reference
Version 2.0
Go to the source code of this file.
Functions | |
MB_API_ENTRY MB_errcode MB_API_CALL | MB_InfNb (MB_Image *src, MB_Image *srcdest, Uint32 neighbors, enum MB_grid_t grid, enum MB_edgemode_t edge) |
MB_API_ENTRY MB_errcode MB_API_CALL | MB_InfFarNb (MB_Image *src, MB_Image *srcdest, Uint32 nbrnum, Uint32 count, enum MB_grid_t grid, enum MB_edgemode_t edge) |
MB_API_ENTRY MB_errcode MB_API_CALL | MB_SupNb (MB_Image *src, MB_Image *srcdest, Uint32 neighbors, enum MB_grid_t grid, enum MB_edgemode_t edge) |
MB_API_ENTRY MB_errcode MB_API_CALL | MB_SupFarNb (MB_Image *src, MB_Image *srcdest, Uint32 nbrnum, Uint32 count, enum MB_grid_t grid, enum MB_edgemode_t edge) |
MB_API_ENTRY MB_errcode MB_API_CALL | MB_DiffNb (MB_Image *src, MB_Image *srcdest, Uint32 neighbors, enum MB_grid_t grid, enum MB_edgemode_t edge) |
MB_API_ENTRY MB_errcode MB_API_CALL | MB_BldNb (MB_Image *mask, MB_Image *srcdest, Uint32 dirnum, Uint64 *pVolume, enum MB_grid_t grid) |
MB_API_ENTRY MB_errcode MB_API_CALL | MB_DualBldNb (MB_Image *mask, MB_Image *srcdest, Uint32 dirnum, Uint64 *pVolume, enum MB_grid_t grid) |
MB_API_ENTRY MB_errcode MB_API_CALL | MB_Shift (MB_Image *src, MB_Image *dest, Uint32 dirnum, Uint32 count, Uint32 long_filler_pix, enum MB_grid_t grid) |
MB_API_ENTRY MB_errcode MB_API_CALL | MB_ShiftVector (MB_Image *src, MB_Image *dest, Sint32 dx, Sint32 dy, Uint32 long_filler_pix) |
MB_API_ENTRY MB_errcode MB_API_CALL | MB_InfVector (MB_Image *src, MB_Image *srcdest, Sint32 dx, Sint32 dy, enum MB_edgemode_t edge) |
MB_API_ENTRY MB_errcode MB_API_CALL | MB_SupVector (MB_Image *src, MB_Image *srcdest, Sint32 dx, Sint32 dy, enum MB_edgemode_t edge) |
MB_API_ENTRY MB_errcode MB_API_CALL | MB_BinHitOrMiss (MB_Image *src, MB_Image *dest, Uint32 es0, Uint32 es1, enum MB_grid_t grid, enum MB_edgemode_t edge) |
MB_API_ENTRY MB_errcode MB_API_CALL MB_BinHitOrMiss | ( | MB_Image * | src, |
MB_Image * | dest, | ||
Uint32 | es0, | ||
Uint32 | es1, | ||
enum MB_grid_t | grid, | ||
enum MB_edgemode_t | edge | ||
) |
Performs a binary Hit-or-Miss operation on src image using the structuring elements es0 and es1. Structuring elements are integer values coding which direction must be taken into account. es0 indicates which neighbor of the current pixel will be checked for 0 value. es1 those which will be evaluated for 1 value.
For example, in hexagonal grid, it means that if you want to look for a pattern where the neighbors in direction 6 and 1 are true while the current pixel is false just as neighbors 2 and 5, you will encode this in the elements es0 and es1 like this :
es0 = 1+4+32 es1 = 64+2
src | output image |
dest | input image (must be different of src) |
es0 | structuring element for 0 value. |
es1 | structuring element for 1 value. |
grid | grid configuration |
edge | the kind of edge to use (behavior for pixel near edge depends on it) |
MB_API_ENTRY MB_errcode MB_API_CALL MB_BldNb | ( | MB_Image * | mask, |
MB_Image * | srcdest, | ||
Uint32 | dirnum, | ||
Uint64 * | pVolume, | ||
enum MB_grid_t | grid | ||
) |
(re)Builds an image according to a direction and a mask image. The direction depends on the grid used.
mask | the mask image |
srcdest | the rebuild image |
dirnum | the direction number |
pVolume | the computed volume of the output image |
grid | the grid used (either square or hexagonal) |
MB_API_ENTRY MB_errcode MB_API_CALL MB_DiffNb | ( | MB_Image * | src, |
MB_Image * | srcdest, | ||
Uint32 | neighbors, | ||
enum MB_grid_t | grid, | ||
enum MB_edgemode_t | edge | ||
) |
Computes the set difference between two image pixels (a central pixel and its neighbors in the other image) The neighbor depends on the grid used. Neighbors are described using a pattern. If no neighbor is defined, the function will leave silently doing nothing.
src | source image in which the neighbor are taken |
srcdest | source of the central pixel and destination image |
neighbors | the neighbors to take into account |
grid | the grid used (either square or hexagonal) |
edge | the kind of edge to use (behavior for pixel near edge depends on it) |
MB_API_ENTRY MB_errcode MB_API_CALL MB_DualBldNb | ( | MB_Image * | mask, |
MB_Image * | srcdest, | ||
Uint32 | dirnum, | ||
Uint64 * | pVolume, | ||
enum MB_grid_t | grid | ||
) |
(re)Builds (dual operation) an image according to a direction and a mask image. The direction depends on the grid used.
mask | the mask image |
srcdest | the rebuild image |
dirnum | the direction number |
pVolume | the computed volume of the output image |
grid | the grid used (either square or hexagonal) |
MB_API_ENTRY MB_errcode MB_API_CALL MB_InfFarNb | ( | MB_Image * | src, |
MB_Image * | srcdest, | ||
Uint32 | nbrnum, | ||
Uint32 | count, | ||
enum MB_grid_t | grid, | ||
enum MB_edgemode_t | edge | ||
) |
Looks for the minimum between two image pixels (a central pixel and its far neighbor in the other image) The neighbor depends on the grid used.
src | source image in which the neighbor are taken |
srcdest | source of the central pixel and destination image |
nbrnum | the neighbor index |
count | the amplitude of the shift (in pixels) |
grid | the grid used (either square or hexagonal) |
edge | the kind of edge to use (behavior for pixel near edge depends on it) |
MB_API_ENTRY MB_errcode MB_API_CALL MB_InfNb | ( | MB_Image * | src, |
MB_Image * | srcdest, | ||
Uint32 | neighbors, | ||
enum MB_grid_t | grid, | ||
enum MB_edgemode_t | edge | ||
) |
Looks for the minimum between two image pixels (a central pixel and its neighbors in the other image) The neighbor depends on the grid used. Neighbors are described using a pattern. If no neighbor is defined, the function will leave silently doing nothing.
src | source image in which the neighbor are taken |
srcdest | source of the central pixel and destination image |
neighbors | the neighbors to take into account |
grid | the grid used (either square or hexagonal) |
edge | the kind of edge to use (behavior for pixel near edge depends on it) |
MB_API_ENTRY MB_errcode MB_API_CALL MB_InfVector | ( | MB_Image * | src, |
MB_Image * | srcdest, | ||
Sint32 | dx, | ||
Sint32 | dy, | ||
enum MB_edgemode_t | edge | ||
) |
Looks for the minimum between two image pixels (a central pixel and its neighbor in the other image previously shifted by the given vector)
src | source image in which the neighbor are taken |
srcdest | source of the central pixel and destination image |
dx | the vector amplitude in x |
dy | the vector amplitude in y |
edge | the kind of edge to use (behavior for pixels near edge depends on it) |
MB_API_ENTRY MB_errcode MB_API_CALL MB_Shift | ( | MB_Image * | src, |
MB_Image * | dest, | ||
Uint32 | dirnum, | ||
Uint32 | count, | ||
Uint32 | long_filler_pix, | ||
enum MB_grid_t | grid | ||
) |
Shifts the contents of an image in a given direction with a given amplitude The direction depends on the grid used.
src | source image |
dest | destination image |
dirnum | the direction index |
count | the amplitude of the shift |
long_filler_pix | the value used to fill the created space |
grid | the grid used (either square or hexagonal) |
MB_API_ENTRY MB_errcode MB_API_CALL MB_ShiftVector | ( | MB_Image * | src, |
MB_Image * | dest, | ||
Sint32 | dx, | ||
Sint32 | dy, | ||
Uint32 | long_filler_pix | ||
) |
Shifts the contents of an image by a given vector.
src | source image |
dest | destination image |
dx | the vector amplitude in x |
dy | the vector amplitude in y |
long_filler_pix | the value used to fill the created space |
MB_API_ENTRY MB_errcode MB_API_CALL MB_SupFarNb | ( | MB_Image * | src, |
MB_Image * | srcdest, | ||
Uint32 | nbrnum, | ||
Uint32 | count, | ||
enum MB_grid_t | grid, | ||
enum MB_edgemode_t | edge | ||
) |
Looks for the maximum between two image pixels (a central pixel and its far neighbor in the other image) The neighbor depends on the grid used.
src | source image in which the neighbor are taken |
srcdest | source of the central pixel and destination image |
nbrnum | the neighbor index |
count | the amplitude of the shift (in pixels) |
grid | the grid used (either square or hexagonal) |
edge | the kind of edge to use (behavior for pixels near edge depends on it) |
MB_API_ENTRY MB_errcode MB_API_CALL MB_SupNb | ( | MB_Image * | src, |
MB_Image * | srcdest, | ||
Uint32 | neighbors, | ||
enum MB_grid_t | grid, | ||
enum MB_edgemode_t | edge | ||
) |
Looks for the maximum between two image pixels (a central pixel and its neighbors in the other image) The neighbor depends on the grid used. Neighbors are described using a pattern. If no neighbor is defined, the function will leave silently doing nothing.
src | source image in which the neighbor are taken |
srcdest | source of the central pixel and destination image |
neighbors | the neighbors to take into account |
grid | the grid used (either square or hexagonal) |
edge | the kind of edge to use (behavior for pixel near edge depends on it) |
MB_API_ENTRY MB_errcode MB_API_CALL MB_SupVector | ( | MB_Image * | src, |
MB_Image * | srcdest, | ||
Sint32 | dx, | ||
Sint32 | dy, | ||
enum MB_edgemode_t | edge | ||
) |
Looks for the maximum between two images pixels (a central pixel and its neighbor in the other image previously shifted by the given vector)
src | source image in which the neighbor are taken |
srcdest | source of the central pixel and destination image |
dx | the vector amplitude in x |
dy | the vector amplitude in y |
edge | the kind of edge to use (behavior for pixels near edge depends on it) |