Biomedical Image Analysis Library
The Biomedical Image Analysis Library is a poweful tool for developers, physicians, researchers, engineers, and so on.
|
Image segmentation methods. More...
Functions | |
template<class D > | |
Image< D > | Background (const Image< D > &img) |
Segments the darker clusters of the image, supposedly belonging to the background. More... | |
template<class D > | |
Image< D > | Background (const Image< D > &img, const Image< D > &canny) |
Segments the darker clusters of the image, supposedly belonging to the background. More... | |
template<class D > | |
Image< D > | BorderPixels (const Image< D > &img, const Adjacency &adj) |
Pixels belong to the border if they have at last one adjacent pixel with distinct intensity. More... | |
template<class D > | |
Image< int > | ConnectedComponents (const Image< D > &input, const Adjacency &adj) |
Returns an image with each connected component labeled with a distinct label. Connectness is defined * according to given adjacency relation. Every non-zero intensity pixel is considered belonging to the object. Only * zere intensity pixels belong to the background. More... | |
Image< int > | RemoveSmallComponents (const Image< int > &label, float fraction) |
The given fraction refers to the total number of pixels in the components, not to the number of * components itself. More... | |
template<class D > | |
Image< D > | OrientedGeodesicStar (const Image< D > &image, const Vector< size_t > &obj_seeds, const Vector< size_t > &bkg_seeds, double alpha=0.0, double beta=0.5) |
Returns the label from oriented geodesic segmentation algorithm. Use positive alpha values for light object and dark background, and negative alpha values for dark object and light background. More... | |
template<class D > | |
Image< D > | HighHysteresis (const Image< D > &img, const D lower, const D higher) |
Computes Hysteresis having first threshold in higher and propagating to connected pixels in lower. More... | |
template<class D > | |
void | IntensityThreshold (Image< D > &img, const D Tmin, const D Tmax) |
Computes a threshold over img. Given a pixel p, img[ p ] = 0 if img[ p ] < Tmin or img[ p ] > Tmax, and img[ p ] = 1 otherwise. More... | |
template<class D > | |
Image< int > | MinimumSpanningForest (const Image< D > &img, const Feature< D > feature, size_t regions) |
Segmentation by minimum spanning forest algorithm. More... | |
template<class D > | |
Matrix< Image< D > > | Octants (const Image< D > &data) |
Easy way to create a matrix with the 3D image or matrix octants. Octants order: x, y, z. More... | |
template<class D > | |
Image< D > | Octants (const Matrix< Image< D > > &data) |
Easy way to merge a matrix of image or matrice octants into a single image or matrix with the 3D. Octants order: x, y, z. More... | |
template<class D > | |
D | OtsuThreshold (const Image< D > &img) |
Compute otsu threshold of img. More... | |
template<class D > | |
Image< D > | Otsu (const Image< D > &img) |
Limiarize image using the OtsuThreshold( img ) limiar. More... | |
template<class D > | |
Matrix< Image< D > > | Quadrants (const Image< D > &data) |
Easy way to create a matrix with the 2D image or matrix quadrants. More... | |
template<class D > | |
Image< D > | SurfaceBorderPixels (const Image< D > &img) |
Pixels belong to the border of a surface if they have less than 7 adjacent object pixels. More... | |
template<class D > | |
Image< int > | Watershed (Image< D > &gradient, float radius=1.1f) |
Returns the label image from Watershed segmentation algorithm using local minima as the leaking points. More... | |
template<class D > | |
Image< int > | Watershed (Image< D > &gradient, const Vector< bool > &seeds) |
Returns the label image from Watershed segmentation algorithm using seeds as the leaking points. More... | |
template<class D > | |
Image< int > | Watershed (Image< D > &gradient, const Vector< size_t > &obj_seeds, const Vector< size_t > &bkg_seeds) |
Returns the label image from Watershed segmentation algorithm using seeds as the leaking points. More... | |
Image segmentation methods.
Segments the darker clusters of the image, supposedly belonging to the background.
img | Input image. |
Image< D > Bial::Segmentation::Background | ( | const Image< D > & | img, |
const Image< D > & | canny | ||
) |
Segments the darker clusters of the image, supposedly belonging to the background.
img | Input image. |
canny | Canny edges. (Suggested hysteresis thresholds: 0.8, 0.9). |
Image< D > Bial::Segmentation::BorderPixels | ( | const Image< D > & | img, |
const Adjacency & | adj | ||
) |
Pixels belong to the border if they have at last one adjacent pixel with distinct intensity.
img | Input image. |
adj | An adjacency relation. |
Image< int > Bial::Segmentation::ConnectedComponents | ( | const Image< D > & | input, |
const Adjacency & | adj | ||
) |
Returns an image with each connected component labeled with a distinct label. Connectness is defined * according to given adjacency relation. Every non-zero intensity pixel is considered belonging to the object. Only * zere intensity pixels belong to the background.
input | Input image. |
adj | An adjacency relation. |
Image< D > Bial::Segmentation::HighHysteresis | ( | const Image< D > & | img, |
const D | lower, | ||
const D | higher | ||
) |
Computes Hysteresis having first threshold in higher and propagating to connected pixels in lower.
img | Image for thresholding. |
lower | lower intensity threshold value. |
higher | higher intensity threshold value. |
void Bial::Segmentation::IntensityThreshold | ( | Image< D > & | img, |
const D | Tmin, | ||
const D | Tmax | ||
) |
Computes a threshold over img. Given a pixel p, img[ p ] = 0 if img[ p ] < Tmin or img[ p ] > Tmax, and img[ p ] = 1 otherwise.
img | Image for thresholding. |
Tmin | Minimum intensity. |
Tmax | Maximum intensity. |
Image< int > Bial::Segmentation::MinimumSpanningForest | ( | const Image< D > & | img, |
const Feature< D > | feature, | ||
size_t | regions | ||
) |
Segmentation by minimum spanning forest algorithm.
img | Input image to be segmented. Used to get image dimensions. |
feature | Feature vector. |
regions | Number of segmented regions. |
Easy way to create a matrix with the 3D image or matrix octants. Octants order: x, y, z.
data | A matrix or an image. |
Easy way to merge a matrix of image or matrice octants into a single image or matrix with the 3D. Octants order: x, y, z.
data | A matrix of matrices or images with octants with 3 dimensions to compose the output. |
Image< D > Bial::Segmentation::OrientedGeodesicStar | ( | const Image< D > & | image, |
const Vector< size_t > & | obj_seeds, | ||
const Vector< size_t > & | bkg_seeds, | ||
double | alpha = 0.0 , |
||
double | beta = 0.5 |
||
) |
Returns the label from oriented geodesic segmentation algorithm. Use positive alpha values for light object and dark background, and negative alpha values for dark object and light background.
image | Input image. |
obj_seeds | Object seed coordinate vector. |
bkg_seeds | Background seed coordinate vector. |
alpha | Oriented edges strength. -1.0 to 1.0. Close to -1.0 (light to dark edges). Close to 0.0 (non-oriented edges). Close to 1.0 (dark to light edges). |
beta | Geodesic distance force. 0.0 (geodesic distance) to 4.0 (sum function). |
Compute otsu threshold of img.
img | Image for thresholding. |
Easy way to create a matrix with the 2D image or matrix quadrants.
data | A matrix or an image. |
Image< int > Bial::Segmentation::RemoveSmallComponents | ( | const Image< int > & | label, |
float | fraction | ||
) |
The given fraction refers to the total number of pixels in the components, not to the number of * components itself.
input | Input labeled component image. |
fraction | The fraction of components that should be removed. |
Pixels belong to the border of a surface if they have less than 7 adjacent object pixels.
img | Input 3D image. |
Image< int > Bial::Segmentation::Watershed | ( | Image< D > & | gradient, |
float | radius = 1.1f |
||
) |
Returns the label image from Watershed segmentation algorithm using local minima as the leaking points.
gradient | Gradient input image. |
radius | Radius for local minima detection. |
Image< int > Bial::Segmentation::Watershed | ( | Image< D > & | gradient, |
const Vector< size_t > & | obj_seeds, | ||
const Vector< size_t > & | bkg_seeds | ||
) |
Returns the label image from Watershed segmentation algorithm using seeds as the leaking points.
gradient | Gradient input image. |
obj_seeds,bkg_seeds | Seed vectors for object and back ground respectively. |