上海大孝 SHIANCH AI JLAO IONG LNTVERSTY Application: Gap filling Historically, certain computer historically certain computer programs were written using programs were written using only two digits rather than only two digits rather than four to define the applicable four to defIne the applicable year. Accordingly, the year. Accordingly, the company's software may company's software may recognize a date using 00 recognize a date using00 as 1900 rather than the yea as 1900 rather than the year 2000. 2000 世动 (a sample text of (b Structuring element poor resolution with broken characters Dilation of (a) by(b)
• Application: Gap filling (a) Sample text of poor resolution with broken characters (b) Structuring element Dilation of (a) by (b)
上海大孝 SHIANCH AI JLAO IONG LNTVERSTY 2 Erosion and dilation Dilation-Erosion Duality C (4!B)=2(B)2c4={z)∩4= ={2(B)∩4≠④}=A4B Remember: AOB=2(B)0A≠ Similarly: (A0 B)=AC! B
9.2 Erosion and Dilation • Dilation-Erosion Duality ( ) |( ) |( ) ˆ |( ) c c c c z z c c z A B z B A z B A z B A A B = = = = = ! Remember: ˆ |( ) A B z B A z = Similarly: ˆ ( ) A B A B =c c !
上海大孝 SHIANCH AI JLAO IONG LNTVERSTY 9.3 Opening and closing Dilation expands and Erosion shrinks Opening Smooth contour Break narrow isthmuses(Means: 4s i) Remove thin protrusion Closing · Smooth contour Fuse narrow breaks and long in guts Remove small holes, and fill gaps
9.3 Opening and Closing • Dilation expands and Erosion shrinks. • Opening: • Smooth contour • Break narrow isthmuses (Means: تنگه( • Remove thin protrusion • Closing • Smooth contour • Fuse narrow breaks, and long thin gulfs • Remove small holes, and fill gaps
上海大孝 SHIANCH AI JLAO IONG LNTVERSTY 9.3 Opening and closing Opening An erosion followed by a dilation using the same structuring element for both operations AoB=(A! B)OB=U(B)2I(B)CA Closing a dilation followed by an erosion using the same structuring element for both operations A·B=(AB)!B
9.3 Opening and Closing • Opening: • An erosion followed by a dilation using the same structuring element for both operations. • Closing • A dilation followed by an erosion using the same structuring element for both operations. A B A B B B B A = = ( ) ( ) |( ) ! z z A B A B B ( ) = !
上海大孝 SHIANCH AI JLAO IONG LNTVERSTY 9.3 Opening and closing Opening Illustration A°B=U{(B)2(B)2A A Translates of B in A B Figure 9.8 (a)Structuring element B"rolling along the inner boundary of a (the dot indicates the origin of B).(b) Structuring element. c)The heavy line is the outer boundary of the opening.(d)Complete opening (shaded). We did not shade a in(a for clarity
9.3 Opening and Closing • Opening Illustration Figure 9.8 (a) Structuring element B “rolling” along the inner boundary of A (the dot indicates the origin of B). (b) Structuring element. (c) The heavy line is the outer boundary of the opening. (d) Complete opening (shaded). We did not shade A in (a) for clarity