Fast Sphere Detection Based on Polytope Method Using One-Dimensional Histogram

We propose a method for fast extraction of sphere. Basically, main algorithms of the extraction in 3D figure are the same as 2D method we reported in previous research. The proposed method utilizes the one-dimensional histogram as search space, and the polytope method which is one of the minimization algorithms for search parameters in target figure. The histogram has two characteristics: (a) The distribution of the histogram changes if the parameters of representing the sphere changes. (b) The value of highest frequency of histogram becomes maximum if the best parameters are obtained. Therefore, the maximum value of highest frequency of histogram is searched to obtain the best parameters of the sphere by using the polytope method. By using the polytope method, the proposed method can extract the sphere from 3D vertex data without a large memory space or long processing time.


Introduction
In factory automation, recognition of object and detection of position is necessary in assembly (1) .Human interface devices which recognize humans and things to input gaming consoles are applied (2) .Recognition of objects or humans is needed in field of welfare.In these fields, 3D pattern matching is an important technique.We have proposed previously a fast extracting method for 2D figure with lines, circles and arbitrary shapes using small memory space (3)(4)(5) .Furthermore, the 2D extraction method was developed to extract a sphere (6) .In this paper, it is the first time to implement the proposed method in sphere extraction.Different from conventional silhouette method (7) , the proposed method is designed to extract the sphere from 3D vertex data which is gotten by using stereo camera (8) or 3D laser scanner (9) .According to the 3D extraction in previous research (10) , we employ other target figures and their evaluation value for extraction in this paper.Based on the 2D method we reported in previous research, we describe our proposed method as 2D method's extension to recognize sphere, using the polytope method and one-dimensional histogram, from target figures in this paper.

Sphere Extraction
The proposed method utilizes the polytope method and one-dimensional histogram.An application of the polytope method to extract figures and a procedure of extraction of figures using one-dimensional histogram are introduced in this section.

Approach
In this study, one-dimensional histogram is generated DOI: 10.12792/icisip2013.046 from 3D vertex data.The histogram has two characteristics.(a) The distribution of the histogram changes if the parameters of representing the sphere changes.(b) The value of highest frequency of histogram becomes maximum if the best parameters are obtained (See the section called "Extraction Method of sphere" for details).By using the polytope method, the maximum value of highest frequency of histogram is applied to obtain the best parameters of a sphere.
The polytope method has three characteristics: (1) Since it can get a minimum value without derived function different from the Newton's method (11) , the concept can be used for searching in histogram.(2) Light estimation in program.
(3) For the use, the "initial values" must be set because this method is available for only a single-peak function.If these are not suitable, the optimum value may not be obtained.For more details, see Ref. (12) and (13).

Extraction Method of Sphere
Extraction procedure of sphere using one-dimensional histogram is introduced in this section.A search sphere c is defined for the extraction of target sphere C as shown in Fig. 1a.To represent search sphere c as parameters p(x 0 , y 0 , z 0 ), center coordinates of search sphere c, is defined as shown in Fig. 1a.The distance between center of search sphere c, p(x 0 , y 0 , z 0 ), and a point on target sphere C is set as R. The distance of search sphere c to the direction of a point on c is r, and let R/r be the distance ratio d.The value of d is calculated for all vertexes on target sphere C to make If the parameters of search sphere c which are represented by p(x 0 , y 0 , z 0 ) are much different from those of target sphere C, the deviation of distance ratio d is large.Thus, d is voted on wide part of one-dimensional histogram.As a result, the distribution of the histogram is gentle.In consequence, the value of highest frequency f max is low as shown in Fig. 1d.Here, we define the value of d at the position of highest frequency f max as d max .
According to the parameters of search sphere c approach those of target sphere C (Fig. 1a  In this study, s is set to 1.At the last case, the scale S of target sphere C is obtained as s×d max.In this way, the target sphere C is extracted if the value of highest frequency f max of histogram becomes maximum.Thus, we define the following evaluation function E to evaluate the histogram. where, N v is the number of the vertexes per area.Symbol V w means a weight which is used when d is voted to one-dimensional histogram.The weight has a distribution.The example is shown in Fig. 2. If the parameters of search sphere c are the same with those of target sphere C, f max is highest.Then, the value of function E becomes the lowest.p(x 0 , y 0 , z 0 ) of target sphere C is searched, so that the function E is lowest, by using the polytope method.As shown in Fig. 3, the center of target figure is set at (0, 0, 0) and the search sphere is at (5, 5, 5).

Experiment
3D vertex data of target figures are applied in experiments to detect the normal sphere (Fig. 4 (a)), odd sphere (Fig. 4 (b)), chipped sphere (Fig. 4 (c)), cube (Fig. 4  (d)) and plane (Fig. 4 (e)).The number of vertexes are, normal sphere (Fig. 4 (a)) 482, odd sphere (Fig. 4 (b)) 482, chipped sphere (Fig. 4 (c)) 455, cube (Fig. 4 (d)) 866, plane (Fig. 4 (e)) 144, respectively.The number of the vertexes per area N v was set to 4.26.In each experiment, the search sphere is set to p(x 0 , y 0 , z 0 ) = (5, 5, 5), r = 1, and the each position of target figures is set to p(x, y, z) = (0, 0, 0).V w , weight used when voting to one-dimensional histogram, is set to 10.In the experiments, we used a personal computer (CPU: E-350 1.6[GHz] (AMD, Inc.), OS: Momonga Linux 7 x86_64).The range of search space was set to all x-y-z axis as ± 15 distance from (0, 0, 0).Let the distance ratio d of point on figure C be d a .First, the value of V w is voted at the position of d a in one-dimensional histogram.According to that, as the distance ratio d goes away from d a , the value will reduce one by one.d was calculated for all vertexes by the method introduced in Sect.2.2.
As we see in the experimental results, value of E and parameters after the process are shown in Table 3.The comparison of E in searching of each shape is shown in Fig. 5. Obvious difference of E of different shapes can be seen in Fig. 5.According to the experiments, by setting the value of E th between 0.17 and 0.39, we can separate sphere or similar sphere from other shapes.

Conclusions
This paper reports our method of extracting sphere by using one-dimensional histogram.Owing to the simplicity of the polytope method and the one dimension histogram which is light to apply are employed, the proposed method  E th E only expends very small memory space and requires short processing time.The algorithm is robust and against noise.Also, it can separate sphere and other shapes.In addition, proposed method can be developed to extraction of arbitrary 3D shapes.

Fig. 1 .
Fig. 1.Vertex of search for extraction of 3D sphere