an approach to edge detection on a virtual hexagonal structure

6
An Approach to Edge Detection on a Virtual Hexagonal Structure Xiangjian He 1 , Wenjing Jia 1 , Jianmin Li 2 , Qiang Wu 1 and Tom Hintz 1 1 Faculty of Information Technology University of Technology, Sydney Australia {sean,wejia,wuq,hintz}@it.uts.edu.au 2 School of Computer and Mathematics Fuzhou University Fujian 320002, China [email protected] Abstract Hexagonal structure is another image structure alternative to traditional square image structure for image processing and computer vision. The geometrical arrangement of pixels on a hexagonal structure can be described as a collection of hexagonal pixels. Because all the existing hardware for capturing image and for displaying image are produced based on square structure, it becomes important to find a proper software approach to mimic hexagonal structure so that images represented on the traditional square structure can be smoothly converted from or to the images on hexagonal structure. For accurate image processing, it is critical to best maintain the image resolution during the image conversion. In this paper, a bilinear interpolation algorithm that is used to convert an image from square structure to hexagonal structure is presented. Based on this, an edge detection method is proposed. Our experimental results show that the bilinear interpolation improves the edge detection accuracy. 1. Introduction The advantages of using a hexagonal grid to represent digital images have been investigated for more than thirty years [1-5]. The importance of the hexagonal representation is that it possesses special computational features that are pertinent to the vision process [4]. Its computational power for intelligent vision has pushed forward the research in areas of image processing and computer vision. The hexagonal image structure has features of higher degree of circular symmetry, uniform connectivity, greater angular resolution, and a reduced need of storage and computation in image processing operations [6-7]. In spite of its numerous advantages, a problem that limits the use of hexagonal image structure is the lack of hardware for capturing and displaying hexagonal- based images. In the past years, there have been various attempts to simulate a hexagonal grid on a regular rectangular grid device [1-5]. The use of these techniques provides a practical tool for image processing on a hexagonal structure and makes it possible to carry out research based on a hexagonal structure using existing computer vision and graphics systems. A new simulation scheme as presented in [8] was developed. In this scheme, each of the original square pixels and simulated hexagonal pixels is regarded as a collection of smaller components, called sub-pixels. The light intensities of all sub-pixels constituting a square pixel (or hexagonal) are assigned the same value as that of the square pixel (or hexagonal) pixel in the square (or hexagonal) structure. This simple assignment method does not give accurate enough intensity interpolation of sub-pixels, and hence affects the results of edge detection. In this paper, we present a new assignment scheme using the simple bilinear interpolation algorithm [9] which can be easily and fast implemented. We will use experimental results to show the improvement in edge detection. The rest of this paper is organized as follows. In Section 2, we briefly review the simulation of hexagonal structure and its bilinear interpolation as shown in [8]. In Section 3, an edge detection scheme is presented. The experimental results are demonstrated in Section 4. We conclude in Section 5. Digital Image Computing Techniques and Applications © 2007 IEEE DOI 10.1109/DICTA.2007.25 340

Upload: independent

Post on 03-Dec-2023

0 views

Category:

Documents


0 download

TRANSCRIPT

An Approach to Edge Detection on a Virtual Hexagonal Structure

Xiangjian He1, Wenjing Jia1, Jianmin Li2, Qiang Wu1 and Tom Hintz1 1Faculty of Information Technology University of Technology, Sydney

Australia {sean,wejia,wuq,hintz}@it.uts.edu.au

2School of Computer and Mathematics Fuzhou University

Fujian 320002, China [email protected]

Abstract

Hexagonal structure is another image structure alternative to traditional square image structure for image processing and computer vision. The geometrical arrangement of pixels on a hexagonal structure can be described as a collection of hexagonal pixels. Because all the existing hardware for capturing image and for displaying image are produced based on square structure, it becomes important to find a proper software approach to mimic hexagonal structure so that images represented on the traditional square structure can be smoothly converted from or to the images on hexagonal structure. For accurate image processing, it is critical to best maintain the image resolution during the image conversion. In this paper, a bilinear interpolation algorithm that is used to convert an image from square structure to hexagonal structure is presented. Based on this, an edge detection method is proposed. Our experimental results show that the bilinear interpolation improves the edge detection accuracy. 1. Introduction

The advantages of using a hexagonal grid to represent digital images have been investigated for more than thirty years [1-5]. The importance of the hexagonal representation is that it possesses special computational features that are pertinent to the vision process [4]. Its computational power for intelligent vision has pushed forward the research in areas of image processing and computer vision. The hexagonal image structure has features of higher degree of circular symmetry, uniform connectivity, greater

angular resolution, and a reduced need of storage and computation in image processing operations [6-7].

In spite of its numerous advantages, a problem that limits the use of hexagonal image structure is the lack of hardware for capturing and displaying hexagonal-based images. In the past years, there have been various attempts to simulate a hexagonal grid on a regular rectangular grid device [1-5]. The use of these techniques provides a practical tool for image processing on a hexagonal structure and makes it possible to carry out research based on a hexagonal structure using existing computer vision and graphics systems.

A new simulation scheme as presented in [8] was developed. In this scheme, each of the original square pixels and simulated hexagonal pixels is regarded as a collection of smaller components, called sub-pixels. The light intensities of all sub-pixels constituting a square pixel (or hexagonal) are assigned the same value as that of the square pixel (or hexagonal) pixel in the square (or hexagonal) structure. This simple assignment method does not give accurate enough intensity interpolation of sub-pixels, and hence affects the results of edge detection.

In this paper, we present a new assignment scheme using the simple bilinear interpolation algorithm [9] which can be easily and fast implemented. We will use experimental results to show the improvement in edge detection.

The rest of this paper is organized as follows. In Section 2, we briefly review the simulation of hexagonal structure and its bilinear interpolation as shown in [8]. In Section 3, an edge detection scheme is presented. The experimental results are demonstrated in Section 4. We conclude in Section 5.

Digital Image Computing Techniques and Applications

© 2007 IEEEDOI 10.1109/DICTA.2007.25

340

2. Hexagonal structure

Because there has been no hardware available for image display and capture on hexagonal structure, in this section, we review a software approach to the construction of virtual hexagonal structure [8]. To construct hexagonal pixels, in [8], each square pixel was first separated into 7×7 small pixels, called sub-pixels. Each virtual hexagonal pixel was formed by 56 sub-pixels as shown in Figure 1. Figure 1 shows a collection of seven hexagonal pixels constructed with spiral addresses from 0 to 6.

Figure 1. A cluster of seven hexagonal pixels

It is not difficult to locate each virtual hexagonal pixel when the size of an image is known. Let us assume that original images are represented on a square structure arranged as 2M rows and 2N columns, where M and N are two positive integers. Then the centre of the virtual hexagonal structure can be located at the middle of rows M and M+1, and at column N. Note that there are 14M rows and 14N columns in the (virtual square) structure consisting of sub-pixels. Thus, the first (or the central) hexagonal pixel has its centre located in the middle of rows 7M and 7M+1 and the column 7N of the virtual square structure. After the 56 sub-pixels for the first hexagonal pixel are allocated, all sub-pixels for all hexagonal pixels can be easily assigned as shown in [10].

For every hexagonal pixel, we can compute the coordinates of its centre at the two dimensional coordinate system. Let us denote the arbitrarily given hexagonal pixel by X. Then in the original image space, there exist four square pixels denoted by A, B, C

and D, as shown in Figure 2, lying on two consecutive rows and columns such that, point (pixel) X falls onto the rectangle with vertices at A, B, C and D.

Figure 2. A hexagonal pixel X located on a rectangle formed from square pixels A, B, C and D

Let us denote the coordinates of A, B, C, D and X by

(Ax, Ay), (Bx, By), (Cx, Cy), (Dx, Dy) and (Xx, Xy) respectively, i.e., A=(Ax, Ay), B=(Bx, By), C=(Cx, Cy), D=(Dx, Dy) and X=(Xx, Xy). Let

.||||

,||||

yy

yy

xx

xx

CAXA

BAXA

−−

=−−

= βα (1)

Then, it is easy to derive that

.)1()1()1)(1(

DCBAX

αββαβαβα

+−+−+−−=

(2)

Let f be the image brightness function that maps a

pixel (either square pixel or hexagonal pixel) to its light intensity value. Then the intensity value assigned to X using the bilinear interpolation method as shown in [9] is computed as

).()()1()()1()()1)(1()(

DfCfBfAfXf

⋅+⋅−+⋅−+⋅−−=

αββαβαβα

(3)

3. Edge detection

The edge detection approach goes through three steps: noise filtering using a bilateral filter, edge detection using Sobel operator and edge refining using thresholds.

3.1. Noise filtering

341

Before the edge map of an image is found, it is common that image noise is removed (or suppressed) by applying a filter that blurs or smoothes the image.

One commonly used filter is implemented by convolution of the original image function with a Gaussian kernel as defined in Equation (5) below. In order to achieve a more desirable level of smoothing in applications, a bilateral filter has recently been introduced as shown in [11,12]. We describe how a bilateral filter works using mathematical terms as follows [2].

Let 2:f ℜ → ℜ be the original brightness function of an image which maps the coordinates of a pixel, (x, y) to a value in light intensity. Let a0 be the reference pixel. Then, for any given pixel a at location (x, y), the coefficient assigned to intensity value f(a) at a for the range filter is r(a) computed by the similarity function s as:

21

20

2)()((

0 ))(),(()( σafaf

eafafsar−

== (4)

Similarly, the coefficient assigned for the domain filter is g(a) computed by the closeness function c as:

22

20 )(

0),()( σaa

eaacag−

== (5)

Therefore, for the reference pixel 0a , its new intensity value, denoted by 0( )h a , is

( ) ( ) ( ) ( )1

10

0

n

i i ii

h a k f a g a r a−

=

= × ×∑ (6)

where k is the normalization constant and is defined as

( ) ( )1

0i i

n

ia ak g r

== ×∑ (7)

Considering about 99.5% of energy is found in the

central area of “Mexico cap” (the curve of Gaussian function with parameter σ) within the radius of 3σ, in order to increase the computation speed, Equation (6) in this paper is computed only over a small area surrounding each reference pixel and covering the disk with centre at the reference pixel and radius of 3σ2. In this paper, σ2 is set to be 1. Therefore, the convolution window is set to be a 49 pixel block on the virtual hexagonal structure for the weighted average computation using Equations (6) and (7), centred at the reference pixel. Hence, for formula (6) and (7) above, n=49. Furthermore, σ1, the parameter for the range

filtering, is computed as the standard deviation of grey values in input image.

For each given sub-pixel located in a reference hexagonal pixel (e.g., the central pixel with address 0 in Figure 1), find all corresponding sub-pixels which have the same location in their hexagonal pixels as the given sub-pixel in its hexagonal pixel. In another word, all these sub-pixels have the same relative location in their hexagonal pixels consisting of 56 sub-pixels each. For example, if the given (reference) sub-pixel is at 1st row and 2nd column (2nd sub-pixel on the top row) at hexagonal pixel 0 as shown in Fig. 2, then the sub-pixel at 1st row and 2nd column (again the 2nd sub-pixel on the top row) at hexagonal pixel 1 is the corresponding sub-pixel at hexagonal pixel 1. The computation to find all these sub-pixels corresponding to the given sub-pixel is easy and can been found in [11]. A set of all sub-pixels having the same relative location in their hexagonal pixels obtained above are collected in order and formed a sub-image. Because each virtual hexagonal pixel contains 56 sub-pixels, an image represented on the virtual hexagonal structure can be partitioned into 56 sub-images as described above.

The computation to include the 49 hexagonal pixels for convolution using (4)-(7) on the hexagonal structure is actually achieved sub-pixel by sub-pixel without the need of conversion from square pixels to hexagonal pixels. This computation is actually performed on the 56 sub-images individually. In another word, for each sub-pixel in a reference hexagonal pixel, we actually try to include 49 sub-pixels that are the neighbours of the given sub-pixel in the same sub-image. After all the 49 sub-pixels are found (some sub-pixels may not be found because they are outside the image area), the new intensity for the reference sub-pixel can then be computed using Equations (4)-(7) above for bilateral filtering. It is also worth to note that the value of σ1 is computed individually for each sub-image. Hence, the computed values of σ1 will all be different although they may be very similar.

3.2. Edge detection

After all sub-pixels have been re-assigned pixels values as shown in Subsection 3.1, their edge strengths and directions can then be computed as shown below. In order to implement edge detection on the virtual hexagonal structure, a Sobel operator, as presented in [11] and shown in Figure 3, is applied in this paper. Using the Sobel operator, edge strength (gradient magnitude) and direction (gradient) at each sub-pixel can be calculated sub-pixel by sub-pixel. For instance,

342

if we let (x0, y0), (x1, y1), …, (x6, y6) represent the x-y coordinates of the 7 sub-pixels of which each is from a hexagonal pixel numbered from 0 to 6 at the same location (i.e., on the same sub-image) as seen in Figure 1.

Figure 3. Modified Sobel operator

Let us assume that G1, G2 and G3 be the three diagonal directions from pixel 1 to pixel 4, from pixel 2 to pixel 5, and from pixel 3 to pixel 6 respectively as seen in Figure 1. Then, using the Sobel operators shown in Figure 3, the gradient value G at (x0, y0) is computed by

,321 GGGG ++= (8)

where

)],,(),(2),[()],(),(2),[(

221166

5544331

yxyxyxyxyxyxG

+×+−+×+=

)],,(),(2),[()],(),(2),[(

116655

4433222

yxyxyxyxyxyxG

+×+−+×+=

)].,(),(2),[()],(),(2),[(

665544

3322113

yxyxyxyxyxyxG

+×+−+×+=

(9)

Let

),( yx GGG = (10) denote the x-y coordinates of G. Then the gradient magnitude that describes the edge strength (x0, y0) is computed by

.|| 22yx GGG += (11)

3.3. Edge refining

After the edge detection step shown in Subsection 3.2, all sub-pixels have been assigned new values computed by Equation (11) that show their edge strengths. An edge map on the original square structure can hence be obtained by simply computing the intensity value of every square pixel as the average of the intensities of the sub-pixels constituting the square

pixel. This edge map shows the square edge pixels and their strengths. We can then follow the remaining steps of Canny’s method as shown in [13,14] to obtain the final edge map. Using Canny’s algorithm, two edge strength thresholds are set to examine all the candidate edge points/pixels. Those below the lower threshold are marked as non-edge pixels. Those which are above the lower threshold and can be connected to points/pixels whose edge strengths are above the higher threshold through a chain of edge points/pixels are marked as edge points/pixels. 4. Experimental results

To study the effect of new edge detection method on the virtual hexagonal structure, and compare with the results obtained in [11] based on simple image interpolation, 8-bit grey level Lena image of size 256×256 is chosen as our sample image (see Figure 4).

Figure 4. Original Lena image

Two different edge maps are produced in order to demonstrate the performance in accuracy improved by new edge detection method. The first edge map is obtained after the bilateral filtering but based on the simple interpolation method. The second one is obtained after the bilateral filtering based on the bilinear interpolation method. Both edge maps are generated based on the consistent environment para-meters such as σ1 is computed as indicated in Section 3 and σ2=1 for Gaussian filtering and bilateral filtering. It is found that σ1 is close to 65 for both cases. The same lower and higher thresholds are used to locate the exact edge points for all edge maps. The higher threshold is 0.125 and the lower threshold is 0.05.

Figure 5(b) shows an improved edge map with clearer edges and less dotted edge points compared with the map in Figure 5(a). Figure 5(b) has less broken edge segments than Figure 5(a). This can be

343

seen from the edges on the top hat boundary and the nose valley. Figure 5(b) demonstrates more complete boundaries than Figure 5(a). This is mainly because more accurate σ1 values are computed using the bilinear interpolation method. On the other hand, like the work in [11], the edge map in Figure 5(b) shows clear eye edges with pupils detected, and close to real lip boundaries.

(a) Edge map based on simple Interpolation

(b) Edge map based on bilinear interpolation

Figure 5. Edge maps with bilateral filtering

5. Conclusions

In this paper, an edge detection method is presented. The use of bilateral filtering combined with the advantages of hexagonal image architecture has achieved encouraging edge detection performance. The conversion from square to hexagonal structure is performed through bilinear interpolation. Similar results have also been obtained using other images including well-known ‘Mary’ image that further confirm that the algorithm proposed in this paper

outperforms the method based on simple image interpolation for image conversion.

Unlike the work done in [11], the edge detection algorithm shown in this paper is based on a bilinear image interpolation scheme when converting image from square structure to hexagonal structure. We take the advantages of higher degree of symmetry and equality of distances to neighbouring pixels that are special to hexagonal structure for satisfactory performance of image filtering and accurate computation of gradients including edges and their strength.

Note that in this paper, unlike the work in [11], the value of parameter σ1 used for bilateral edge detection on the virtual hexagonal structure was computed separately for each sub-image and this has improved the accuracy of edge maps.

For future approach, an efficient parallel processing for high-performance processing will be preformed. References [1] B.K.P. Horn, Robot Vision. MIT Press, New York, 1986. [2] R. Staunton, “The design of hexagonal sampling structures for image digitization and their use with local operators”, Image and Vision Computing, Vol.7, No.3, 1989, pp.162-166. [3] C.A. Wuthrich and P. Stucki, “An algorithmic comparison between square- and hexagonal-based grids”, CVGIP: Graphical Models and Image Processing, 53(4), 1991, pp. 324-339. [4] X. He, 2-D Object Recognition with Spiral Architecture. PhD Thesis, University of Technology, Sydney, 1999. [5] Q. Wu, X. He, and T. Hintz, “Virtual Spiral Architecture”, Proceedings of the International Conference on Parallel and Distributed Processing Techniques and Applications, Vol.1, 2004, pp. 399-405. [6] Huaqing Wang, Meiqing Wang, Tom Hintz, Xiangjian He and Qiang Wu, “Fractal image compression on a pseudo Spiral Architecture”, Australian Computer Science Communications, Vol.27, 2005, pp.201-207. [7] Xiangjian He and Wenjing Jia, “Hexagonal structure for intelligent vision”, Proceedings of International Conference on Information and Communication Technologies, 2005, pp.52-64. [8] Xiangjian He, Tom Hintz, Qiang Wu, Huaqing Wang and Wenjing Jia, “A New Simulation of Spiral Architecture”, International Conference on Image Processing, Computer Vision and Pattern Recognition, 2006, pp.570-575.

344

[9] Tian Yan, Liu Bin and Li Tao, “A Local Image Interpolation Method Based On Gradient Analysis”, International Conference on Neural Networks and Brain, Vol.2, 2005, pp.1202 – 1205. [10] Xiangjian He, Jianmin Li and Namho Hur, “Bilinear Interpolation on a Virtual Hexagonal Structure”, Proc. of 4th International Conference on Information Technology and Applications, 2007, pp.469-472. [11] Xiangjian He, Wenjing Jia, Namho Hur, Qiang Wu, Jinwoong Kim and Tom Hintz, "Bi-lateral Edge Detection on a Virtual Hexagonal Structure", Lecture Notes in Computer Science, Springer, 2006, Vol.4292, pp.1092-1101.

[12] C. Tomasi and R. Manduchi, “Bilateral Filtering for Gray and Color Images”, Proceedings of the 1998 IEEE International Conference on Computer Vision, 1998. [13] J. Canny, “A Computational Approach To Edge Detection”, IEEE Trans. Pattern Analysis and Machine Intelligence, 8:679-714, 1986. [14] Qiang Wu, Xiangjian He and Tom Hintz, “Bilateral Filtering Based Edge Detection on Hexagonal Architecture”, Proc. 2005 IEEE International Conference on Acoustics, Speech, and Signal Processing, Vol. II, 2005, pp.713-716.

345