Contour Tracing Algorithm(轮廓跟踪算法)

来源:互联网 发布:java byte 类型运算 编辑:程序博客网 时间:2024/06/06 04:37

What is Contour Tracing?
Also known as border following or boundary following; contour tracing is a technique that is applied to digital images in order to extract their boundary. As a result, an important question arises:What is the "boundary" of a given digital image?
In order to answer that question, we first have to define a digital image. Adigital image is a group of pixels on a square tessellation each having a certain value. Throughout this web site, we will be dealing withbilevel images i.e. each pixel can have one of 2 possible values namely:
1, in which case we'll consider it a "black" pixel and it will be part of thepattern, OR
0, in which case we'll consider it a "white" pixel and it will be part of thebackground.

Now we come to our original question: What is the "boundary" of a given pattern?
The boundary of a given pattern P, is the set of border pixels ofP.
Since we are using a square tessellation, there are 2 kinds of boundary (or border) pixels: 4-border pixels and 8-border pixels.
A black pixel is considered a 4-border pixel if it shares anedge with at least one white pixel. On the other hand, a
black pixel is considered an 8-border pixel if it shares anedge or a vertex with at least one white pixel.
(A 4-border pixel is also an 8-border pixel. An 8-border pixel may or may not be a 4-border pixel.)

A point worth mentioning is that it is not enough to merely identify the boundary pixels of a pattern in order to extract its contour. What we need is anordered sequence of the boundary pixels from which we can extract the generalshape of the pattern.
 
 

Why would we want to extract the contour of a given pattern?
Contour tracing is one of many preprocessing techniques performed on digital images in order to extract information about their general shape. Once the contour of a given pattern is extracted, it's different characteristics will be examined and used as features which will later on be used in pattern classification. Therefore, correct extraction of the contour will produce more accurate features which will increase the chances of correctly classifying a given pattern.

But you might be wondering: Why waste precious computational time on first extracting the contour of a pattern and then collecting its features? Why not collect features directly from the pattern?
Well, the contour pixels are generally a small subset of the total number of pixels representing a pattern. Therefore, the amount of computation is greatly reduced when we runfeature extracting algorithms on the contour instead of on the whole pattern. Since the contour shares a lot of features with the original pattern, the feature extraction process becomes much more efficient when performed on the contour rather on the original pattern.
In conclusion, contour tracing is often a major contributor to the efficiency of the feature extraction process -an essential process in the field of pattern recognition. 

http://www.imageprocessingplace.com/downloads_V3/root_downloads/tutorials/contour_tracing_Abeer_George_Ghuneim/index.html

原创粉丝点击