Morphological Image Algorithms

Similar documents
Mathematical morphology... M.1 Introduction... M.1 Dilation... M.3 Erosion... M.3 Closing... M.4 Opening... M.5 Summary... M.6

Colorado School of Mines. Computer Vision. Professor William Hoff Dept of Electrical Engineering &Computer Science.

Colorado School of Mines. Computer Vision. Professor William Hoff Dept of Electrical Engineering &Computer Science.

Morphological Image Processing

Introduction. Computer Vision & Digital Image Processing. Preview. Basic Concepts from Set Theory

Morphological Image Processing

Morphological Image Processing

EE795: Computer Vision and Intelligent Systems

[ ] Review. Edges and Binary Images. Edge detection. Derivative of Gaussian filter. Image gradient. Tuesday, Sept 16

Lecture 7: Morphological Image Processing

Morphological Image Processing

What will we learn? What is mathematical morphology? What is mathematical morphology? Fundamental concepts and operations

INF Exercise for Thursday

morphology on binary images

EECS490: Digital Image Processing. Lecture #17

International Journal of Advance Engineering and Research Development. Applications of Set Theory in Digital Image Processing

Biomedical Image Analysis. Mathematical Morphology

Albert M. Vossepoel. Center for Image Processing

Morphological Image Processing

Mathematical morphology (1)

Edges and Binary Images

09/11/2017. Morphological image processing. Morphological image processing. Morphological image processing. Morphological image processing (binary)

Chapter 9 Morphological Image Processing

Image Processing. Bilkent University. CS554 Computer Vision Pinar Duygulu

Edges and Binary Image Analysis April 12 th, 2018

C E N T E R A T H O U S T O N S C H O O L of H E A L T H I N F O R M A T I O N S C I E N C E S. Image Operations II

Digital image processing

From Pixels to Blobs

Figure 8-7: Cameraman.tif Before and After Remapping, and Widening its Dynamic Range

ECG782: Multidimensional Digital Signal Processing

ECG782: Multidimensional Digital Signal Processing

Cartoon Transformation

Image Analysis. Morphological Image Analysis

Previously. Edge detection. Today. Thresholding. Gradients -> edges 2/1/2011. Edges and Binary Image Analysis

Image Segmentation. Figure 1: Input image. Step.2. Use Morphological Opening to Estimate the Background

Binary Image Analysis. Binary Image Analysis. What kinds of operations? Results of analysis. Useful Operations. Example: red blood cell image

Processing of binary images

Elaborazione delle Immagini Informazione multimediale - Immagini. Raffaella Lanzarotti

EE 584 MACHINE VISION

Topic 6 Representation and Description

Morphological Compound Operations-Opening and CLosing

Mathematical Morphology and Distance Transforms. Robin Strand

Binary Shape Characterization using Morphological Boundary Class Distribution Functions

CS443: Digital Imaging and Multimedia Binary Image Analysis. Spring 2008 Ahmed Elgammal Dept. of Computer Science Rutgers University

Finger Print Analysis and Matching Daniel Novák

Filters. Advanced and Special Topics: Filters. Filters

CITS 4402 Computer Vision

3D-Modeling with Microscopy Image Browser (im_browser) (pdf version) Ilya Belevich, Darshan Kumar, Helena Vihinen

11/10/2011 small set, B, to probe the image under study for each SE, define origo & pixels in SE

ECE 172A: Introduction to Intelligent Systems: Machine Vision, Fall Midterm Examination

Edges and Binary Image Analysis. Thurs Jan 26 Kristen Grauman UT Austin. Today. Edge detection and matching

SECTION 5 IMAGE PROCESSING 2

A Method for Filling Holes in Objects of Medical Images Using Region Labeling and Run Length Encoding Schemes

Lab 2. Hanz Cuevas Velásquez, Bob Fisher Advanced Vision School of Informatics, University of Edinburgh Week 3, 2018

Morphological Image Processing GUI using MATLAB

Digital Image Processing Chapter 11: Image Description and Representation

Binary Image Processing. Introduction to Computer Vision CSE 152 Lecture 5

Morphological Image Processing

Mathematical morphology for grey-scale and hyperspectral images

11. Gray-Scale Morphology. Computer Engineering, i Sejong University. Dongil Han

Table 1. Different types of Defects on Tiles

Morphological Image Processing

UNIVERSITY OF OSLO. Faculty of Mathematics and Natural Sciences

REGION & EDGE BASED SEGMENTATION

Machine vision. Summary # 5: Morphological operations

CHAPTER 6 DETECTION OF MASS USING NOVEL SEGMENTATION, GLCM AND NEURAL NETWORKS

EECS490: Digital Image Processing. Lecture #23

The. Handbook ijthbdition. John C. Russ. North Carolina State University Materials Science and Engineering Department Raleigh, North Carolina

IN5520 Digital Image Analysis. Two old exams. Practical information for any written exam Exam 4300/9305, Fritz Albregtsen

Programming for Engineers in Python. Recitation 12 Image Processing

Counting Particles or Cells Using IMAQ Vision

Lecture: Segmentation I FMAN30: Medical Image Analysis. Anders Heyden

COMPUTER AND ROBOT VISION

Chapter 11 Representation & Description

A Simple Cigarette Butts Detection System

Mathematical Morphology a non exhaustive overview. Adrien Bousseau

Today INF How did Andy Warhol get his inspiration? Edge linking (very briefly) Segmentation approaches

Detection of Edges Using Mathematical Morphological Operators

Digital Image Processing Fundamentals

Character Recognition of High Security Number Plates Using Morphological Operator

Region & edge based Segmentation

eyes can easily detect and count these cells, and such knowledge is very hard to duplicate for computer.

10.5 Morphological Reconstruction

Image Segmentation. Segmentation is the process of partitioning an image into regions

A New Approach To Fingerprint Recognition

Getting Started With Images, Video, and Matlab. CSE 6367 Computer Vision Vassilis Athitsos University of Texas at Arlington

EN1610 Image Understanding Lab # 3: Edges

Morphology-form and structure. Who am I? structuring element (SE) Today s lecture. Morphological Transformation. Mathematical Morphology

Image Processing Toolbox

Automated Digital Conversion of Hand-Drawn Plots

EECS490: Digital Image Processing. Lecture #20

CHAPTER-4 LOCALIZATION AND CONTOUR DETECTION OF OPTIC DISK

Image Analysis Lecture Segmentation. Idar Dyrdal

Final Exam Schedule. Final exam has been scheduled. 12:30 pm 3:00 pm, May 7. Location: INNOVA It will cover all the topics discussed in class

CS534 Introduction to Computer Vision Binary Image Analysis. Ahmed Elgammal Dept. of Computer Science Rutgers University

Bioimage Informatics

All aids allowed. Laptop computer with Matlab required. Name :... Signature :... Desk no. :... Question

Gesture based PTZ camera control

ECEN 447 Digital Image Processing

Basic relations between pixels (Chapter 2)

Transcription:

Morphological Image Algorithms Examples 1

Example 1 Use thresholding and morphological operations to segment coins from background Matlab s eight.tif image 2

clear all close all I = imread('eight.tif'); imshow(i,[]); B = im2bw(i, graythresh(i)); B = imcomplement(b); % threshold % we want black regions S = strel('disk',1); B1 = imopen(b,s); % define a small structuring element % get rid of small white regions S = strel('disk', 5, 0); % Need structuring element bigger than gaps B2 = imclose(b1,s); % Fill in gaps figure, imshow(b2); 3

Example 2 Get boundary of the coin regions β ( A) = A ( Aθ B) 4

Example 3 Get a list of boundary pixels Array contours, size (Nx2): x1,y1 x2,y2 x3,y3 : xn,yn 5

Extract all boundaries B = bwboundaries(bw) Example 4 traces the exterior boundaries of objects, as well as boundaries of holes inside these objects, in the binary image BW. bwboundaries returns B, a P-by-1 cell array, where P is the number of objects and holes. Each cell in the cell array contains a Q-by-2 matrix. Each row in the matrix contains the row and column coordinates of a boundary pixel. Q is the number of boundary pixels for the corresponding region. A cell array is a data type with indexed data containers called cells. Each cell can contain any type of data. Cell arrays commonly contain lists of text strings, combinations of text and numbers, or numeric arrays of different sizes. You access one of the members of the cell array using curly brackets, {} 7

Example 4(continued) % Get all contours from the binary image B2. contours = bwboundaries(b2); figure, imshow(b2); hold on for k = 1:length(contours) boundary = contours{k}; % Get the kth contour plot(boundary(:,2), boundary(:,1), 'r', 'LineWidth', 2) end 8

Example 5 - skeletonization BW2 = bwmorph(bw, 'skel',n) With n = Inf, removes pixels on the boundaries of objects but does not allow objects to break apart. The pixels remaining make up the image skeleton. This option preserves the Euler number Image from http://www.heikohoffmann.de/htmlthesis/node144.html 9

Matlab function bwmorph bwmorph Morphological operations on binary image. BW2 = bwmorph(bw1,operation) applies a specific morphological operation to the binary image BW1. BW2 = bwmorph(bw1,operation,n) applies the operation N times. N can be Inf, in which case the operation is repeated until the image no longer changes. OPERATION is a string that can have one of these values: 'bothat' Subtract the input image from its closing 'branchpoints' Find branch points of skeleton 'bridge' Bridge previously unconnected pixels 'clean' Remove isolated pixels (1's surrounded by 0's) 'close' Perform binary closure (dilation followed by erosion) 'diag' Diagonal fill to eliminate 8-connectivity of background 'dilate' Perform dilation using the structuring element ones(3) 'endpoints' Find end points of skeleton 'erode' Perform erosion using the structuring element ones(3) 'fill' Fill isolated interior pixels (0's surrounded by 1's) 'hbreak' 'majority' 'open' 'remove' 'shrink' 'skel' 'spur' 'thicken' 'thin' 'tophat' Remove H-connected pixels Set a pixel to 1 if five or more pixels in its 3-by-3 neighborhood are 1's Perform binary opening (erosion followed by dilation) Set a pixel to 0 if its 4-connected neighbors are all 1's, thus leaving only boundary pixels With N = Inf, shrink objects to points; shrink objects with holes to connected rings With N = Inf, remove pixels on the boundaries of objects without allowing objects to break apart Remove end points of lines without removing small objects completely With N = Inf, thicken objects by adding pixels to the exterior of objects without connected previously unconnected objects With N = Inf, remove pixels so that an object without holes shrinks to a minimally connected stroke, and an object with holes shrinks to a ring halfway between the hole and outer boundary Subtract the opening from the input image 10

Example 6 Segment the defects The defects appear as dark patches in the cloth. Simply thresholding the image will not segment the defects, since the normal texture of the cloth also has dark pixels. However, the normal texture of the cloth is finer-grained than the defects. Morphological operations can be used to enhance the appearance of the defects 1. Estimate the radius of a defect. Create a disk structuring element of that size. 2. Use that structuring element to enhance the defects. Which operation should be used, imopen or imclose? 3. After enhancing, threshold the image (you can pick the threshold by hand) to segment the defects, find connected components, and draw a bounding box around each defect. Image: cloth_0199.jpg 11