10.1.8.1. Morphomath¶
This module implements Morphological 1D Operators.
-
class
Musica.Math.Morphomath.
BallStructuringElement
(radius)[source]¶ Bases:
Musica.Math.Morphomath.StructuringElement
This class implements a ball structuring element.
The domain of the structuring element is [-radius, radius].
-
class
Musica.Math.Morphomath.
Domain
(inf, sup)[source]¶ Bases:
object
This class implements a functional 1D domain defined by the range [inf, sup].
The size of the domain defined by
sup - inf +1
is given by the functionlen()
.To test if
x
is in the domain, use:x in domain
-
class
Musica.Math.Morphomath.
Function
(values)[source]¶ Bases:
object
This class implements a 1D function.
The parameters values is an iterable that define the initial values of the function.
The function domain is set to [0, len(values) -1].
-
_pointwise_rank
(other, rank_operator)[source]¶ This method implements a point-wise rank filter.
The function is modified in-place.
-
_rank_filter
(structuring_element, rank_operator)[source]¶ This method implements a rank filter.
The function is modified in-place.
-
_rank_filter_vhgw
(radius, rank_operator)[source]¶ This method implements a rank filter using the Van Herk & Gill-Werman algorithm.
This algorithm comes from C. Clienti, M. Bilodeau, and S. Beucher, An Efficient Hardware Architecture without Line Memories for Morphological Image Processing. In Proceedings of ACIVS. 2008, 147-156.
-
translate
(offset, padd_inf=True)[source]¶ Translate the function.
If the parameter padd_inf is set to True then the padding value is set to zero else to the sup of the function.
-
__hash__
= None¶
-
unit_ball
= <Musica.Math.Morphomath.BallStructuringElement object>¶
-
-
class
Musica.Math.Morphomath.
StructuringElement
(offsets)[source]¶ Bases:
object
This class implements a structuring element.
The parameter offsets is an iterable that contains the offsets of the pixels on of the structuring element.
The neighbor set \(N_G^+\) and \(N_G^-\) is defined in the article: Morphological Grayscale Reconstruction in Image Analysis: Applications and Efficient Algorithms, Luc Vincent, IEEE Transactions on image processing, Vol. 2, No. 2, April 1993.
-
class
Musica.Math.Morphomath.
StructuringElementIterator
(structuring_element, domain)[source]¶ Bases:
object
This class implements a structuring element iterator.
The parameter structuring_element defines the structuring element and the parameter domain defines the domain of the lattice.
-
Musica.Math.Morphomath.
unit_ball
= <Musica.Math.Morphomath.BallStructuringElement object>¶ Unit ball structuring element.