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_HierarBld (MB_Image *mask, MB_Image *srcdest, enum MB_grid_t grid) |
MB_API_ENTRY MB_errcode MB_API_CALL | MB_HierarDualBld (MB_Image *mask, MB_Image *srcdest, enum MB_grid_t grid) |
MB_API_ENTRY MB_errcode MB_API_CALL | MB_Watershed (MB_Image *src, MB_Image *marker, Uint32 max_level, enum MB_grid_t grid) |
MB_API_ENTRY MB_errcode MB_API_CALL | MB_Basins (MB_Image *src, MB_Image *marker, Uint32 max_level, enum MB_grid_t grid) |
MB_API_ENTRY MB_errcode MB_API_CALL MB_Basins | ( | MB_Image * | src, |
MB_Image * | marker, | ||
Uint32 | max_level, | ||
enum MB_grid_t | grid | ||
) |
Performs a watershed segmentation of the image using the marker image as a starting point for the flooding. The function returns the catchment basins of the watershed but no actual watershed line. It is recommended to use this functions rather than MB_Watershed if you are only interested in catchment basins (faster).
The result is put into a the 32-bit marker image.
The segmentation is coded as follows into the 32-bit values.
0 | 1 | 2 | 3 |
---|---|---|---|
<— | label | —> | unused |
src | the greyscale or 32-bit image to be segmented |
marker | the marker image in which the result of segmentation will be put |
max_level | the maximum level reached by the water |
grid | the grid used (either square or hexagonal) |
MB_API_ENTRY MB_errcode MB_API_CALL MB_HierarBld | ( | MB_Image * | mask, |
MB_Image * | srcdest, | ||
enum MB_grid_t | grid | ||
) |
(re)Builds an image according to a mask image and using a hierarchical list to compute the rebuild.
mask | the mask image |
srcdest | the rebuild image |
grid | the grid used (either square or hexagonal) |
MB_API_ENTRY MB_errcode MB_API_CALL MB_HierarDualBld | ( | MB_Image * | mask, |
MB_Image * | srcdest, | ||
enum MB_grid_t | grid | ||
) |
(re)Builds (dual operation) an image according to a mask image and using a hierarchical list to compute the rebuild.
mask | the mask image |
srcdest | the rebuild image |
grid | the grid used (either square or hexagonal) |
MB_API_ENTRY MB_errcode MB_API_CALL MB_Watershed | ( | MB_Image * | src, |
MB_Image * | marker, | ||
Uint32 | max_level, | ||
enum MB_grid_t | grid | ||
) |
Performs a watershed segmentation of the image using the marker image as a starting point for the flooding. The function builds the actual watershed line (idempotent) plus catchment basins (not idempotent).
The result is put into the 32-bit marker image.
The segmentation is coded as follows into the 32-bit values.
0 | 1 | 2 | 3 |
---|---|---|---|
<— | label | —> | isLine |
isLine is a value indicating if the pixel belongs to the watershed (255 if this is the case, undefined otherwise).
src | the greyscale or 32-bit image to segment |
marker | the marker image in which the result of segmentation will be put |
max_level | the maximum level reach by the water |
grid | the grid used (either square or hexagonal) |