Binary Opening and Closing

Similar documents
7. Morphological operations on binary images

ELEC Dr Reji Mathew Electrical Engineering UNSW

Typical Uses of Erosion

Computer Graphics (CS/ECE 545) Lecture 7: Morphology (Part 2) & Regions in Binary Images (Part 1)

Gray Image Reconstruction

MATHEMATICAL MORPHOLOGY AN APPROACH TO IMAGE PROCESSING AND ANALYSIS

Chapter 17. Shape-Based Operations

Filip Malmberg 1TD396 fall 2018 Today s lecture

8.2 IMAGE PROCESSING VERSUS IMAGE ANALYSIS Image processing: The collection of routines and

More image filtering , , Computational Photography Fall 2017, Lecture 4

1.Discuss the frequency domain techniques of image enhancement in detail.

Implementing Morphological Operators for Edge Detection on 3D Biomedical Images

MATLAB 6.5 Image Processing Toolbox Tutorial

2. Nine points are distributed around a circle in such a way that when all ( )

Efficient 2-D Structuring Element for Noise Removal of Grayscale Images using Morphological Operations

DIGITAL IMAGE PROCESSING Quiz exercises preparation for the midterm exam

Image processing for gesture recognition: from theory to practice. Michela Goffredo University Roma TRE

BEng (Hons) Electronic Engineering. Examinations for / Semester 1

Define and Diagram Outcomes (Subsets) of the Sample Space (Universal Set)

INSTITUTE OF AERONAUTICAL ENGINEERING Dundigal, Hyderabad

Introduction to computer vision. Image Color Conversion. CIE Chromaticity Diagram and Color Gamut. Color Models

Introduction to DSP ECE-S352 Fall Quarter 2000 Matlab Project 1

CT336/CT404 Graphics & Image Processing. Section 9. Morphological Techniques

NON UNIFORM BACKGROUND REMOVAL FOR PARTICLE ANALYSIS BASED ON MORPHOLOGICAL STRUCTURING ELEMENT:

An efficient algorithm for Gaussian blur using finite-state machines

Image Processing for feature extraction

A Novel Multi-diagonal Matrix Filter for Binary Image Denoising

INTERNATIONAL JOURNAL OF PURE AND APPLIED RESEARCH IN ENGINEERING AND TECHNOLOGY

Sample Spaces, Events, Probability

Color Transformations

A novel method for accurate and efficient barcode detection with morphological operations

Permutations. = f 1 f = I A

Checkerboard Tracker for Camera Calibration. Andrew DeKelaita EE368

Chessboard and 1/2[1 0 1] filter

Tan-Hsu Tan Dept. of Electrical Engineering National Taipei University of Technology Taipei, Taiwan (ROC)

Traffic Sign Recognition Senior Project Final Report

Design of Parallel Algorithms. Communication Algorithms

GENERALIZATION: RANK ORDER FILTERS

Any items left blank for a given term means the skill is not being assessed at this time.

Method to acquire regions of fruit, branch and leaf from image of red apple in orchard

EE368/CS232 Digital Image Processing Winter Homework #3 Released: Monday, January 22 Due: Wednesday, January 31, 1:30pm

COMPUTER AIDED ENGINEERING DESIGN (BFF2612) PART DESIGN Sketch Based Features

1. Figure A' is similar to Figure A. Which transformations compose the similarity transformation that maps Figure A onto Figure A'?

Geometry. ELG HS.G.14: Visualize relationships between two-dimensional and three-dimensional objects.

Game Theory. Chapter 2 Solution Methods for Matrix Games. Instructor: Chih-Wen Chang. Chih-Wen NCKU. Game Theory, Ch2 1

Connected Mathematics 2, 6th Grade Units (c) 2006 Correlated to: Utah Core Curriculum for Math (Grade 6)

Presented at SPIE Conf. Image Algebra and Morphological Image Processing II Conference 1568, pp , July 23-24, 1991, San Diego, CA.

Carmen Alonso Montes 23rd-27th November 2015

License Plate Localisation based on Morphological Operations

COMMON CORE STATE STANDARDS FOR MATHEMATICS K-2 DOMAIN PROGRESSIONS

Localization (Position Estimation) Problem in WSN

Filtering Images in the Spatial Domain Chapter 3b G&W. Ross Whitaker (modified by Guido Gerig) School of Computing University of Utah

8.2 Union, Intersection, and Complement of Events; Odds

Viewing Landsat TM images with Adobe Photoshop

Vehicle Number Plate Recognition Using Hybrid Mathematical Morphological Techniques

INF3410 Fall Book Chapter 6: Basic Opamp Design and Compensation

Optimal Spectrum Management in Multiuser Interference Channels

An Adaptive Kernel-Growing Median Filter for High Noise Images. Jacob Laurel. Birmingham, AL, USA. Birmingham, AL, USA

Remember that represents the set of all permutations of {1, 2,... n}

MA 524 Midterm Solutions October 16, 2018

1.G.1 Distinguish between defining attributes. Build and draw shapes that possess K.G.3 Identify shapes as 2-D (flat) or 3-D (solid)

Image Enhancement contd. An example of low pass filters is:

Aesthetically Pleasing Azulejo Patterns

IMAGE ENHANCEMENT IN SPATIAL DOMAIN

Functions of several variables

THE mobile wireless environment provides several unique

FPGA based Real-time Automatic Number Plate Recognition System for Modern License Plates in Sri Lanka

Student Outcomes. Classwork. Exercise 1 (3 minutes) Discussion (3 minutes)

VEHICLE LICENSE PLATE DETECTION ALGORITHM BASED ON STATISTICAL CHARACTERISTICS IN HSI COLOR MODEL

Georgia Department of Education Georgia Standards of Excellence Framework GSE Geometry Unit 6

Solutions of problems for grade R5

Sketching Fundamentals

Image analysis. CS/CME/BioE/Biophys/BMI 279 Oct. 31 and Nov. 2, 2017 Ron Dror

37 Game Theory. Bebe b1 b2 b3. a Abe a a A Two-Person Zero-Sum Game

Real- Time Computer Vision and Robotics Using Analog VLSI Circuits

Counting and Probability Math 2320

MAV-ID card processing using camera images

Double Integrals over More General Regions

Image Enhancement. DD2423 Image Analysis and Computer Vision. Computational Vision and Active Perception School of Computer Science and Communication

Wavelet Transform. From C. Valens article, A Really Friendly Guide to Wavelets, 1999

Unit 1.1: Information representation

Digital Image Processing Question Bank UNIT -I

ACM Fast Image Convolutions. by: Wojciech Jarosz

Digital Image Processing Face Detection Shrenik Lad Instructor: Dr. Jayanthi Sivaswamy

Before How does the painting compare to the original figure? What do you expect will be true of the painted figure if it is painted to scale?

Automatic Morphological Segmentation and Region Growing Method of Diagnosing Medical Images

Image Filtering. Reading Today s Lecture. Reading for Next Time. What would be the result? Some Questions from Last Lecture

Probability of Derangements

Practical Image and Video Processing Using MATLAB

n r for the number. (n r)!r!

Segmentation of Liver CT Images

Multiple Integrals. Advanced Calculus. Lecture 1 Dr. Lahcen Laayouni. Department of Mathematics and Statistics McGill University.

Improved 1D and 2D barcode detection with morphological operations

I.G.C.S.E. Solving Linear Equations. You can access the solutions from the end of each question

INF3410 Fall Book Chapter 6: Basic Opamp Design and Compensation

GATEWAY GIFTED RESOURCES TM

Three Pile Nim with Move Blocking. Arthur Holshouser. Harold Reiter.

Foundations of Multiplication and Division

HANDS-ON TRANSFORMATIONS: DILATIONS AND SIMILARITY (Poll Code 44273)

COMPARITIVE STUDY OF IMAGE DENOISING ALGORITHMS IN MEDICAL AND SATELLITE IMAGES

Transcription:

Chapter 2 Binary Opening and Closing Besides the two primary operations of erosion and dilation, there are two secondary operations that play key roles in morphological image processing, these being opening and its dual, closing. We focus mostly on opening, the properties of closing usually being analogous via complementation. Although opening is defined in terms of erosion and dilation, it possesses a more geometric formulation in terms of structuring element fits that is the basis for its application. 2.1 Opening The opening of image by image is denoted by composition of erosion and dilation by and is defined as a (2.1) A functional notation for opening is, and the command for opening in the MT is mmopen(a,b). For a better appreciation of the role of opening in processing, we state an equivalent formulation: (2.2) Here, the opening results from the union of all translations of the structuring element that fit inside the input image. Each fit is marked and the opening results from taking the union of the structuring element translations to each marked location. Indeed, this is precisely what is meant by eroding and then dilating. The expression of opening as erosion followed by dilation is illustrated in Fig. 2.1, where a rectangle is eroded and then dilated by a disk. It is also possible to discern the effect of fitting, as expressed in Eq. (2.2): opening the rectangle has resulted in it being rounded from the inside, this rounding resulting from the manner in which the disk has been rolled around inside the rectangle to achieve a union of the fits. Had the structuring element been a small square with horizontal base, then there would have been no rounding and the opened image would have been the same as the original. We see at once two applications of opening in Fig. 2.1. Opening by a disk results in a filter that smooths from the inside; that is, it rounds corners extending into the background. The effect is quite different with a square structuring element. Rather than view the opened image itself as the final output of the processing, we can take a different view. We can consider the set-theoretic subtraction of the opening from the input image. This operator is called opening top-hat: (2.3) 25

26 Chapter 2 Figure 2.1 (a) Structuring element, (b) input image, (c) erosion, (d) opening. Figure 2.2 (a) Structuring element, (b) input image, (c) opening, (d) opening top-hat. In Fig. 2.1, the opening top-hat consists of input-image corners that protrude into the background, and it can be employed for recognition purposes. Figure 2.2 shows another example of the opening top-hat to detect the teeth of a gear. Use of a disk is common because its shape-effect is rotationally invariant; however, there are many instances when it is beneficial to employ other kinds of structuring elements. As for a digital example, if and are the image and structuring element of Fig. 1.9 [Eq. (1.8)], then Example 2.1 >>> T=mmopen(S,mmimg2se(E)) # opening of S by E >>> print T [[0 0 0 0 0 0] [0 1 0 0 0 0] [0 1 1 0 0 0] [0 1 1 1 0 0] [0 0 0 0 0 0]] If we view as a triangle that has some background noise, then opening by has restored the triangle. We will shortly have much more to say on this type of restoration.

Binary Opening and Closing 27 Figure 2.3 (a) Structuring element, (b) input image, (c) dilation, (d) closing. 2.2 Closing The dual operation to opening is closing, which is defined as a dilation followed by an erosion. The closing of by is denoted by and is defined by (2.4) Closing is also denoted by in functional notation. In the MT, the close function is obtained by mmclose(a,b). Figure 2.3 illustrates closing. The effect can be seen in the manner in which the closing has filtered from the outside, smoothing only corners that protrude into the image. Closing is the dual operator of the opening because (2.5) Because closing is dual to opening, opening is dual to closing: replacing in Eq. (2.5) and complementing yields by (2.6) Note that the structuring element used in the closing is reflected. If is a disk or any symmetrical shape, reflection plays no role. Rather than employ the iteration of Eq. (2.4) we could employ duality in conjunction with the union formulation of opening given in Eq. (2.2), thereby fitting, or rolling the ball, around the outside of the image. Figure 2.4 illustrates the duality between open and close with a nonsymmetrical structuring element. As the closing contains the input image, the set-theoretical subtraction of the input image from the closing gives the closing top-hat operator: (2.7) Figure 2.5 shows an application of the closing and the closing top-hat. The closing of a shape by a large disk approximates its convex hull and the closing top-

28 Chapter 2 Figure 2.4 Duality between open and close with a nonsymmetrical structuring element. (a) (b) (c) Figure 2.5 (a) Input image, (b) closing by a disk, (d) closing top-hat. hat approximates its convex hull deficiencies. These deficiencies are commonly used in character recognition because of their powerful discriminant property. For a digital example we close image by structuring element of Fig. 1.9 [Eq. (1.8)] to obtain Example 2.2 >>> T = mmclose(s, mmimg2se(e)) # closing of S by E >>> print T [[ 0 0 0 0 0 0] [ 0 1 1 1 0 0] [ 0 1 1 1 1 0] [ 0 1 1 1 0 0] [ 0 0 0 0 0 0]] To see the pixel effect of opening and closing, consider the image and structuring element of Fig. 1.14, the opening and closing being shown in Fig. 2.6. As

Binary Opening and Closing 29 Figure 2.6 (a) Input image, (b) structuring element, (c) opening, (d) closing. a filter, opening has cleaned the boundary by eliminating small extrusions; however, it has done this in a much finer manner than erosion, the net effect being that the opened image is a much better replica of the original than the eroded image. Analogous remarks apply to the closing, the difference being the filling of small intrusions. Note that whereas the position of the origin relative to the structuring element has a role in both erosion and dilation, it plays no role in opening and closing. 2.3 Filter Properties Like erosion and dilation, opening and closing are both translation invariant: (2.8) (2.9) They are also increasing: if is a subset of, then is a subset of. They also satisfy some very special properties. An operator is said to be antiextensive if is always a subset of, and it is said to be extensive if always contains. Opening is antiextensive: must be a subset of. This follows from the fact that the opening is a union of translations lying within the input image. Closing is extensive: must contain. Therefore, the order relation (2.10) is always satisfied. This property is the basis of the top-hat operators defined by Eqs. (2.3) and (2.7). An operator is said to be idempotent if, for any set,. In words, operating twice by is equivalent to operating once by. Both opening and closing are idempotent:

30 Chapter 2 (a) (b) (c) Figure 2.7 Rectangle degraded by pepper noise: (a) input image, (b) disk structuring element, (c) opening. (2.11) (2.12) The importance of idempotence is that once an image has been opened (closed), successive openings (closings) produce no further effects. This is quite different than erosion or, if we think of linear processing, moving-average filters. In sum, whereas erosion and dilation satisfy two basic operator properties, translation invariance and increasing monotonicity, opening (closing) satisfies another two, namely antiextensivity (extensivity) and idempotence, and these play central roles in applying both opening and closing. 2.4 Application of Opening and Closing Filters We examine the kind of restoration that can be effected by opening and closing. Consider the rectangle degraded by pepper noise in Fig. 2.7. Opening by the disk has a restorative effect because the disk does not fit into the small components strewn about the background. Except for the rounded corners and the slight bubbles along the left and bottom edges, the rectangle has been restored. Perfect restoration could have been achieved by opening with a square; however, this would most likely be impractical, since it would require that we horizontally orient the noisy rectangle prior to filtering. Using a disk makes the filtering insensitive to rotation. Careful consideration of the fitting formulation of opening [Eq. (2.2)] shows the manner in which the opening acts as a filter: treating the structuring element as a shape primitive, it passes only those portions of the image that are part of some translation of the shape primitive that fits inside the image. Put rigorously, a point