Fast and Memory Efficient 2-D Connected Components Using Linked Lists of Line Segments

20
Fast and Memory Efficient 2-D Connected Components Using Linked Lists of Line Segments IEEE TRANSACTIONS ON IMAGE PROCESSING, VOL. 19, NO. 12, DECEMBER 2010 2011/10/4

description

Fast and Memory Efficient 2-D Connected Components Using Linked Lists of Line Segments. IEEE TRANSACTIONS ON IMAGE PROCESSING, VOL. 19, NO. 12, DECEMBER 2010. 2011/10/4. Outline. Introduction Connected Components Labeling Data Structure Algorithm Experimental Result And Comparison - PowerPoint PPT Presentation

Transcript of Fast and Memory Efficient 2-D Connected Components Using Linked Lists of Line Segments

Page 1: Fast and Memory Efficient 2-D Connected Components Using Linked Lists of Line Segments

Fast and Memory Efficient 2-D ConnectedComponents Using Linked Lists of Line SegmentsIEEE TRANSACTIONS ON IMAGE PROCESSING, VOL. 19, NO. 12, DECEMBER 2010

2011/10/4

Page 2: Fast and Memory Efficient 2-D Connected Components Using Linked Lists of Line Segments

Outline• Introduction• Connected Components Labeling• Data Structure• Algorithm• Experimental Result And Comparison• Conclusion

Page 3: Fast and Memory Efficient 2-D Connected Components Using Linked Lists of Line Segments

Introduction• Connected components in a binary image is one

of the fundamental image analysis algorithms.

• This paper present a more efficient approach to the problem of finding the connected components in binary images. The first advantage is the reduced execution time compared to existing techniques. This is achieved by making a single pass regular access algorithm that only requires access to the three most recently processed image lines at any given time.

Page 4: Fast and Memory Efficient 2-D Connected Components Using Linked Lists of Line Segments

Connected Components Labeling• One knows for a certain image which pixels are

foreground pixels or object pixels and one needs to list each separate object within this image.

Page 5: Fast and Memory Efficient 2-D Connected Components Using Linked Lists of Line Segments

Data Structure• Region descriptors data unit :• a pointer to the first line segments of the region ( pta )• a pointer to the last line segments of the region ( ptd )• Two add pointers that are used internally by our

connected components algorithm ( ptb & ptc )

• Line segment data unit :• start column• end column• row of the line segment • a pointer to another line segments

Page 6: Fast and Memory Efficient 2-D Connected Components Using Linked Lists of Line Segments

Data Structure

Label B is reserved for the background pixels.

0 1 2 3 4 5 6 7

7

6

5

4

3

2

1

0

Page 7: Fast and Memory Efficient 2-D Connected Components Using Linked Lists of Line Segments

Data Structure• S is the processing row of the image.• ptb points to the last line segment of part row < S

– 1• ptc points to the last line segment row = S - 1

Processed Rows

SS - 1

< S - 1

ptaptbptcptd

ProcessingRow

Page 8: Fast and Memory Efficient 2-D Connected Components Using Linked Lists of Line Segments

Algorithm• The algorithm repeatedly performs the following

operations until the last row of the input image is processed:

1) delineate a new line segment in the current row;

2) group the freshly created line segment and every connected line segment of the previous row into region descriptors;

3) if the last line segment of the current row is processed, proceed to the next row.

Page 9: Fast and Memory Efficient 2-D Connected Components Using Linked Lists of Line Segments

Algorithm• Depending upon the number of connected line

segments, three situations can occur:1) The current line segment is not connected with any line

segment.

2) The current line segment is connected with exactly one line segment.

3) The current line segment is connected with two or more line segments.

Page 10: Fast and Memory Efficient 2-D Connected Components Using Linked Lists of Line Segments

Algorithm

1) The current line segment is not connected with any line segment.

• If the current line segment is not connected with any line segment, it means the current line segment is the first part of a new region. Consequently, we create a new region descriptor and add the current line segment to this region descriptor then let pta , ptc and ptd point to the new line segment, ptb point to NULL.

SS - 1

< S - 1

Page 11: Fast and Memory Efficient 2-D Connected Components Using Linked Lists of Line Segments

Algorithm

2) The current line segment is connected with exactly one line segment.

• If the current line segment is connected with exactly one line segment, it means the current line segment is a continuation of the region to which the connected line segment belongs. We, thus, lookup the corresponding region descriptor and append the current line segment to the end of the linked list contained in this region descriptor.

How to find the right region descriptor for a new line segment ?

Page 12: Fast and Memory Efficient 2-D Connected Components Using Linked Lists of Line Segments

Algorithm

3) The current line segment is connected with two or more line segments.

• If the current line segment is connected with two or more line segments, all these line segments must be in the same region. However, at this point the line segments may still belong to different region descriptors which must be merged.

How to merge two region descriptors ?

Page 13: Fast and Memory Efficient 2-D Connected Components Using Linked Lists of Line Segments

• Searching the right region descriptor for a new line segment:

Algorithm

S

S - 1

< S - 1 ptaptb

ptcptd

S

S - 1

< S - 1ptaptb ptcptd

ptaptcptd

S

S - 1

ptb = NULL

Page 14: Fast and Memory Efficient 2-D Connected Components Using Linked Lists of Line Segments

Algorithm• Merging two region descriptors :• A is the final merged region descriptor.1) B.ptc ->next = A.ptb ->next 2) A.ptb ->next = B.ptb ->next 3) B.ptb ->next = A.pta4) A.pta = B.pta

1 1 1

1 1 2

3 3 1

3 3 2

ptaptbptcptd

ptdptbptaptc

ptbpta

ptcptd

ptcptd

ptaptb

S

S - 1

< S - 1

A B

Page 15: Fast and Memory Efficient 2-D Connected Components Using Linked Lists of Line Segments

Algorithm• When current row is processed, update region

descriptors before process the next row.1) ptb = ptc 2) ptc = ptd

ptaptb

ptc

ptdS

S - 1

< S - 1

Page 16: Fast and Memory Efficient 2-D Connected Components Using Linked Lists of Line Segments

Experimental Result And Comparison• Author compare his connected components

algorithm with, to there knowledge, the fastest conventional connected component labeling algorithm, namely He et al.’s technique.

Image size 8192 by 8192 filled whih Bernoulli noise

Page 17: Fast and Memory Efficient 2-D Connected Components Using Linked Lists of Line Segments

Experimental Result And Comparison• Resize 300 images to size 8192 by 8192 and

threshold the resized image to create two binary images. One with the light pixels as foreground pixels and one with the dark pixels as foreground pixels. Thus, in total we have 600 binary images in our test dataset.

• Our algorithm calculates the connected components of the natural images on average 7.4 times faster than He’s technique. The final output of the connected components of the natural images uses on average 181.2 times less memory with our data structure compared to the region label image.

Page 18: Fast and Memory Efficient 2-D Connected Components Using Linked Lists of Line Segments

Experimental Result And Comparison

Page 19: Fast and Memory Efficient 2-D Connected Components Using Linked Lists of Line Segments

Experimental Result And Comparison• The disadvantage of using our region coding data

structure is that it does not provide a direct way to locate the region of a certain pixel. The following operations need to be done to find the region of pixel ( r, c ):1) find the line segment within row which contains pixel ;2) follow the linked list until the last line segment is

reached;3) read out the region descriptor via the pointer of the last

line segment.

Page 20: Fast and Memory Efficient 2-D Connected Components Using Linked Lists of Line Segments

Conclusion• With extensive experimental analysis we have

shown our algorithm to be faster than the fastest conventional algorithm. Additionally, our novel region coding data structure uses less memory in typical cases than the region label image. We also proved that our algorithm is linear with the number of pixels for any possible image.