COMP 9517 Computer Vision Binary Image Analysis 4/15/2018

Slides:



Advertisements
Similar presentations
電腦視覺 Computer and Robot Vision I
Advertisements

Course Syllabus 1.Color 2.Camera models, camera calibration 3.Advanced image pre-processing Line detection Corner detection Maximally stable extremal regions.
電腦視覺 Computer and Robot Vision I Chapter2: Binary Machine Vision: Thresholding and Segmentation Instructor: Shih-Shinh Huang 1.
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
Chapter 9 Morphological Image Processing. Preview Morphology: denotes a branch of biology that deals with the form and structure of animals and planets.
1 Binary Image Analysis Binary image analysis consists of a set of image analysis operations that are used to produce or process binary images, usually.
Binary Image Analysis: Part 2 Readings: Chapter 3: mathematical morphology region properties region adjacency 1.
Objective of Computer Vision
Computer Vision Basics Image Terminology Binary Operations Filtering Edge Operators.
1. Binary Image B(r,c) 2 0 represents the background 1 represents the foreground
E.G.M. PetrakisBinary Image Processing1 Binary Image Analysis Segmentation produces homogenous regions –each region has uniform gray-level –each region.
1. Binary Image B(r,c) 2 0 represents the background 1 represents the foreground
Machine Vision for Robots
Lecture 5. Morphological Image Processing. 10/6/20152 Introduction ► ► Morphology: a branch of biology that deals with the form and structure of animals.
Recap CSC508.
Chapter 9.  Mathematical morphology: ◦ A useful tool for extracting image components in the representation of region shape.  Boundaries, skeletons,
Chap 3 : Binary Image Analysis. Counting Foreground Objects.
CS 6825: Binary Image Processing – binary blob metrics
CS 376b Introduction to Computer Vision 02 / 22 / 2008 Instructor: Michael Eckmann.
Course Syllabus 1.Color 2.Camera models, camera calibration 3.Advanced image pre-processing Line detection Corner detection Maximally stable extremal regions.
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 Chapter 9: Morphological Image Processing 5 September 2007 Digital Image Processing Chapter 9: Morphological Image Processing.
Morphological Image Processing
1 Binary Image Analysis Binary image analysis consists of a set of image analysis operations that are used to produce or process binary images, usually.
J. Shanbehzadeh M. Hosseinajad Khwarizmi University of Tehran.
Chapter 3 cont’d. Binary Image Analysis. Binary image morphology (nonlinear image processing)
1 Regions and Binary Images Hao Jiang Computer Science Department Sept. 25, 2014.
Digital Image Processing CSC331 Morphological image processing 1.
CS 376b Introduction to Computer Vision 02 / 11 / 2008 Instructor: Michael Eckmann.
Low level Computer Vision 1. Thresholding 2. Convolution 3. Morphological Operations 4. Connected Component Extraction 5. Feature Extraction 1.
CS654: Digital Image Analysis
Nottingham Image Analysis School, 23 – 25 June NITS Image Segmentation Guoping Qiu School of Computer Science, University of Nottingham
CSSE463: Image Recognition Day 9 Lab 3 (edges) due Weds, 3:25 pm Lab 3 (edges) due Weds, 3:25 pm Take home quiz due Friday, 4:00 pm. Take home quiz due.
CS 376b Introduction to Computer Vision 02 / 12 / 2008 Instructor: Michael Eckmann.
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
Morphological Image Processing Robotics. 2/22/2016Introduction to Machine Vision Remember from Lecture 12: GRAY LEVEL THRESHOLDING Objects Set threshold.
Machine Vision ENT 273 Hema C.R. Binary Image Processing Lecture 3.
Digital Image Processing, 3rd ed. © 1992–2008 R. C. Gonzalez & R. E. Woods Gonzalez & Woods Chapter 11 Representation and.
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
1. Images as Functions 2 A Binary image is a function B(x,y) Є [0,1] Gray-tone image is a function: g(x,y) Є [0.,1,….L-1] A color image is represented.
Digital Image Processing Lecture 15: Morphological Algorithms April 27, 2005 Prof. Charlene Tsai.
Digital Image Processing CP-7008 Lecture # 09 Morphological Image Processing Fall 2011.
COMP 9517 Computer Vision Segmentation 7/2/2018 COMP 9517 S2, 2017.
Binary Image Analysis Gokberk Cinbis
HIT and MISS.
Introduction to Morphological Operators
Computer Vision Lecture 5: Binary Image Processing
Binary Image Analysis: Part 1 Readings: Chapter 3: 3.1, 3.4, 3.8
Binary Image Analysis used in a variety of applications:
Binary Image Analysis: Part 1 Readings: Chapter 3: 3.1, 3.4, 3.8
CS Digital Image Processing Lecture 5
Binary Image processing بهمن 92
Computer and Robot Vision I
CSSE463: Image Recognition Day 9
Department of Computer Engineering
Digital Image Processing Lecture 15: Morphological Algorithms
Binary Image Analysis: Part 2 Readings: Chapter 3:
CSSE463: Image Recognition Day 9
Computer and Robot Vision I
Computer and Robot Vision I
CS654: Digital Image Analysis
Morphological Operators
DIGITAL IMAGE PROCESSING Elective 3 (5th Sem.)
Binary Image Analysis used in a variety of applications:
Morphological Filters Applications and Extension Morphological Filters
Presentation transcript:

COMP 9517 Computer Vision Binary Image Analysis 4/15/2018 COMP 9517 S2, 2009

Binary Image Analysis How to do this? ? 4/15/2018 COMP 9517 S2, 2009

Binary Image Analysis How to obtain binary images from scale-level images? How to extract connected groups of pixels (components)? How to process the separate components? How to extract properties of components for use in high-level tasks? 4/15/2018 COMP 9517 S2, 2009

Binary Image Definition: A binary image is a digital image with all pixel values 0 or 1 Foreground: a subset of image pixels that are of interest in an image analysis task Background: the rest of the image A binary image B can be obtained from a gray-scale image or colour image through a selection operator: Thresholding: subset of gray tones or colour space Classification, segmentation, etc 4/15/2018 COMP 9517 S2, 2009

Binary Image Example A gray-scale image contains the character “C” Threshold t=200 to obtain a binary image 1s denote foreground pixels, 0s background pixels 1 4/15/2018 COMP 9517 S2, 2009

Binary Image Analysis Thresholding: convert gray scale image to binary image Labelling: connected component labelling Counting: object counting Thinning & Thickening: join and/or separate components Component Properties: extract features for higher level processes 4/15/2018 COMP 9517 S2, 2009

Applications Document analysis Industrial machine vision Counting, recognition, localisation and inspection tasks 4/15/2018 COMP 9517 S2, 2009

Thresholding Binary image can be obtained from gray-scale images by thresholding Choose foreground and background based on the distribution of gray tones Types of thresholding: threshold above: p ≥ the threshold t threshold below: p < t threshold inside: t1 ≤ p < t2 threshold outside: p < t1 or p ≥ t2 4/15/2018 COMP 9517 S2, 2009

How to choose the thresholds The basis for choosing a threshold is the histogram of the gray-tone image The histogram h of gray-tone image I is defined by Where m spans the gray-level values. 4/15/2018 COMP 9517 S2, 2009

Compute A Histogram Compute the histogram H of gray-scale image I Procedure histogram(I,H) { //Initialise the bins of the histogram to zero. for i=0 to MaxVal H[i] = 0; //Compute values by accumulation. for r=0 to MaxRow for c=0 to MaxCol { grayval = I[r,c]; H[grayval] = H[grayval] + 1; } 4/15/2018 COMP 9517 S2, 2009

Threshold from Histogram Bimodal: one mode corresponding to dark pixels the other one corresponding to light pixels choose any value in the valley between two modes Overlapped modes – more difficult t t 4/15/2018 COMP 9517 S2, 2009

Pixel and Neighbourhoods Not only the value of a pixel but also its neighbours are used 4-neighbours and 8-neighbours N4[r,c]: {[r-1,c],[r+1,c],[r,c-1], and [r,c+1]} N8[r,c]: N4[r,c] + {[r-1,c-1], [r-1,c+1], [r+1, c-1], and [r+1,c-1]} A pixel [r’,c’] neighbours a pixel [r,c] if [r’,c’] lies in the selected type of neighbourhood of [r,c] N W * E S NW N NE W * E SW S SE 4/15/2018 COMP 9517 S2, 2009

Masks Mask: a set of pixel positions and corresponding values called weights Origin of a mask: usually the centre of the mask 1 1 2 4 1 4/15/2018 COMP 9517 S2, 2009

Applying a Mask Convolution: apply a mask to an image yields same size output image for each pixel, place the mask on the image with the mask origin on that pixel value of pixel under the mask multiplied by the corresponding mask weight summed up to a single output value for the pixel 4/15/2018 COMP 9517 S2, 2009

Example of Applying a Mask 40 80 640 800 1120 1280 40 50 70 80 1 2 4 the sum of the weights 4/15/2018 COMP 9517 S2, 2009

Example of Applying a Mask 40 80 *1 *2 *4 40 80 640 40 80 40 80 *1 *2 *4 640 800 1 2 4 4/15/2018 COMP 9517 S2, 2009

Connected Component Labelling Definition: a connected component labelling of a binary image B is a labelled image LB in which the value of each pixel is the label of its connected component. 1 1 2 3 4/15/2018 COMP 9517 S2, 2009

Recursive Labelling B is the original binary image; LB will be the labelled connected component image. Recursive_connected_components(B, LB) { LB = negate(B); label = 0; Find_components(LB, label); } Find_components(LB,label){ for (r=0 to MaxRow) for (c=0 to MaxCol) if (LB[r, c]==-1){ label = label + 1; Search(LB, label, r, c); Search(LB, label, r, c) { LB[r, c] = label; Nset = neighbours(r, c); for ([r’, c’] in Nset) if (LB[r’, c’]==-1) Search(LB, label, r, c); 4/15/2018 COMP 9517 S2, 2009

Recursive Labelling 4/15/2018 COMP 9517 S2, 2009 1 2 * 3 4 1 -1 1 -1 1 1 -1 1 -1 1 -1 1 2 -1 1 2 -1 4/15/2018 COMP 9517 S2, 2009

Binary Image Morphology Morphology refers to form, structure and the shape of a region in computer vision Mathematical morphology: set operations Structuring element: a shape presented by a binary image, any size and arbitrary structure Common structuring element: Box, Disk & Ring 1 1 1 4/15/2018 COMP 9517 S2, 2009

Basic Morphology Operations Dilation: enlarges a region Erosion: makes a region smaller Closing: closes up internal holes and eliminate bays on boundaries Opening: gets rid of juts 4/15/2018 COMP 9517 S2, 2009

Dilation Definition: the dilation of a binary image B by structuring element S is denoted by and is defined by S is swept over B When the origin of S touches 1 in B, S is ORed to the output image 4/15/2018 COMP 9517 S2, 2009

Dilation 1 1 1 S 1 1 1 1 B 1 1 1 4/15/2018 COMP 9517 S2, 2009

Erosion Definition: the erosion of a binary image B by structuring element S is denoted by B S and is defined by B S S is swept over B When every element of S covers a 1-pixel in B, the pixel in B corresponding to the origin of S is ORed to the output image 4/15/2018 COMP 9517 S2, 2009

Erosion 1 1 S 1 1 1 1 B 1 1 4/15/2018 COMP 9517 S2, 2009

Closing Definition: The closing of a binary image B by structuring element S is denote by and is defined by 1 S 1 1 1 B 4/15/2018 COMP 9517 S2, 2009

Opening Definition: the opening of a binary image B by structuring element S is denoted by and is defined by 1 S 1 1 1 B 4/15/2018 COMP 9517 S2, 2009

Conditional Dilation Remove noise by erosion, but want to keep entire components Definition: give an original binary image B, a processed binary image C and a structuring element S, let and . The conditional dilation of C by S with respect to B is defined by where the index m is the smallest index satisfy 4/15/2018 COMP 9517 S2, 2009

Conditional Dilation C is repeatedly dilated by S, and each result is reduce to only the pixels that were 1s in B 1 1 V S 1 1 1 1 B C AND 4/15/2018 COMP 9517 S2, 2009

Other Morphological Algorithms Boundary extraction 4/15/2018 COMP 9517 S2, 2009

Basic Morphological Algorithms Region Filling 4/15/2018 COMP 9517 S2, 2009

Applications of Morphology Opening & closing to separate components and remove holes Thresholding Opening + Closing 4/15/2018 COMP 9517 S2, 2009

Applications of Morphology Industrial inspection – identify defects hole_ring, hole_mask, gear_body, sampling_ring_spacer, sampling_ring_width, tip_spacing , defect_cue a b c d f g h e 4/15/2018 COMP 9517 S2, 2009

Applications of Morphology Feature extraction Extract shape corners Original image B Resultant opening R Corner image C=B-R 4/15/2018 COMP 9517 S2, 2009

Region Properties Properties of the regions as input to higher- level procedures for decision making Area: Centroid: Perimeter 4/15/2018 COMP 9517 S2, 2009

Region Properties Perimeter length Circularity Mean radial distance Standard deviation of radial distance 4/15/2018 COMP 9517 S2, 2009

Region Properties Bounding box and extremal points Extremal axis length 4/15/2018 COMP 9517 S2, 2009

Region Properties Second-order row moment Second-order column moment Second-order mixed moment 4/15/2018 COMP 9517 S2, 2009

Region Adjacency Graphs Definition: a region adjacency graph(RAG) is a graph in which each node represents a region of the image, and an edge connects two nodes if the two regions are adjacent. 1 2 -1 3 -2 -3 1 -1 2 -3 3 -2 4/15/2018 COMP 9517 S2, 2009

References Shaoo, P.K., and others. 1988. A survey of thresholding techniques. Compu. Vision, Graphics, and Image Proc. V.41:233-260. Rosefeld,A., and J.L. Pfaltz, 1966. Sequential operations in digital picture processing. Journal of the Association for Computing Machinery, Vol. 13: 471-494. Serra, J. 1982. Image Analysis and Mathematical Morphology. Academic Press, New York. 4/15/2018 COMP 9517 S2, 2009

Acknowledgement Some material, including images and tables, were drawn from the textbook and Digital Image Processing by Gonzalesz and Woods. 4/15/2018 COMP 9517 S2, 2009