Elsevier

Computers & Graphics

Volume 34, Issue 4, August 2010, Pages 449-459
Computers & Graphics

Technical Section
A rapid 3D seed-filling algorithm based on scan slice

https://doi.org/10.1016/j.cag.2010.05.005Get rights and content

Abstract

In this paper, a novel and rapid 3D seed-filling algorithm is proposed to extract or fill the object-connected 3D region. An improved 2D seed-filling algorithm, which extracts connected region in slice quickly and consumes fewer stack operations and less memory compared with the existing algorithms, is presented. The improved 2D algorithm is enclosed as a basic unit within the framework of the proposed 3D seed-filling algorithm, in order to reduce the complexity of direction of seeds search, and accelerate region search on adjacent slices. Finally, a parameter of scan range is defined to leap over invalid seeds, which reduces time consumption of the proposed algorithm further. In addition, experimental results demonstrate advantages of this algorithm including eliminating the redundancy of seeds search, repetition of stack operations and running with high efficiency.

Research Highlights

► A novel and rapid 3D seed-filling algorithm is proposed. ► The problems of the existing seed-filling algorithms are analyzed and discussed. ► A new frame work of algorithm is presented to enclose the improved 2D seed-filling algorithm. ► A parameter of leaping value(MaxSpan) is defined to accelerate the search.

Introduction

The seed-filling algorithm is one of the traditional and classical algorithms in computer graphics. Its principle is that an initial seed is employed to search and then fill the object-connected 2D pixels or 3D voxels in a region with closed boundary. It can be used to fill regions with arbitrary shape through 4-connected (2D) or 6-connected (3D) approach.

The principle of seed-filling algorithm is widely applied in numerous fields. For example, seed-filling can be utilized to extract the segmented region of 2D image, obtain the characters of geometric shapes of image (such as area, circumference and center of mass), calculate regional counting and fill complicated binary images [1], [2], [3], [4].

In addition, the principle of 3D seed-filling is used in the fields of volume graphics by many scholars. For example, Levoy [5]uses seed-filling to replace the bounding boxes to accelerate ray tracing by leaping over empty space; Oikarinen [6] uses seed-filling in a view lattice to avoid processing empty space and then accelerate their volume rendering; and Tsai et al. [7] manipulates volumetric objects by using 3D seed-filling to replace a memory-consuming voxel extension.

There are different approaches to implement the principle of seed-filling in 2D or 3D space. The simplest approach is called flood-filling algorithm. It implements seed-filling algorithm through seeds recursion, which searches valid seeds within the 4-connected region. However, in implementation of this algorithm, the connectivity of adjacent seeds is not well utilized. In addition, each seed is accessed repeatedly, and only one seed can be popped at each time. These problems lead to large memory and time consumption during high frequent stack operations (see our experiments in Section 2). Moreover, when a large area in 3D space is processed, it may probably lead to the memory resource exhaustion.

Another approach, which is called the traditional scan line seed-filling algorithm, can remarkably overcome most of the above described problems. In implementation of this approach, more seeds can be pushed or popped along the scan lines at a certain time, and only the rightmost seeds will be pushed into stack. The scan line seed-filling algorithm reduces the frequency of repetitive seeds search, the frequency of stack operations and the memory consumption. However, the connectivity of adjacent scan lines is not well utilized to reduce repetitive rollbacks (see Section 3.1 for the definition).

In addition, although the frequency of repetitive seeds search is reduced, this problem still largely exists. Therefore, when a large area is processed, the performance of this algorithm should be improved to reduce the time consumption.

Actually, only the latter approach is widely employed in 3D space. Feng and Soon [8] describe a 3D seed-filling algorithm that extends the traditional scan line seed-filling algorithm from 2D to 3D, by extending the search directions of scan lines from the axes of –y/+y to the axes of –y/+y/−z/+z. It can be used to extract or fill the region of interest (ROI) with arbitrary shape. However, the defects of high frequency of stack operations and repetition of seeds search still exist (see our experiments in Section 2).

Ren and Liu [9] and Guo and Long [10] introduced the connectivity of adjacent scan lines into the traditional 2D scan line seed-filling algorithm, which can remarkably reduce the repetitive seeds search in 2D space. However, the independency of scan line is lost, which means that a certain scan line cannot be used to access its two neighboring scan lines. Thus it is impossible to expand their 2D algorithms into the 3D space directly.

Oikarinen [6] proposes a special 2D seed-filling algorithm that removes the use of stack to solve the above described problems. It avoids recursions by designating neighboring pixels of the current one as children and examines them in sequence. Constant and less memory is consumed in this algorithm. However, it suffers from the time-consuming demerit, caused by repetitive rollbacks for filled pixels.

Shyan-Bin and Ming-Dar [11] extend Oikarinen’s 2D seed-filling into 3D space, and presents an improved scan line seed-filling algorithm. It uses a 2D pointer array of linked lists to avoid the redundant seeds search, and classifies the relationship of neighboring scan ranges into five cases: no overlap, complete overlap, right partial overlap, left partial overlap and middle partial overlap. However, the main limitation of this algorithm is that a large and constant 2D pointer array is required, but the dimensions of different volume datasets are diverse. The algorithm will fail if a dimension value of a certain volume dataset is greater than the constant value of 2D pointer array. Therefore, a huge value that can exceed the maximum dimension value must be set for the 2D pointer array. In addition, according to our experiments (see Section 2), the frequency of stack operations is still very high.

Although the above described scan line seed-filling algorithms have remarkably reduced the time consumption and the size of stack, two demerits also exist. First, the operations of seeds stack and repetitive seeds search are still too frequent. It is because the filling sequence of adjacent scan lines is not utilized to eliminate the unnecessary repetitive seeds search. Second, for each scan line, if it is assumed to be a “seed” in 3D space, the adjacent scan lines will be accessed by using the recursion within the 4-connected region essentially. Therefore, the process of the seeds search can be considered as the flood-filling in 3D space that only one “seed” will be pushed or popped in each time. Thus the time consumption is still large.

In this paper, the existing scan line seed-filling algorithms are analyzed and their main defects are pointed out first. Then a new 3D seed-filling algorithm is proposed to search and fill consecutive 3D object based on scan slice. The main difference between the proposed algorithm and the existing ones is that the process of seeds search is based on slice in the proposed algorithm, which means that the process of seeds search is executed slice by slice to eliminate the above described defects of the existing algorithms.

Section snippets

Performance of the existing algorithms

To intuitively analyze and describe the performance and problems of existing algorithms, a region of interest (ROI) is extracted from a brain volume dataset (512×512×30) to test the performance of the existing algorithms. The hardware environment for this implementation is: Genuine Intel (R) CPU-1.66 GHz (2 CPUs), 2046 MB RAM, NVIDIA Quadro NVS-256 MB. The software environment is Visual C++6.0. The following experiments (see 4 Experiments, 5 Discussions) are executed in the same environment. Fig. 1

Improvement of 2D scan line seed-filling algorithm

In traditional 2D scan line seed-filling algorithm, two adjacent scan lines of which a certain one will be accessed and then be pushed into stack to insure that the branch regions can be searched. In fact, the times of these searches are limited and only required at the places of branch regions. So, it is not necessary to search the adjacent up and down scan lines every time, or it will cause large repetitive seeds search and stack operations.

In general, the following repetitive seeds search is

2D scan line seed-filling algorithms

To be intuitively compared with the related 2D scan line seed-filling algorithms, filling operation of ROI in a CT image is used to evaluate the performance of these algorithms. This CT image is a slice of visual human brains, which is from the CT database of Visible Human Female (VHF) [12]. The threshold of CT value 200HU is used to extract bone tissues. In other words, only the voxels whose CT values are greater than 200HU will be extracted. Fig. 8 illustrates the results of them.

Fig. 8(a) is

Discussions

This section will discuss two issues shown in the tables of experiments in Section 4: one is the number of valid seeds are different with different algorithms. More valid seeds are obtained by the proposed algorithm, thus the issue is which algorithm is correct and why. Another is the performance of the proposed 3D algorithm could be further improved, thus the issue is which approach is taken to further reduce its time consumption.

Conclusions

The problems of the existing seed-filling algorithms are analyzed and discussed in this paper, and a novel algorithm that improves the performance of 3D seed-filling algorithm is proposed to solve the problems. The operations of repetitive seeds search are eliminated in the proposed algorithm, and the complexity of direction of seeds search is reduced as well.

Moreover, a new framework of algorithm is presented to enclose the improved 2D seed-filling algorithm. The framework makes the proposed

Acknowledgement

This work was supported by the Natural Science Foundation, Yun-nan, China; grant number 2008-C-0013-R and the key project of science and technology, Kun-ming, China; grant number 08S100311.

References (12)

There are more references available in the full text version of this article.

Cited by (25)

  • A method for vegetation extraction in mountainous terrain for rockfall simulation

    2020, Remote Sensing of Environment
    Citation Excerpt :

    Only populated voxels are retained for the subsequent analysis. Connected cells are clustered using the seeded-region growing approach presented by Yu et al. (2010) (Fig. 2). The region growing phase aims to cluster all the populated voxels that are connected.

  • A morphing-Based 3D point cloud reconstruction framework for medical image processing

    2020, Computer Methods and Programs in Biomedicine
    Citation Excerpt :

    Although the problem of misfiling is solved, the flood fill algorithm is complex and inefficient. To reduce the complexity of direction of seeds search, Yu et al., proposed a rapid 3D seed-filling algorithm based on slice [24,25]. Recently, the seed filling algorithm is used to voxelize the interior of 3D building model retrieval [26].

  • Automatic quantification of crack patterns by image processing

    2013, Computers and Geosciences
    Citation Excerpt :

    1) First, a dilation operation (Gonzalez and Woods, 2002) is applied to the binary image to eliminate the narrow bridge between clods. In this way, the crack space is fused (Fig. 2a–b), since the diameter of the space is smaller than the diameter of the dilation structuring element B. (2) As the space (i.e. bridge) has been eliminated, the two isolated clods (S1 and S2 in Fig. 2c) can be identified using the Seed Filling algorithm (Yu et al., 2010). ( 3) In Fig. 2d–e, the pixels of the dilated parts are integrated into the seed regions using the Merging algorithm (Liu et al., 2011), and the whole region is then divided into two clods. (

View all citing articles on Scopus
View full text