IMAGE SEGMENTATION – CONNECTED COMPONENT LABELING

Slides:



Advertisements
Similar presentations
Morphology The shape of things to come Courtesy Luca Galuzzi (Lucag)
Advertisements

Document Image Processing
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.
Some Basic Morphological Algorithm
Digital Image Processing Lecture 12: Image Topology
IEEE TRANSACTIONS ON IMAGE PROCESSING, VOL. 19, NO. 12, DECEMBER /10/4.
September 10, 2013Computer Vision Lecture 3: Binary Image Processing 1Thresholding Here, the right image is created from the left image by thresholding,
IS THERE A MORE COMPUTATIONALLY EFFICIENT TECHNIQUE FOR SEGMENTING THE OBJECTS IN THE IMAGE? Contour tracking/border following identify the pixels that.
3-D Computer Vision CSc – Ioannis Stamos 3-D Computer Vision CSc Binary Images Horn (Robot Vision): pages
Document Analysis Systems Bedola Roberto, Bordoni Davide, Franc Vojtech Supervised by Luca Lombardi Overview: Introduction Our implementation of Wahl et.
Objective of Computer Vision
MRF Labeling With Graph Cut CMPUT 615 Nilanjan Ray.
Objective of Computer Vision
Binary Image Analysis. YOU HAVE TO READ THE BOOK! reminder.
Machine Vision for Robots
Recap CSC508.
CS 6825: Binary Image Processing – binary blob metrics
Digital Image Fundamentals II 1.Image modeling and representations 2.Pixels and Pixel relations 3.Arithmetic operations of images 4.Image geometry operation.
September 23, 2014Computer Vision Lecture 5: Binary Image Processing 1 Binary Images Binary images are grayscale images with only two possible levels of.
Introduction Image geometry studies rotation, translation, scaling, distortion, etc. Image topology studies, e.g., (i) the number of occurrences.
Digital Image Fundamentals Faculty of Science Silpakorn University.
Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C.
Pixel Connectivity Pixel connectivity is a central concept of both edge- and region- based approaches to segmentation The notation of pixel connectivity.
1 Regions and Binary Images Hao Jiang Computer Science Department Sept. 25, 2014.
Vision Geza Kovacs Maslab Colorspaces RGB: red, green, and blue components HSV: hue, saturation, and value Your color-detection code will be more.
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.
CS654: Digital Image Analysis Lecture 4: Basic relationship between Pixels.
CSSE463: Image Recognition Day 23 Midterm behind us… Midterm behind us… Foundations of Image Recognition completed! Foundations of Image Recognition completed!
Digital Topology CIS 601 Fall 2004 Longin Jan Latecki.
Nottingham Image Analysis School, 23 – 25 June NITS Image Segmentation Guoping Qiu School of Computer Science, University of Nottingham
November 5, 2013Computer Vision Lecture 15: Region Detection 1 Basic Steps for Filtering in the Frequency Domain.
Image Segmentation Nitin Rane. Image Segmentation Introduction Thresholding Region Splitting Region Labeling Statistical Region Description Application.
1 © 2010 Cengage Learning Engineering. All Rights Reserved. 1 Introduction to Digital Image Processing with MATLAB ® Asia Edition McAndrew ‧ Wang ‧ Tseng.
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.
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.
Digital Image Processing CCS331 Relationships of Pixel 1.
Image Sampling and Quantization
Course : T Computer Vision
CSSE463: Image Recognition Day 9
Computer Vision Lecture 13: Image Segmentation III
Binary Image Analysis Gokberk Cinbis
Computer Vision Lecture 12: Image Segmentation II
Computer Vision Lecture 5: Binary Image Processing
Chapter 10 Image Segmentation.
Pixel Relations.
Binary Image processing بهمن 92
Watershed Segmentation
Computer and Robot Vision I
Chap.8 Image Analysis 숙명여자대학교 컴퓨터과학과 최 영 우 2005년 2학기.
5 × 7 = × 7 = 70 9 × 7 = CONNECTIONS IN 7 × TABLE
5 × 8 = 40 4 × 8 = 32 9 × 8 = CONNECTIONS IN 8 × TABLE
Digital Image Processing
4 × 6 = 24 8 × 6 = 48 7 × 6 = CONNECTIONS IN 6 × TABLE
5 × 6 = 30 2 × 6 = 12 7 × 6 = CONNECTIONS IN 6 × TABLE
Disjoint Sets DS.S.1 Chapter 8 Overview Dynamic Equivalence Classes
10 × 8 = 80 5 × 8 = 40 6 × 8 = CONNECTIONS IN 8 × TABLE MULTIPLICATION.
A Block Based MAP Segmentation for Image Compression
3 × 12 = 36 6 × 12 = 72 7 × 12 = CONNECTIONS IN 12 × TABLE
The Image The pixels in the image The mask The resulting image 255 X
Computer and Robot Vision I
Computer and Robot Vision I
5 × 12 = × 12 = × 12 = CONNECTIONS IN 12 × TABLE MULTIPLICATION.
5 × 9 = 45 6 × 9 = 54 7 × 9 = CONNECTIONS IN 9 × TABLE
3 × 7 = 21 6 × 7 = 42 7 × 7 = CONNECTIONS IN 7 × TABLE
Location Counter (LC) = 0 while line of code <> END if ORG
Presentation transcript:

IMAGE SEGMENTATION – CONNECTED COMPONENT LABELING Segmentation can be viewed as a process of pixel classification; the image is segmented into objects or regions by assigning individual pixels to classes. Connected Component Labeling assigns pixels to specific classes by verifying if an adjoining pixel (i.e., neighboring pixel) already belongs to that class. There are two “standard” definitions of pixel connectivity: 4 neighbor connectivity and 8 neighbor connectivity.

IMAGE SEGMENTATION – CONNECTED COMPONENT LABELING 4 Neighbor Connectivity 8 Neighbor Connectivity Pi,j Pi,j

CONNECTED COMPONENT LABELING: FIRST PASS EQUIVALENCE: B=C A A A B B C C B B B C C B B B B B B

CONNECTED COMPONENT LABELING: SECOND PASS TWO OBJECTS! A A A B B C B B C B B B B C B C B B B B B B

CONNECTED COMPONENT LABELING: EXAMPLE (DEMO)

CONNECTED COMPONENT LABELING: TABLE OF EQUIVALENCES 2 = 5 16 27 50 81 112 127 9 28 39 86 134 34 51 137 10 37 87 138 46 111 66 113 12 40 41 72 119 120 18 76 23 122

CONNECTED COMPONENT LABELING: TABLE OF EQUIVALENCES 2 = 5 37 86 111 138 9 39 87 10 40 41 112 12 46 113 16 50 119 18 51 120 23 66 122 27 72 127 28 76 134 34 81 137

Basic Connected Component Labeling Binary Image with Background=0, Objects=1 x = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 1 1 1 1 1 0 0 0 0 1 1 1 1 1 1 0 0 0 1 1 1 1 1 1 1 0 0 1 1 1 1 1 1 1 1 0

Basic Connected Component Labeling Binary Image with Background=0, Objects=1 x(1,:)=0; x(:,1)=0;   imshow(x,[0 1]); K=1; cnt=2; for J=2:H for I=2:W if x(J,I)==1 %% Object found if (x(J-1,I)==0 && x(J,I-1)==0) x(J,I)=cnt; %% New Object cnt=cnt+1; else if x(J-1,I)~=0 x(J,I)=x(J-1,I); if (x(J,I-1)~=0) && (x(J,I-1)~=x(J-1,I)) eq(K,1)=x(J-1,I); eq(K,2)=x(J,I-1); K=K+1; end; x(J,I)=x(J,I-1); end

Basic Connected Component Labeling eq = 2 3 3 4 4 5 5 6 6 7 7 8 8 9 Basic Connected Component Labeling First Pass x = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 3 2 0 0 0 0 0 0 0 4 3 2 0 0 0 0 0 0 5 4 3 2 0 0 0 0 0 6 5 4 3 2 0 0 0 0 7 6 5 4 3 2 0 0 0 8 7 6 5 4 3 2 0 0 9 8 7 6 5 4 3 2 0

Connected Component Labeling with Line Correction Binary Image with Background=0, Objects=1 x = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 1 1 1 1 1 0 0 0 0 1 1 1 1 1 1 0 0 0 1 1 1 1 1 1 1 0 0 1 1 1 1 1 1 1 1 0

Connected Component Labeling with Line Correction Binary Image with Background=0, Objects=1 if (x(J-1,I)==0 && x(J,I-1)==0) x(J,I)=cnt; %% New Object cnt=cnt+1; S=I; else if x(J-1,I)~=0 x(J,I)=x(J-1,I); if (x(J,I-1)~=0) && (x(J,I-1)~=x(J-1,I)) if S>0 for R=I:-1:S x(J,R)=x(J-1,I); end; S=0; cnt=cnt-1; eq(K,1)=x(J-1,I); eq(K,2)=x(J,I-1); K=K+1; end x(J,I)=x(J,I-1); x(1,:)=0; x(:,1)=0;   imshow(x,[0 1]); K=1; cnt=2; for J=2:H S=0; for I=2:W if x(J,I)==1 %% Object found

Connected Component Labeling with Line Correction First Pass x = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 2 2 0 0 0 0 0 0 0 2 2 2 0 0 0 0 0 0 2 2 2 2 0 0 0 0 0 2 2 2 2 2 0 0 0 0 2 2 2 2 2 2 0 0 0 2 2 2 2 2 2 2 0 0 2 2 2 2 2 2 2 2 0

Basic Connected Component Labeling Binary Image with Background=0, Objects=1 x = 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 1 1 0 0 0 0 1 1 1 1 1 1 0 0 1 1 1 1 1 1 1 1 0

Basic Connected Component Labeling First Pass x = 0 0 0 0 0 0 0 0 0 0 0 0 0 2 2 0 0 3 3 0 0 0 0 2 2 2 2 3 3 0 0 4 4 2 2 2 2 3 3 0 eq = 3 2 2 4

Connected Component Labeling with Line Correction Binary Image with Background=0, Objects=1 x = 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 1 1 0 0 0 0 1 1 1 1 1 1 0 0 1 1 1 1 1 1 1 1 0

Connected Component Labeling with Line Correction First Pass x = 0 0 0 0 0 0 0 0 0 0 0 0 0 2 2 0 0 3 3 0 0 0 0 2 2 2 2 3 3 0 0 2 2 2 2 2 2 3 3 0 eq = 3 2