E.G.M. PetrakisBinary Image Processing1 Binary Image Analysis Segmentation produces homogenous regions –each region has uniform gray-level –each region.

Slides:



Advertisements
Similar presentations
Programming Assignment 2 CS 302 Data Structures Dr. George Bebis.
Advertisements

Table of Contents 9.5 Some Basic Morphological Algorithm
Document Image Processing
CDS 301 Fall, 2009 Image Visualization Chap. 9 November 5, 2009 Jie Zhang Copyright ©
Lecture 07 Segmentation Lecture 07 Segmentation Mata kuliah: T Computer Vision Tahun: 2010.
電腦視覺 Computer and Robot Vision I Chapter2: Binary Machine Vision: Thresholding and Segmentation Instructor: Shih-Shinh Huang 1.
Chapter 9: Morphological Image Processing
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.
Tutorial # 10 Morphological Operations I8oZE.
September 10, 2013Computer Vision Lecture 3: Binary Image Processing 1Thresholding Here, the right image is created from the left image by thresholding,
Provides mathematical tools for shape analysis in both binary and grayscale images Chapter 13 – Mathematical Morphology Usages: (i)Image pre-processing.
Chapter 5 Raster –based algorithms in CAC. 5.1 area filling algorithm 5.2 distance transformation graph and skeleton graph generation algorithm 5.3 convolution.
Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Chapter 9 Morphological Image Processing Chapter 9 Morphological.
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.
Objective of Computer Vision
Objective of Computer Vision
Lectures 10&11: Representation and description
Digital Image Processing
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,
CS 6825: Binary Image Processing – binary blob metrics
September 23, 2014Computer Vision Lecture 5: Binary Image Processing 1 Binary Images Binary images are grayscale images with only two possible levels of.
Morphological Processing
Digital Image Processing CCS331 Relationships of Pixel 1.
Morphological Image Processing
Image Segmentation and Morphological Processing Digital Image Processing in Life- Science Aviad Baram
Introduction Image geometry studies rotation, translation, scaling, distortion, etc. Image topology studies, e.g., (i) the number of occurrences.
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.
1 Regions and Binary Images Hao Jiang Computer Science Department Sept. 24, 2009.
CS654: Digital Image Analysis
Mathematical Morphology
Low level Computer Vision 1. Thresholding 2. Convolution 3. Morphological Operations 4. Connected Component Extraction 5. Feature Extraction 1.
References Books: Chapter 11, Image Processing, Analysis, and Machine Vision, Sonka et al Chapter 9, Digital Image Processing, Gonzalez & Woods.
CS654: Digital Image Analysis
Nottingham Image Analysis School, 23 – 25 June NITS Image Segmentation Guoping Qiu School of Computer Science, University of Nottingham
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.
1 Overview representing region in 2 ways in terms of its external characteristics (its boundary)  focus on shape characteristics in terms of its internal.
Morphological Image Processing Robotics. 2/22/2016Introduction to Machine Vision Remember from Lecture 12: GRAY LEVEL THRESHOLDING Objects Set threshold.
 Mathematical morphology is a tool for extracting image components that are useful in the representation and description of region shape, such as boundaries,
Morphology Morphology deals with form and structure Mathematical morphology is a tool for extracting image components useful in: –representation and description.
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 (Chapter 9) CSC 446 Lecturer: Nada ALZaben.
Morphological Image Processing
Relationship between pixels Neighbors of a pixel – 4-neighbors (N,S,W,E pixels) == N 4 (p). A pixel p at coordinates (x,y) has four horizontal and vertical.
Sheng-Fang Huang Chapter 11 part I.  After the image is segmented into regions, how to represent and describe these regions? ◦ In terms of its external.
April 21, 2016Introduction to Artificial Intelligence Lecture 22: Computer Vision II 1 Canny Edge Detector The Canny edge detector is a good approximation.
Digital Image Processing CP-7008 Lecture # 09 Morphological Image Processing Fall 2011.
IT472: Digital Image Processing
Game Theoretic Image Segmentation
Introduction to Morphological Operators
Mean Shift Segmentation
Computer Vision Lecture 5: Binary Image Processing
Computer Vision Lecture 9: Edge Detection II
CS Digital Image Processing Lecture 5
Binary Image processing بهمن 92
Computer and Robot Vision I
Chapter 6 Neighborhood Operators
ECE 692 – Advanced Topics in Computer Vision
Computer and Robot Vision I
CS654: Digital Image Analysis
Morphological Filters Applications and Extension Morphological Filters
Presentation transcript:

E.G.M. PetrakisBinary Image Processing1 Binary Image Analysis Segmentation produces homogenous regions –each region has uniform gray-level –each region is a binary image (0: background, 1: object or the reverse) –more intensity values for overlapping regions Binary images are easier to process and analyze than gray level images

E.G.M. PetrakisBinary Image Processing2 Binary Image Analysis Tasks Noise suppression Run-length encoding Component labeling Contour extraction Medial axis computation Thinning Filtering (morphological operations) Feature extraction (size, orientation etc.)

E.G.M. PetrakisBinary Image Processing3 Noise suppression Small regions are not useful information –apply “size filter” to remove such regions –all regions below T pixels in size are removed by changing the value of their pixels to 0 (background) –it is generally difficult to find a good value of T –if T is small, some noise will remain –if T is large, useful information will be lost

E.G.M. PetrakisBinary Image Processing4 original noisy image filtered Image T=10 original noisy image filtered image T=25 too high!

E.G.M. PetrakisBinary Image Processing5 Run-Length encoding Compact representation of a binary image Find the lengths of “runs” of 1 pixels sequences

E.G.M. PetrakisBinary Image Processing6 Component Labeling Assign different labels to pixels belonging to different regions (components) –connected components –not necessary for images with one region binary image labeled connected components

E.G.M. PetrakisBinary Image Processing7 Sequential Algorithm 1.Scan the image from left to right, top to bottom; if the pixel is 1 then a)if only one of the upper or left pixels has a label, copy this label to current pixel b)if both have the same label, copy this label c)if they have different labels, copy one label and mark these two labels as equivalent d)if there are no labeled neighbors, assign it a new label 2.Scan the labeled image and replace all equivalent labels with a common label 3.If there are no neighbors, go to 1

E.G.M. PetrakisBinary Image Processing8 Contour Extraction Find all 8-connected pixels of a region that are adjacent to the background –select a starting pixel and track the boundary until it comes back with the starting pixel binary region boundary

E.G.M. PetrakisBinary Image Processing9 Boundary Following Scan the image from left to right and from top to bottom until an 1 pixel is found 1)stop if this is the initial pixel 2)if it is 1, add it to the boundary 3)go to a 0 4-neighbor on its left 4)check the 8-neighbors of the current pixel and go to the first 1 pixel found in clockwise order 5)go to step 2

E.G.M. PetrakisBinary Image Processing10 Area – Center Binary (or gray) region B[i,j] –B[i,j] = 1 if (i,j) in the region, 0 otherwise –Area: –Center of gravity:

E.G.M. PetrakisBinary Image Processing11 Orientation Angle with the horizontal direction Find angle θ minimizing θ r ij ρ = x cos θ + y sin θ x y

E.G.M. PetrakisBinary Image Processing12 Computing Orientation E = a sin 2 θ – b sin θ cos θ+c cos 2 θ, where

E.G.M. PetrakisBinary Image Processing13 Computation Orientation (cont.) From which we get Differentiating with respect to θ and setting the result to zero –tan2θ = b/(a-c) unless b = 0 and a = c Consequently The solution with the + minimizes E The solution with the – maximizes E

E.G.M. PetrakisBinary Image Processing14 Computation Orientation (cont.) Compute E min, E max minimum and maximum of the least second moment E The ratio e = E max /E min represents roundness –e  0 for lines –e  1 for circles

E.G.M. PetrakisBinary Image Processing15 Distance Transform Compute the distance of each pixel (i,j) from the background S  at iteration n compute F n [i,j]:  F 0 [i,j] = f[i,j] (initial values)  F n [i,j] = F 0 [i,j] + min(F n-1 [u,v])  (u,v) are the 4-neighbor pixels of (i,j) that is pixels with D([i,j],[u,v]) = 1  repeat until no distances changes

E.G.M. PetrakisBinary Image Processing16 Example of Distance Transform Distance transform of an image after the first and second iterations –on the first iteration, all pixels that are not adjacent to S are changed to 2 –on succeeding iterations only pixels further away from S change

E.G.M. PetrakisBinary Image Processing17 Skeleton (Medial Axis) Set of pixels with locally maximum distance from the background S Take the distance transform and keep (i,j) Keep a point (i,j) if it is the max in its 4-neighborhood: D([i,j],S): locally maximum that is D([i,j],S) >= D([u,v],S) where (u,v) are the 4-neighbors of (i,j) The region can be reconstructed from its skeleton –take all pixels within distance D(i,j) from each pixel (i,j) of the skeleton

E.G.M. PetrakisBinary Image Processing18 Examples of Medial Axis Transform the medial axis transform is very sensitive to noise

E.G.M. PetrakisBinary Image Processing19 Thinning Binary regions are reduced to their center lines –also called skeletons or core lines –suitable for elongated shapes and OCR –each region (e.g., character) is transformed to a line representation –further analysis and recognition is facilitated Iteratively check the 8-neighbors of each pixel –delete pixels connected with S unless the 8-neighbor relationship with the remaining pixels is destroyed and except pixels at the end of a line –until no pixels change

E.G.M. PetrakisBinary Image Processing20 no pixels change after 5 iterations

E.G.M. PetrakisBinary Image Processing21 Filtering Operations Expansion: background pixels adjacent to the region are changed from 0 to 1 –the region is expanded –fills gaps, the region is smoothed Shrinking: pixels are changed from 1 to 0 –the region is shrinked –removes noise, thinning A combination of Expansion with Shrinking may achieve better smoothing

E.G.M. PetrakisBinary Image Processing22 noisy image expanding followed by shrinking filled holes but did not eliminate noise shrinking followed by expanding eliminated noise but did not fill the holes

E.G.M. PetrakisBinary Image Processing23 Morphological Filtering Image filtering using 4 filtering operations –two basic: Dilation, Erosion plus –two derived: Opening, Closing –and a Structuring Element (SE) whose size and shape may vary SE: rectangle with R=1,2,3 SE: circle with R=1,2,3

E.G.M. PetrakisBinary Image Processing24 Erosion - Dilation Erosion: apply the SE on every pixel (i,j) of the image f –(i,j) is the center of the SE –if the whole SE is included in the region then, f[i,j] = 1 –otherwise, f[i,j] = 0 –erosion shrinks the object Dilation: if at least one pixel of the SE is inside the region f[i,j] = 1 –dilation expands the region

E.G.M. PetrakisBinary Image Processing25 original image Structuring Element (SE) Erosion with the SE at various positions of the original image

E.G.M. PetrakisBinary Image Processing26 the erosion of the original image with the SE the bold line shows the border of the original image the dilation of the original image with the SE the bold line shows the border of the original image

E.G.M. PetrakisBinary Image Processing27 Opening - Closing Opening: erosion followed by dilation with the same SE –filters out “positive” detail, shirks the region Closing: dilation followed by erosion with the same SE –smoothes by expansion, fills gaps and holes smaller than the SE

E.G.M. PetrakisBinary Image Processing28 initial erosion initial dilation succeeding dilation succeeding erosion opening closing

E.G.M. PetrakisBinary Image Processing29 Pattern Spectrum Succeeding Openings with the same SE Succeeding Closings with the same SE i=0 i=-1i=-2 i=-3i=-4 i=0i=1i=2i=3i=4

E.G.M. PetrakisBinary Image Processing30 Example of Pattern Spectrum Size vector p=(a -n,a -n+1,a -n+2,….a, a 1, a 2, a 3, …, a n ) Distance between shapes A,B: opening original closing