Functions and classes for fitting cylinders to an image. Useful for identifying cylindrical containers in a tomographic image.
This module can be run as a script as follows:
mpirun -np 32 python -m mango.application.cylinder_fit -n 3 path/to/tomoHiRes_nc
which will performs a multi-resolution cylinder fit of 3 cylinders and generates an image file path/to/segmentedHiRes_CYL_nc which contains the cylinder boundaries. Help for other options:
python -m mango.application.cylinder_fit --help
cylinder_fit_gradient_metric([...]) | Factory function for creating a metric which can be used to fit a cylinder to an image/gradient-vector-image. |
cylinder_fit(input, numcyl[, retcylimg, ...]) | Searches for numcyl cylinders in input image which are approximately aligned with the input image z-axis. |
cylinder_fit_multi_res(input, numcyl[, ...]) | Multi-resolution version of cylinder_fit(). |
CylinderFitGradientMetric |