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.

Slides:



Advertisements
Similar presentations
Binary Image Analysis Selim Aksoy Department of Computer Engineering Bilkent University
Advertisements

Morphology The shape of things to come Courtesy Luca Galuzzi (Lucag)
Binary Image Analysis Selim Aksoy Department of Computer Engineering Bilkent University
電腦視覺 Computer and Robot Vision I Chapter2: Binary Machine Vision: Thresholding and Segmentation Instructor: Shih-Shinh Huang 1.
Chapter 9: Morphological Image Processing
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
Common Low-level Operations for Processing & Enhancement
Morphology Structural processing of images Image Processing and Computer Vision: 33 Morphological Transformations Set theoretic methods of extracting.
Processing Digital Images. Filtering Analysis –Recognition Transmission.
Segmentation Divide the image into segments. Each segment:
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
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}
Machine Vision for Robots
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.
September 23, 2014Computer Vision Lecture 5: Binary Image Processing 1 Binary Images Binary images are grayscale images with only two possible levels of.
Morphological Image Processing
Image Segmentation and Morphological Processing Digital Image Processing in Life- Science Aviad Baram
Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.
1 Regions and Binary Images Hao Jiang Computer Science Department Sept. 25, 2014.
CS654: Digital Image Analysis
1 Regions and Binary Images Hao Jiang Computer Science Department Sept. 24, 2009.
DIGITAL IMAGE PROCESSING Instructors: Dr J. Shanbehzadeh Mostafa Mahdijo Mostafa Mahdijo ( J.Shanbehzadeh.
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.
Morphological Image Processing Robotics. 2/22/2016Introduction to Machine Vision Remember from Lecture 12: GRAY LEVEL THRESHOLDING Objects Set threshold.
Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.
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.
Morphological Image Processing (Chapter 9) CSC 446 Lecturer: Nada ALZaben.
Morphological Image Processing
1 Review and Summary We have covered a LOT of material, spending more time and more detail on 2D image segmentation and analysis, but hopefully giving.
Previous Lecture: Signal Processing A general strategy for separating signal from noise: 1.Characterize the signal and the noise 2.Make a model of the.
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.
COMP 9517 Computer Vision Binary Image Analysis 4/15/2018
Common Low-level Operations for Processing & Enhancement
CSE 484: Computer Vision Fatoş T. Yarman Vural Atıl İşçen
CSE 554 Lecture 1: Binary Pictures
Binary Image Analysis Gokberk Cinbis
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
Binary Image processing بهمن 92
Computer and Robot Vision I
CSSE463: Image Recognition Day 9
Department of Computer Engineering
Binary Image Analysis: Part 2 Readings: Chapter 3:
CSSE463: Image Recognition Day 9
Computer and Robot Vision I
Computer and Robot Vision I
DIGITAL IMAGE PROCESSING Elective 3 (5th Sem.)
Binary Image Analysis used in a variety of applications:
Presentation transcript:

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 images of 0’s and 1’s. 0 represents the background 1 represents the foreground

2 Binary Image Analysis is used in a number of practical applications, e.g. is used in a number of practical applications, e.g. part inspection riveting fish counting document processing

3 What kinds of operations? Separate objects from background and from one another Aggregate pixels for each object Compute features for each object

4 Example: red blood cell image Many blood cells are separate objects Many blood cells are separate objects Many touch – bad! Many touch – bad! Salt and pepper noise from thresholding Salt and pepper noise from thresholding How useable is this data? How useable is this data?

5 Results of analysis 63 separate objects detected 63 separate objects detected Single cells have area about 50 Single cells have area about 50 Noise spots Noise spots Gobs of cells Gobs of cells

6 Useful Operations 1. Thresholding a gray-tone image 2. Determining good thresholds 3. Connected components analysis 4. Binary mathematical morphology 5. All sorts of feature extractors (area, centroid, circularity, …)

7 Thresholding Background is black Background is black Healthy cherry is bright Healthy cherry is bright Bruise is medium dark Bruise is medium dark Histogram shows two cherry regions (black background has been removed) Histogram shows two cherry regions (black background has been removed) gray-tone values pixel counts 0 256

8 Histogram-Directed Thresholding How can we use a histogram to separate an image into 2 (or several) different regions? Is there a single clear threshold? 2? 3?

9 Automatic Thresholding: Otsu’s Method Assumption: the histogram is bimodal t Method: find the threshold t that minimizes the weighted sum of within-group variances for the two groups that result from separating the gray tones at value t. See text (at end of Chapter 3) for the recurrence relations; in practice, this operator works very well for true bimodal distributions and not too badly for others, but not the CTs. Grp 1 Grp 2

10 Thresholding Example original gray tone imagebinary thresholded image

11 Connected Components Labeling Once you have a binary image, you can identify and then analyze each connected set of pixels. The connected components operation takes in a binary image and produces a labeled image in which each pixel has the integer label of either the background (0) or a component. binary image after morphology connected components

12 Methods for CC Analysis 1. Recursive Tracking (almost never used) 2. Parallel Growing (needs parallel hardware) 3. Row-by-Row (most common) Classical Algorithm (see text) Efficient Run-Length Algorithm (developed for speed in real industrial applications)

13 Equivalent Labels Original Binary Image

14 Equivalent Labels The Labeling Process 1  2 1  3

15 Run-Length Data Structure U N U S E D row scol ecol label Rstart Rend Runs Row Index Binary Image

16 Run-Length Algorithm Procedure run_length_classical { initialize Run-Length and Union-Find data structures count <- 0 /* Pass 1 (by rows) */ for each current row and its previous row { move pointer P along the runs of current row move pointer Q along the runs of previous row

17 Case 1: No Overlap |/////| |/////| |////| |///| |///| |/////| Q P Q P /* new label */ count <- count + 1 label(P) <- count P <- P + 1 /* check Q’s next run */ Q <- Q + 1

18 Case 2: Overlap Subcase 1: P’s run has no label yet |///////| |/////| |/////////////| Subcase 2: P’s run has a label that is different from Q’s run |///////| |/////| |/////////////| Q Q P P label(P) <- label(Q) move pointer(s) union(label(P),label(Q)) move pointer(s) }

19 Pass 2 (by runs) Pass 2 (by runs) /* Relabel each run with the name of the equivalence class of its label */ For each run M { label(M) <- find(label(M)) } where union and find refer to the operations of the Union-Find data structure, which keeps track of sets of equivalent labels.

20 Labeling shown as Pseudo-Color connected components of 1’s from thresholded image connected components of cluster labels

21 Mathematical Morphology Binary mathematical morphology consists of two basic operations dilation and erosion and several composite relations closing and opening conditional dilation...

22 Dilation Dilation expands the connected sets of 1s of a binary image. It can be used for 1. growing features 2. filling holes and gaps

23 Erosion Erosion shrinks the connected sets of 1s of a binary image. It can be used for 1. shrinking features 2. Removing bridges, branches and small protrusions

24 Structuring Elements A structuring element is a shape mask used in the basic morphological operations. They can be any shape and size that is digitally representable, and each has an origin. box hexagon disk something box(length,width) disk(diameter)

25 Dilation with Structuring Elements The arguments to dilation and erosion are 1.a binary image B 2.a structuring element S dilate(B,S) takes binary image B, places the origin of structuring element S over each 1-pixel, and ORs the structuring element S into the output image at the corresponding position origin B S dilate B  S

26 Erosion with Structuring Elements erode(B,S) takes a binary image B, places the origin of structuring element S over every pixel position, and ORs a binary 1 into that position of the output image only if every position of S (with a 1) covers a 1 in B B S origin erode B S

27 Example to Try erode dilate with same structuring element S B

28 Opening and Closing Closing is the compound operation of dilation followed by erosion (with the same structuring element) Opening is the compound operation of erosion followed by dilation (with the same structuring element)

29 Use of Opening Original Opening Corners 1.What kind of structuring element was used in the opening? 2.How did we get the corners?

30 Gear Tooth Inspection original binary image detected defects How did they do it?

31 Some Details

32 Region Properties Properties of the regions can be used to recognize objects. geometric properties (Ch 3) gray-tone properties color properties texture properties shape properties (a few in Ch 3) motion properties relationship properties (1 in Ch 3)

33 Geometric and Shape Properties area centroid perimeter perimeter length circularity elongation mean and standard deviation of radial distance bounding box extremal axis length from bounding box second order moments (row, column, mixed) lengths and orientations of axes of best-fit ellipse Which are statistical? Which are structural?

34 Region Adjacency Graph 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 regions are adjacent