Mathematical Morphology

Slides:



Advertisements
Similar presentations
Segmentation by Morphological Watersheds
Advertisements

Smart Markers for Watershed-Based Cell Segmentation Can Fahrettin Koyuncu1, Salim Arslan1, Irem Durmaz2, Rengul Cetin-Atalay2, Cigdem Gunduz-Demir1* Present.
Course Syllabus 1.Color 2.Camera models, camera calibration 3.Advanced image pre-processing Line detection Corner detection Maximally stable extremal regions.
CDS 301 Fall, 2009 Image Visualization Chap. 9 November 5, 2009 Jie Zhang Copyright ©
Image Segmentation Image segmentation (segmentace obrazu) –division or separation of the image into segments (connected regions) of similar properties.
Chapter 9: Morphological Image Processing
Course Syllabus 1.Color 2.Camera models, camera calibration 3.Advanced image pre-processing Line detection Corner detection Maximally stable extremal regions.
Each pixel is 0 or 1, background or foreground Image processing to
Introduction to Morphological Operators
THE WATERSHED SEGMENTATION 1 NADINE GARAISY. GENERAL DEFINITION 2 A drainage basin or watershed is an extent or an area of land where surface water from.
Tutorial # 10 Morphological Operations I8oZE.
Provides mathematical tools for shape analysis in both binary and grayscale images Chapter 13 – Mathematical Morphology Usages: (i)Image pre-processing.
Morphology Structural processing of images Image Processing and Computer Vision: 33 Morphological Transformations Set theoretic methods of extracting.
EE 7730 Image Segmentation.
Thresholding Otsu’s Thresholding Method Threshold Detection Methods Optimal Thresholding Multi-Spectral Thresholding 6.2. Edge-based.
Chapter 9 Morphological Image Processing. Preview Morphology: denotes a branch of biology that deals with the form and structure of animals and planets.
Computer Vision Basics Image Terminology Binary Operations Filtering Edge Operators.
1 © 2010 Cengage Learning Engineering. All Rights Reserved. 1 Introduction to Digital Image Processing with MATLAB ® Asia Edition McAndrew ‧ Wang ‧ Tseng.
Mestrado em Ciência de Computadores Mestrado Integrado em Engenharia de Redes e Sistemas Informáticos VC 14/15 – TP9 Region-Based Segmentation Miguel Tavares.
E.G.M. PetrakisBinary Image Processing1 Binary Image Analysis Segmentation produces homogenous regions –each region has uniform gray-level –each region.
Lecture 5. Morphological Image Processing. 10/6/20152 Introduction ► ► Morphology: a branch of biology that deals with the form and structure of animals.
Morphological Image Processing
Mathematical Morphology Lecture 14 Course book reading: GW Lucia Ballerini Digital Image Processing.
Chapter 9.  Mathematical morphology: ◦ A useful tool for extracting image components in the representation of region shape.  Boundaries, skeletons,
September 23, 2014Computer Vision Lecture 5: Binary Image Processing 1 Binary Images Binary images are grayscale images with only two possible levels of.
Digital Image Processing CCS331 Relationships of Pixel 1.
Morphological Image Processing
Gianni Ramponi University of Trieste Images © 2002 Gonzalez & Woods Digital Image Processing Chapter 9 Morphological Image.
Image Segmentation and Morphological Processing Digital Image Processing in Life- Science Aviad Baram
AdeptSight Image Processing Tools Lee Haney January 21, 2010.
EECS 274 Computer Vision Segmentation by Clustering II.
Mathematical Morphology Mathematical morphology (matematická morfologie) –A special image analysis discipline based on morphological transformations of.
Course 2 Image Filtering. Image filtering is often required prior any other vision processes to remove image noise, overcome image corruption and change.
Digital Image Processing Lecture 16: Segmentation: Detection of Discontinuities Prof. Charlene Tsai.
References Books: Chapter 11, Image Processing, Analysis, and Machine Vision, Sonka et al Chapter 9, Digital Image Processing, Gonzalez & Woods.
图像处理技术讲座(11) Digital Image Processing (11) 灰度的数学形态学(3) Mathematical morphology in gray scale (3) 顾 力栩 上海交通大学 计算机系
CS654: Digital Image Analysis
Image Segmentation Image segmentation (segmentace obrazu)
CDS 301 Fall, 2008 Image Visualization Chap. 9 November 11, 2008 Jie Zhang Copyright ©
1 Mathematic Morphology used to extract image components that are useful in the representation and description of region shape, such as boundaries extraction.
Digital Image Processing Lecture 16: Segmentation: Detection of Discontinuities May 2, 2005 Prof. Charlene Tsai.
Morphological Image Processing Robotics. 2/22/2016Introduction to Machine Vision Remember from Lecture 12: GRAY LEVEL THRESHOLDING Objects Set threshold.
Machine Vision Edge Detection Techniques ENT 273 Lecture 6 Hema C.R.
TOPIC 12 IMAGE SEGMENTATION & MORPHOLOGY. Image segmentation is approached from three different perspectives :. Region detection: each pixel is assigned.
BYST Morp-1 DIP - WS2002: Morphology Digital Image Processing Morphological Image Processing Bundit Thipakorn, Ph.D. Computer Engineering Department.
Machine Vision ENT 273 Hema C.R. Binary Image Processing Lecture 3.
Course 3 Binary Image Binary Images have only two gray levels: “1” and “0”, i.e., black / white. —— save memory —— fast processing —— many features of.
Lecture(s) 3-4. Morphological Image Processing. 3/13/20162 Introduction ► ► Morphology: a branch of biology that deals with the form and structure of.
Chapter 6 Skeleton & Morphological Operation. Image Processing for Pattern Recognition Feature Extraction Acquisition Preprocessing Classification Post.
Morphological Image Processing
April 21, 2016Introduction to Artificial Intelligence Lecture 22: Computer Vision II 1 Canny Edge Detector The Canny edge detector is a good approximation.
Application 2 Detect Filarial Worms SourceBTTRemove NoisesThreshold Skeleton Eliminate short structures ReconstructionFinal result.
Mathematical Morphology
Gray-level images.
Digital Image Processing CP-7008 Lecture # 09 Morphological Image Processing Fall 2011.
Chapter 10 Image Segmentation
CSE 554 Lecture 1: Binary Pictures
Digital Image Processing Lecture 16: Segmentation: Detection of Discontinuities Prof. Charlene Tsai.
Computer Vision Lecture 5: Binary Image Processing
Computer Vision Lecture 9: Edge Detection II
CS Digital Image Processing Lecture 5
Miguel Tavares Coimbra
Binary Image processing بهمن 92
Department of Computer Engineering
Digital Image Processing Lecture 15: Morphological Algorithms
ECE 692 – Advanced Topics in Computer Vision
Computer and Robot Vision I
CS654: Digital Image Analysis
DIGITAL IMAGE PROCESSING Elective 3 (5th Sem.)
Morphological Filters Applications and Extension Morphological Filters
Presentation transcript:

Mathematical Morphology Mathematical morphology (matematická morfologie) A special image analysis discipline based on morphological transformations of the image (usually a binary image). Developed: In early 1980’s by the group of Jean Serra Centre de Morphologie Mathématique (CMM) Fontainebleau, France http://www.ensmp.fr/Eng/Research/Domain/MathInfoAuto/CMM/CMM.html http://cmm.ensmp.fr/Recherche/recherche_eng.htm Motivation: Binary image (obtained e.g. using thresholding or edge detection followed by edge linking and object filling) often needs further processing such as overlapping object separation, filling of holes, removal of narrow protrusions and other morphological (i.e. shape) changes.

Mathematical Morphology Basic principles: Such further processing is performed using one or a combination of several morphological transformations. The transformations work in a certain local neighborhood of each pixel (similarly to convolution) defined by so called structuring element (strukturní element). The structuring element can be square, cross-like or any other shape. There are two types of morphological transformations: binary and grey-scale. Binary transformations transform binary images into binary images. Grey-scale transformations transform grey-scale images into grey-scale images.

Mathematical Morphology: Binary Images Definition The 2D binary images are seen as point sets, where each point is defined as an ordered pair: (x-position, y-position) A morphological transformation  is then given by the relation of the point set X (input image) with another smaller point set B called structuring element. X = {(0,1),(1,1),(2,1),(2,2),(3,0),(4,0)}

Mathematical Morphology: Binary Images Example of two simple structuring elements (SE) Any structuring element B is expressed with respect to its local origin O (struck out point).

Mathematical Morphology: Binary Images Dilation (dilatace) notation: X  B definition: X  B = {d  E2: d=x+b for every x X and b B} (alternative def.: X  B = {d  E2: d=x-b for every x X and b B}) meaning: Dilation replaces zeros neighboring to ones by ones. example: X = {(0,1),(1,1),(2,1),(2,2),(3,0),(4,0)} B = {(0,0), (0,1)} X  B = {(0,1), (1,1), (2,1), (2,2), (3,0), (4,0), (0,2), (1,2), (2,2), (2,3), (3,1), (4,1)} source: Sonka, Hlavac, Image Processing, Analysis and Machine Vision

Mathematical Morphology: Binary Images Erosion (eroze) notation: X ⊝ B definition: X ⊝ B = {d  E2: d+b X for every b B} (alternative def.: X ⊝ B = {d  E2: d-b X for every b B}) meaning: Erosion replaces ones neighboring to zeros by zeros. example: X = {(0,1),(1,1),(2,1),(3,0),(3,1),(3,2),(3,3),(4,1)} B = {(0,0), (0,1)} X ⊝ B = {(3,0),(3,1),(3,2)} source: Sonka, Hlavac, Image Processing, Analysis and Machine Vision

Mathematical Morphology: Binary Images Closing (uzavření) Closing is dilation followed by erosion. Closing merges dense agglomerations of ones together, fills small holes and smoothes boundaries. Opening (otevření) Opening is erosion followed by dilation. Opening removes single ones, thin lines and divides objects connected with a narrow path (neck).

Mathematical Morphology: Binary Images Original Erosion with a 3x3 mask Opening with a 3x3 mask Opening with a 5x5 mask

Mathematical Morphology: Binary Images Original Dilation with a 3x3 mask Closing with a 3x3 mask Closing with a 5x5 mask

Mathematical Morphology: Binary Images Opening + Closing (3x3 mask) Opening + Closing (5x5 mask) Closing + Opening (3x3 mask) Closing + Opening (5x5 mask)

Mathematical Morphology: Binary Images Shrinking (”zcvrkávání”) Shrinking is a modification of erosion: object without holes erodes to a single pixel at or near its center of mass, object with holes erodes to a connected ring lying midway between each hole and its nearest outer boundary. Thinning (ztenčování) Thinning is a modification of erosion: object without holes erodes to a minimally connected stroke located equidistant from its nearest outer boundaries, object with holes erodes to a minimally connected ring lying midway between each hole and its nearest outer boundary. Skeletonizing (vytváření skeletu neboli kostry) Skeletonizing is a modification of erosion: object erodes to a set of points that are equally distant from two closest points of an object boundary (this set of points is also called medial axis skeleton). Skeleton uniquely describes the structure of the object.

Mathematical Morphology: Grey-scale Images Dilation (dilatace) Dilation replaces the central pixel with the maximum of its neighbors. Erosion (eroze) Erosion replaces the central pixel with the minimum of its neighbors. Closing (uzavření) Closing is dilation followed by erosion. Closing merges dense agglomerations of local maxima together, fills small holes and smoothes boundaries. Opening (otevření) Opening is erosion followed by dilation. Opening removes single local maxima, thin lines and divides objects connected with a narrow path (neck).

Watershed Algorithm Developed: Idea: 1978 by Ch. Lantuéjoul (CMM, Fontainebleau, France) 1979 by S. Beucher (CMM, Fontainebleau, France) Ch. Lantuéjoul, PhD thesis, CMM, 1978 http://cmm.ensmp.fr/~beucher/wtshed.html Idea: Flood simulation by increasing the water level step by step. The grey-scale image is considered as a topographic surface. Creation of catchment basins and watershed lines.

Watershed Algorithm Method: Image smoothing (usually Gaussian filter), the kernel size depends on object size and also on noise. Determination of maximum intensity (MaxI) and minimum intensity (MinI) of the whole image. Determination of so-called markers, i.e. seeds of future objects. Can be performed e.g. using a minimum filter. Binary image (BinImg) = empty image (zeros) For CurI = MinI to MaxI do Perform region growing from markers (or already existing regions of BinImg) so that all pixels with intensities lower or equal to CurI are included. Do not let the regions merge! BinImg now defines object territories. The number of objects is equal to the number of markers.

Watershed Algorithm Notes: The algorithm can work without markers, in this case markers are all local minima in the image (in 3x3 neighborhood). Markers can be determined manually or automatically using better approaches than minimum filter, e.g. using distance transform – the image is thresholded (bilevel thresholding), boundaries are determined and the shortest distance of each pixel to the closest boundary point is determined. Those pixels which have large distance to the boundary (larger than a pre-defined threshold) are taken as markers. The loop can be performed also from MaxI down to MinI for inverted images (bright objects and dark background). This approach is called anti-watershed. The algorithm is usually applied to gradient image (Sobel image) in order to detect object boundaries.

Example of the determination of markers and watershed Watershed Algorithm Example of the determination of markers and watershed Original grey-scale Thresholding (green) Watershed result Distance transform Segmentation (red) Markers (red) Markers (black)

Largest Contour Segmentation (LCS) Developed: 1996 by E.M.M.Manders (Delft, The Netherlands) Cytometry 23: 15-21 (1996) Idea: Iterative region growing around each local intensity maximum. Works on 2D as well as 3D images.

Largest Contour Segmentation (LCS) The Method 1) Noise filtering (average or median), the kernel size depends on noise type and magnitude. 2) Determination of local maxima and minimal intensity in the image (GlobalMinI) 3) Calculation of centers of local maxima, i.e. reduction of local maxima to 1 pixel. 4) For each local maximum do 4.1) Current threshold (CurT) = (Max intensity (LocalMaxI) + GlobalMinI) / 2 4.2) Number of iterations (I) = 0 4.3) Perform region growing from the center of the local maximum so that all neighboring pixels are included whose intensity values  CurT. 4.4) N = the number of centers inside this region. 4.5) I = I + 1 4.6) If I = BitDepth, finish iteration for the given center and go to step 5. 4.4) If N>1, CurT = (CurT + previous higher threshold) / 2 4.5) If N=1, CurT = (CurT + previous lower threshold) / 2 4.6) Go to step 4.3. 5) If N>1, Final threshold (FinT) = CurT+1 If N=1, Final threshold (FinT) = CurT

Largest Contour Segmentation (LCS) Example Original grey-scale Gaussian filter 7x7 Centers of local maxima GlobalMinI=27 LocalMaxI=207 (left top) LocalMaxI=183 (bot. right)

Largest Contour Segmentation (LCS) Example (continued for the bottom right cell) Input CurT=105 CurT=144 CurT=163 CurT=153 CurT=158 CurT=160 CurT=161 CurT=162 FinT=162