Chapter III: Opening, Closing
Total Page:16
File Type:pdf, Size:1020Kb
ChapterChapter III:III: Opening,Opening, ClosingClosing Opening and Closing by adjunction Algebraic Opening and Closing Top-Hat Transformation Granulometry J. Serra Ecole des Mines de Paris ( 2000 ) Course on Math. Morphology III. 1 AdjunctionAdjunction OpeningOpening andand ClosingClosing The problem of an inverse operator Several different sets may admit a same erosion, or a same dilate. But among all possible inverses, there exists always a smaller one (a larger one). It is obtained by composing erosion with the adjoint dilation (or vice versa) . The mapping is called adjunction opening, structuring and is denoted by element γ Β = δΒ εΒ ( general case) XoB = [(X B) ⊕ Β] (τ-operators) Erosion By commuting the factors δΒ and εΒ we obtain the adjunction closing ϕ ==εε δ ? Β Β Β (general case), X•Β = [X ⊕ Β) B] (τ-operators). ( These operators, due to G. Matheron are sometimes called morphological) J. Serra Ecole des Mines de Paris ( 2000 ) Course on Math. Morphology III. 2 PropertiesProperties ofof AdjunctionAdjunction OpeningOpening andand ClosingClosing Increasingness Adjunction opening and closing are increasing as products of increasing operations. (Anti-)extensivity By doing Y= δΒ(X), and then X = εΒ(Y) in adjunction δΒ(X) ⊆ Y ⇔ X ⊆ εΒ(Y) , we see that: δ ε ε δ ε (δ ε ) ε (ε δ )ε εεΒ δδΒ εεΒ ==ε==εεεΒ δΒΒ εΒΒ(X)(X) ⊆ ⊆XX ⊆⊆ εΒΒ δΒΒ (X) (X) hence Β Β Β ⊆ Β ⊆ Β Β Β⇒ Β Β Β Β Idempotence The erosion of the opening equals the erosion of the set itself. This results in the idempotence of γ Β and of ϕΒ : γ γ = γ γΒΒ γΒΒ = γΒΒand,and, εΒ (δΒ εΒ) = εΒ ⇒ δΒ εΒ (δΒ εΒ) = δΒ εΒ i.e. ϕ ϕ ==ϕϕ byby dualityduality ϕΒΒ ϕΒΒ ==ϕϕΒΒ Finally, if εΒ(Y) = εΒ(X), then γ Β(X) = δΒ εΒ(X) = δΒ εΒ(Y) ⊆ Y . Hence, γ Β is the smallest inverse of erosion εΒ . J. Serra Ecole des Mines de Paris ( 2000 ) Course on Math. Morphology III. 3 AmendingAmending EffectsEffects ofof AdjunctionAdjunction OpeningOpening Geometrical interpretation Structuring element z ∈γΒ(X) ⇔ z∈ B and y∈ XB y z ∈∈ γγ(X) ⇔ z ∈∈ B ⊆ X hence z (X) ⇔ z Byy ⊆ X • the opened set γΒ(X) is the union of the structuring elements B(x) which are included in set X. Opening • In case of a τ−opening, γΒ(X) is the zone swept by the structuring When B is a disc, the opening amends element when it is constrained to the caps, removes the small islands be included in the set. and opens isthmuses. J. Serra Ecole des Mines de Paris ( 2000 ) Course on Math. Morphology III. 4 AmendingAmending EffectsEffects ofof AdjunctionAdjunction ClosingClosing Geometrical interpretation Structuring element • By taking the complement in the Closing definition of XoB we see that vv X•Β = [(X ⊕ Β) B] • The τ-closing is the complement of the domain swept by B as it misses set X. Note that in most of the practical cases, set B is v symmetrical, i.e. identical to B. • Note that when a shift affects both erosions and dilations, it does not When B is a disc, the closing closes the channels, fills completely the small lakes, acts on openings and closings. and partly the gulfs. J. Serra Ecole des Mines de Paris ( 2000 ) Course on Math. Morphology III. 5 EffectsEffects onon FunctionsFunctions • The adjunction opening and closing create a simpler Level 60 function than the original. Closing They smooth in a nonlinear 50 Original way. 40 Opening • The opening (closing) 30 removes positive (negative) 20 peaks that are thinner than Structuring 10 the structuring element. element 0 0 20 40 60 80 • The opening (closing) Sample remains below (above) the original function. J. Serra Ecole des Mines de Paris ( 2000 ) Course on Math. Morphology III. 6 AlgebraicAlgebraic OpeningOpening andand ClosingClosing The three basic properties of adjunction openings δε and closings εδ are also the axioms for the algebraic notion of an opening and a closing. Definition : In algebra, any transformation which is: • increasing, anti-extensive and idempotent is called an (algebraic) opening, • increasing, extensive and idempotent is called a (algebraic) closing. Particular cases : Here are two very easy ways for creating algebraic openings and closing, they are often used in practice: 1) Compute various opening (closing) and take their supremum (or the infimum in case of closings). 2) Use a reconstruction process (see V- 9 and VI - 5) J. Serra Ecole des Mines de Paris ( 2000 ) Course on Math. Morphology III. 7 InvariantInvariant ElementsElements Let B be the image of lattice L under the algebraic opening γ, i.e. B = γ (L). Since γ is idempotent, set B generates the family of invariant sets of γ : b ∈ B ⇔ γ (b) = B . ∈ 1/ Classe B is closed under sup. For any family {bj, j J } ⊆ B, we have γ ∈ γ ∈ ∈ (∨bj, j J) ≥∨{ (bj) , j J } = ∨( bj, j J ) by increasingness, and the inverse inequality by anti-extensivity de γ. Moreover , 0 ∈ B. Note that γ does not commute under supremum. 2/ Therefore, γ is the smallest extension to L of the identity on B, i.e. γ (x) = ∨ { b : b ∈ B , b ≤ x } , x ∈ L . [ The right member is an invariant set of γ smaller than x, but also that contains γ (x). ] J. Serra Ecole des Mines de Paris ( 2000 ) Course on Math. Morphology III. 8 RepresentationRepresentation of of openingsopenings Conversely, let B be the class closed under sup. that an arbitrary class B0 generates. With each b ∈ B ∪0 associate dilation δ δ 0 b(a) = b when a ≥ b ; b(a) = when not . By adjunction, it yields opening b when b ≤ x , γ δ δ b(x) = ∨ { Β(a) , b(a) ≤ x } = (2) 0 when not . [ If b ≤ x, it suffices to take a ≥ b for obtaining a term = b in the ∨ ; if not, δ ≠ no b(a) 0 is ≤ x ] . Then relation (1) becomes γ δ ∈ (x) = ∨{ b(a) , b B }. Theorem (G. Matheron , J. Serra ) : 1/ With any class B0 ⊆ L corresponds a ∈ unique opening on L that has for invariant sets the b B0 . 2/ Every algebraic opening γ on lattice L may be represented as the union of the adjunction openings linked to the invariant sets of γ by relation (2). J. Serra Ecole des Mines de Paris ( 2000 ) Course on Math. Morphology III. 9 SupremaSuprema of of OpeningsOpenings TheoremTheorem:: ApplicationApplication : : •• Any Any supremumsupremum ofof openingsopenings ForFor creatingcreating openingsopenings withwith specificspecific isis stillstill an an opening.opening. selectionselection properties,properties, oneone cancan use use structuringstructuring •• Any Any infimuminfimum of of closingsclosings isis elementselements withwith variousvarious shapesshapes and and taketake theirtheir stillstill a a closing.closing. supremum.supremum. Opening by Opening by Original sup. Opening by J. Serra Ecole des Mines de Paris ( 2000 ) Course on Math. Morphology III. 10 "Top-hat""Top-hat" TransformationTransformation Goal • The "top-hat" transformation, due to F. Meyer, aims to suppress slow trends, therefore to enhance the contrasts of some features in images, according to size or shape criteria. This operator serves mainly for numerical functions. Definition • The "top-hat" transformation is the residue between the identity and a (compatible with vertical translation) opening ρ(f) = f - γ(f) ( functions) ; ρ(X) = X \ γ(X) (sets) • A dual top-hat can be defined: the residue between a closing and the identity: ρ*(f) = ϕ(f) - f ( functions) ; ρ∗(X) = ϕ(X) \ X (sets) J. Serra Ecole des Mines de Paris ( 2000 ) Course on Math. Morphology III. 11 Top-hatTop-hat PropertiesProperties Idempotence • The top-hat is idempotent (but not increasing). Moreover, when the original signal is positive the top hat is anti-extensive: ρ(ρ(f)) = ρ(f) f > 0 ⇒⇒ρρ(f) < f Geometrically speaking, the top-hat reduces to zero the slow trends of the signal. Robustness • If Z stands for the set of points where the opening is strictly smaller than f, i.e. Z = { x : (γ f)(x) < f(x) } and if g is a positive function whose support is included in Z, then T(g) = g and T (f+g) = T(f) + T(g) J. Serra Ecole des Mines de Paris ( 2000 ) Course on Math. Morphology III. 12 UseUse ofof thethe Top-hatTop-hat Sets • The top-hat extracts the objects that have not been eliminated by the Level Original opening. That is, it removes objects 100 larger than the structuring element. 80 γ Functions Opening: 60 • The top-hat is used to extract contrasted components with respect 40 to the background. The basic top-hat extracts positive components and the 20 Top hat dual top hat the negative ones. 0 0 20 40 60 80 • Typically, top-hats remove the slow Sample trends, and thus performs a contrast enhancement. J. Serra Ecole des Mines de Paris ( 2000 ) Course on Math. Morphology III. 13 AnAn ExampleExample ofof Top-hatTop-hat Comment :The goal is the extraction of the aneurisms ( the small white spots). Top hat c), better than b) is far from being perfect. Here opening by reconstruction yields a correct solution (VI-7). Negative image Top hat by an Top hat by the sup of the retina. hexagon opening of three segments of size 10. openings of size 10. J. Serra Ecole des Mines de Paris ( 2000 ) Course on Math. Morphology III. 14 Granulometry:Granulometry: anan IntuitiveIntuitive ApproachApproach • Granulometry is the study of the size characteristics of sets and of functions. In physics, granulometries are generally based on sieves ψλ of increasing meshes λ > 0. Now, – by applying sieve λ to set X, we obtain the over-sieve ψλ(X) ⊆ X; – if Y is another set containing X, the Y-over-sieve, for every λ, is larger than the X-over-sieve, i.e.