CSE554Binary PicturesSlide 1 CSE 554 Lecture 1: Binary Pictures Fall 2014.

Slides:



Advertisements
Similar presentations
NA-MIC National Alliance for Medical Image Computing Slicer Tutorial Module: Segmentation May 26, 2005.
Advertisements

5th Intensive Course on Soil Micromorphology Naples th - 14th September Image Analysis Lecture 8 Introduction to Binary Morphology.
CSE554Cell ComplexesSlide 1 CSE 554 Lecture 3: Skeleton and Thinning (Part II) Fall 2013.
CSE554Cell ComplexesSlide 1 CSE 554 Lecture 3: Shape Analysis (Part II) Fall 2014.
Morphology The shape of things to come Courtesy Luca Galuzzi (Lucag)
Computational Biology, Part 23 Biological Imaging II Robert F. Murphy Copyright  1996, 1999, All rights reserved.
Image Processing in Matlab An Introductory Approach by Sabih D. Khan
Table of Contents 9.5 Some Basic Morphological Algorithm
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 ©
Chapter 9: Morphological Image Processing
Some Basic Morphological Algorithm
Course Syllabus 1.Color 2.Camera models, camera calibration 3.Advanced image pre-processing Line detection Corner detection Maximally stable extremal regions.
Morphology – Chapter 10. Binary image processing Often it is advantageous to reduce an image from gray level (multiple bits/pixel) to binary (1 bit/pixel)
Each pixel is 0 or 1, background or foreground Image processing to
Introduction to Morphological Operators
Morphological Image Processing Md. Rokanujjaman Assistant Professor Dept of Computer Science and Engineering Rajshahi University.
Provides mathematical tools for shape analysis in both binary and grayscale images Chapter 13 – Mathematical Morphology Usages: (i)Image pre-processing.
CSE554ContouringSlide 1 CSE 554 Lecture 4: Contouring Fall 2013.
Morphology Structural processing of images Image Processing and Computer Vision: 33 Morphological Transformations Set theoretic methods of extracting.
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.
2007Theo Schouten1 Morphology Set theory is the mathematical basis for morphology. Sets in Euclidic space E 2 (or rather Z 2 : the set of pairs of integers)
CSE554IntroductionSlide 1 CSE 554: Geometric Computing for Biomedicine Fall 2014.
CSE554Binary PicturesSlide 1 CSE 554 Lecture 1: Binary Pictures Fall 2013.
Chapter 3 Binary Image Analysis. Types of images ► Digital image = I[r][c] is discrete for I, r, and c.  B[r][c] = binary image - range of I is in {0,1}
Lecture 5. Morphological Image Processing. 10/6/20152 Introduction ► ► Morphology: a branch of biology that deals with the form and structure of animals.
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,
1Ellen L. Walker Segmentation Separating “content” from background Separating image into parts corresponding to “real” objects Complete segmentation Each.
CS 6825: Binary Image Processing – binary blob metrics
Course Syllabus 1.Color 2.Camera models, camera calibration 3.Advanced image pre-processing Line detection Corner detection Maximally stable extremal regions.
Digital Image Processing Chapter 9: Morphological Image Processing 5 September 2007 Digital Image Processing Chapter 9: Morphological Image Processing.
Morphological Image Processing
Gianni Ramponi University of Trieste Images © 2002 Gonzalez & Woods Digital Image Processing Chapter 9 Morphological Image.
1 Regions and Binary Images Hao Jiang Computer Science Department Sept. 25, 2014.
Mathematical Morphology Mathematical morphology (matematická morfologie) –A special image analysis discipline based on morphological transformations of.
CSE554SkeletonsSlide 1 CSE 554 Lecture 2: Shape Analysis (Part I) Fall 2015.
Computational Biology, Part 22 Biological Imaging II Robert F. Murphy Copyright  1996, 1999, All rights reserved.
CSE554ContouringSlide 1 CSE 554 Lecture 4: Contouring Fall 2015.
1 Euler Number Computation By Kishore Kulkarni (Under the Guidance of Dr. Longin Jan Latecki)
1 Regions and Binary Images Hao Jiang Computer Science Department Sept. 24, 2009.
CS 376b Introduction to Computer Vision 02 / 11 / 2008 Instructor: Michael Eckmann.
Mathematical Morphology
Low level Computer Vision 1. Thresholding 2. Convolution 3. Morphological Operations 4. Connected Component Extraction 5. Feature Extraction 1.
CS654: Digital Image Analysis
CDS 301 Fall, 2008 Image Visualization Chap. 9 November 11, 2008 Jie Zhang Copyright ©
EE 4780 Morphological Image Processing. Bahadir K. Gunturk2 Example Two semiconductor wafer images are given. You are supposed to determine the defects.
1 Mathematic Morphology used to extract image components that are useful in the representation and description of region shape, such as boundaries extraction.
Morphological Image Processing Robotics. 2/22/2016Introduction to Machine Vision Remember from Lecture 12: GRAY LEVEL THRESHOLDING Objects Set threshold.
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.
Lecture(s) 3-4. Morphological Image Processing. 3/13/20162 Introduction ► ► Morphology: a branch of biology that deals with the form and structure of.
Morphological Image Processing
Digital Image Processing CCS331 Relationships of Pixel 1.
CSE 554 Lecture 2: Shape Analysis (Part I)
CSE 554 Lecture 1: Binary Pictures
Game Theoretic Image Segmentation
COMP 9517 Computer Vision Segmentation 7/2/2018 COMP 9517 S2, 2017.
Introduction to Morphological Operators
Lecture 8 Introduction to Binary Morphology
Binary Image Analysis used in a variety of applications:
CS Digital Image Processing Lecture 5
Binary Image processing بهمن 92
Department of Computer Engineering
Morphological Image Processing
CSE 554 Lecture 3: Shape Analysis (Part II)
Morphological Operators
CS654: Digital Image Analysis
Binary Image Analysis used in a variety of applications:
Presentation transcript:

CSE554Binary PicturesSlide 1 CSE 554 Lecture 1: Binary Pictures Fall 2014

CSE554Binary PicturesSlide 2 Triangle surfaces Polyline Voxels CurvesSurfaces Geometric Forms Continuous forms – Defined by mathematical functions – E.g.: parabolas, splines, subdivision surfaces Discrete forms – Disjoint elements with connectivity relations – E.g.: polylines, triangle surfaces, pixels and voxels Pixels

CSE554Binary PicturesSlide 3 Digital Pictures Made up of discrete points associated with colors – Image: 2D array of pixels 2D Image

CSE554Binary PicturesSlide 4 Digital Pictures Color representations – Grayscale: 1 value representing grays from black (lowest value) to white (highest value) 8-bit (0-255), 16-bit, etc. – RGB: 3 values each representing colors from black (lowest value) to pure red, green, or blue (highest value). 24-bit (0-255 in each color) – XYZ, HSL/HSV, CMYK, etc. Grayscale LowHigh RGB Low RHigh R Low GHigh G Low BHigh B R G B

CSE554Binary PicturesSlide 5 Digital Pictures Made up of discrete points associated with colors – Volume: 3D array of voxels 3D Volume Voxel

CSE554Binary PicturesSlide 6 Binary Pictures A grayscale picture with 2 colors: black (0) and white (1) – The set of 1 or 0 pixels (voxels) is called object or background – A “blocky” geometry Background Object Analogy: lego

CSE554Binary PicturesSlide 7 Binary Pictures Creation Processing

CSE554Binary PicturesSlide 8 Segmentation Separating object from background in a grayscale picture – A simple method: thresholding by pixel (voxel) color All pixels (voxels) with color above a threshold is set to 1 Grayscale pictureThresholded binary picture

CSE554Binary PicturesSlide 9 Segmentation Separating object from background in a grayscale picture – A simple method: thresholding by pixel (voxel) color – Other methods: K-means clustering Watershed Region growing Snakes and Level set Graph cut … – More details covered in Computer Vision course

CSE554Binary PicturesSlide 10 Rasterization Filling the interior of a shape by pixels or voxels – Known as “scan-conversion”, or “voxelization” in 3D – More details covered in Computer Graphics course 2D PolygonBinary Picture

CSE554Binary PicturesSlide 11 Binary Pictures Creation Processing

CSE554Binary PicturesSlide 12 Binary Pictures Removing islands and holes Smoothing jagged boundaries

CSE554Binary PicturesSlide 13 Connected Components Take the largest 2 components of the object

CSE554Binary PicturesSlide 14 Connected Components How many connected components are there in the object? What about background?

CSE554Binary PicturesSlide 15 Connectivity (2D) Two pixels are connected if their squares share: – A common edge 4-connectivity – A common vertex 8-connectivity Two connected pixels x x All pixels connected to x 4-connectivity 8-connectivity

CSE554Binary PicturesSlide 16 Connectivity (2D) Connected component – A maximum set of pixels (voxels) in the object or background, such that any two pixels (voxels) in the set are connected by a path of connected pixels (voxels) 4-connected object (4 components) 8-connected object (1 component)

CSE554Binary PicturesSlide 17 Connectivity (2D) How to pick connectivity for object and background? Object: 8-connectivity (1 comp) Paradox: a closed curve does not disconnect the background, while an open curve does. Background: 8-connectivity (1 comp) Object: 4-connectivity (4 comp) Background: 4-connectivity (2 comp)

CSE554Binary PicturesSlide 18 Connectivity (2D) Different connectivity for object (O) and background (B) – 2D pixels: 4- and 8-connectivity respectively for O and B (or B and O) Object: 8-connectivity (1 comp) Background: 4-connectivity (2 comp) Object: 4-connectivity (4 comp) Background: 8-connectivity (1 comp)

CSE554Binary PicturesSlide 19 Connectivity (3D) Two voxels are connected if their cubes share: – A common face 6-connectivity – A common edge 18-connectivity – A common vertex 26-connectivity Use 6- and 26-connectivity respectively for O and B (or B and O) 6-connectivity 18-connectivity 26-connectivity Two connected voxels All voxels connected to the center voxel

CSE554Binary PicturesSlide 20 Finding Connected Components The “flooding” algorithm – Start from a seed pixel/voxel, expand the connected component – Either do depth-first or breadth-first search (a LIFO stack or FIFO queue) // Finding the connected component containing an object pixel p 1.Initialize 1.Create a result set S that contains only p 2.Create a Visited flag at each pixel, and set it to be False except for p 3.Initialize a queue (or stack) Q that contains only p. 2.Repeat until Q is empty: 1.Pop a pixel x from Q. 2.For each unvisited object pixel y connected to x, add y to S, set its flag to be visited, and push y to Q. 3.Output S // Finding the connected component containing an object pixel p 1.Initialize 1.Create a result set S that contains only p 2.Create a Visited flag at each pixel, and set it to be False except for p 3.Initialize a queue (or stack) Q that contains only p. 2.Repeat until Q is empty: 1.Pop a pixel x from Q. 2.For each unvisited object pixel y connected to x, add y to S, set its flag to be visited, and push y to Q. 3.Output S

CSE554Binary PicturesSlide 21 Finding Connected Components Why having a “visited” flag? – Avoid inserting the same pixel to the queue (stack) multiple times Only look for “unvisited” neighbors – Avoid searching in the list S for visited pixels 1. … 2.Repeat until Q is empty: 1.Pop a pixel x from Q. 2.For each unvisited object pixel y connected to x, add y to S, set its flag to be visited, and push y to Q. 3.Output S 1. … 2.Repeat until Q is empty: 1.Pop a pixel x from Q. 2.For each unvisited object pixel y connected to x, add y to S, set its flag to be visited, and push y to Q. 3.Output S

CSE554Binary PicturesSlide 22 Connectivity (2D) Connected components containing the blue pixel: 8-connectivity4-connectivity

CSE554Binary PicturesSlide 23 Finding Connected Components Labeling all components in an image: – Loop through each pixel (voxel). If it is not labeled, use it as a seed to find a connected component, then label all pixels (voxels) in the component. 8-connected object4-connected object One component Two components

CSE554Binary PicturesSlide 24 Using Connected Components Pruning isolated islands from the main object Filling interior holes of the object Take the largest 2 components of the object Invert the largest component of the background

CSE554Binary PicturesSlide 25 Morphological Operators Smoothing out object boundary Opening Closing

CSE554Binary PicturesSlide 26 Morphological Operators Operations to change shapes – Erosion – Dilation – Opening: first erode, then dilate. – Closing: first dilate, then erode.

CSE554Binary PicturesSlide 27 Morphological Operators Object (A)Structure element (B x ) x Dilation Erosion

CSE554Binary PicturesSlide 28 Morphological Operators Structure element B is symmetric if: Examples: CircleSquareTriangle

CSE554Binary PicturesSlide 29 Morphological Operators Duality (for symmetric structuring elements) – Erosion (dilation) is equivalent to dilation (erosion) of the background Dilation Erosion

CSE554Binary PicturesSlide 30 Morphological Operators Opening (erode, then dilate) – Shaves off convex corners and thin spikes Object (A) Structure element (Bx) x Opening

CSE554Binary PicturesSlide 31 Morphological Operators Closing (dilate, then erode) – Fills concave corners and thin tunnels Closing Object (A) Structure element (Bx) x

CSE554Binary PicturesSlide 32 Morphological Operators Opening: filling the object with structure elements Closing: filling the background with structure elements Duality, again!

CSE554Binary PicturesSlide 33 Digital Morphology Structuring elements (symmetric) – 2D pixels: square or cross – 3D voxels: cube or cross x x

CSE554Binary PicturesSlide 34 Digital Morphology Structuring element: 3x3 square – Erosion e : an object pixel with some background pixel in its square neighborhood – Dilation d : a background pixel with some object pixel in its square neighborhood e e e e e eee e d ddd dd d d d d d d dd dd dd

CSE554Binary PicturesSlide 35 Digital Morphology Structuring element: 3x3 square – Opening – Closing e e e e e eee e ddd ddd dd ErosionDilation ddd dddd dd dd dd ddddd d eee eeee ee ee ee eeeee Erosion Union of white squares within the object Union of black squares within the background

CSE554Binary PicturesSlide 36 Digital Morphology Increasing the size of the structuring element – Leads to more growing/shrinking and more significant smoothing – Equivalent to repeated applications with a small structuring element E.g.: k erosions (dilations) followed by k dilation (erosions) with a 3x3 square is equivalent to opening (closing) with a (2k+1)x(2k+1) square. OriginalOpening by 3x3 squareOpening by 5x5 square

CSE554Binary PicturesSlide 37 Digital Morphology Implementation tips – Using duality of erosion and dilation, you only need to implement one function to do both morphological operations. Dilation is same as erosion of the background – When performing multiple-round opening, make sure you first do k times erosion then k times dilation What happens if you alternate erosion and dilation for k times? – Handle image boundary in a graceful way (not crashing the program…) Treat outside of the image as background

CSE554Binary PicturesSlide 38 A simple 2D segmentation routine – Initial segmentation using thresholding (using your code from Lab 0) – Using connected components and opening/closing to “clean up” the segmentation. Lab Module 1