Anda di halaman 1dari 5

Sub-Pixel Accuracy Edge Fitting by Means of B-

Spline
Ricardo Lucas Bastos Breder 1, Vania Vieira Estrela *2, Joaquim Teixeira de Assis 3
State University of Rio de Janeiro (UERJ), Polytechnic Institute of Rio de Janeiro (IPRJ), CP 972825, CEP 28601-970,
Nova Friburgo, RJ, Brazil
1
r1c4rd0.luc45@gmail.com
2
vestrela@iprj.uerj.br
3
joaquim@iprj.uerj.br

Abstract— Local perturbations around contours strongly derivative perpendicular to the edge orientation is
disturb the final result of computer vision tasks. It is common to approximated by a normal function. The edge location is this
introduce a priori information in the estimation process. function maximum. Other works are based on linear [7],
Improvement can be achieved via a deformable model such as quadratic interpolation [1], B-spline [17], non-linear functions
the snake model. In recent works, the deformable contour is
[8], and as a segmentation by-product [22, 23].
modeled by means of B-spline snakes which allows local control,
concise representation, and the use of fewer parameters. The In all these methods, the estimation is local and does not
estimation of the sub-pixel edges using a global B-spline model include a noise model. Hence, the local perturbations heavily
relies on the contour global determination according to a disturb the final result. A usual filtering approach requires
Maximum Likelihood framework and using the observed data introducing a priori information in the estimation process
likelihood. This procedure guarantees that the noisiest data will such as the snake model suggested by [9]. In newer works, the
be filtered out. The data likelihood is computed as a consequence deformable contour is modeled using piecewise polynomial
of the observation model which includes both orientation and functions (B-spline snakes) [4, 12] allowing local control,
position information. Comparative experiments of this algorithm concise representation, and it employs few parameters.
and the classical spline interpolation have shown that the
This work introduces a model for estimating sub-pixel
proposed algorithm outperforms the classical approach for
Gaussian and Salt & Pepper noise. edges using a global procedure based on a B-spline model [3,
18], but the statistical properties of the observations are
I. INTRODUCTION computed and used in a Maximum Likelihood (ML)
One of the greatest challenges of modeling remotely sensed estimation framework which insures an efficient filtering of
images is the mixed pixel problem, that is, the level of spatial the noisy data. Section II briefly describes the classical B-
detail captured is less than the amount of expected details. spline formulation. Section III introduces the proposed
This sub-pixel heterogeneity is important, but not readily extension to the sub-pixel case. Section IV discusses
capable of being known. In a traditional manner, each pixel is experimental results of this algorithm. Finally, Section V
classified into one of many land cover types (hard presents some conclusions.
classification), implying that land cover exactly fits within the
bounds of one or multiple pixels. However, several pixels
consist of a mixture of different classes. The solution to the
mixed pixel problem typically centers on soft classification,
which allows proportions of each pixel to be partitioned
between classes. An important edge extraction approach is
concerned with improving the detection accuracy and
different sub-pixel edge detectors [10].
Popular approaches used to compute sub-pixel location of
edges are based on the image moments [6, 11, 14, 15, 16, 18].
Image interpolation is another way to find sub-pixel edge
coordinates. [13] presents a technique where the first

COPYRIGHT NOTICE:

MMSP’09, October 5-7, 2009, Rio de Janeiro, Brazil.


978-1-4244-4464-9/09/$25.00 ©2009 IEEE.

Fig. 1 – Illustration of the mixed-pixel problem [20].


II. B-SPLINE CONTOUR FORMULATION observation version of the true variables  Yi , Gi  , where
Let t0 , t1 ,..., tk 1 be the set of so-called knots. Spline  xoi , yoi  are the cartesian coordinates of the observation Oi .
functions are polynomial inside each interval  ti 1 , ti  and vs (t )   xs (t )  B(t ). x , ys (t )  B (t ). y  is the edge B-
exhibit a certain degree of continuity at the knots (see [3]).
spline model, where    x ,  y  is the vector of k control
The set  Bi ,n (t ), i  0,..., k  n  1 of the B-splines, constitutes
a basis for the linear space of all the splines contained in points  M  k  . The likelihood becomes
tn , tk  n  . Hence, a spline curve f(t) of degree n is given by :
P  Oi /    P  X i / H i ,   P  H i /   .
k  n 1
f (t )  pi Bi ,n (t ) ,
i0
To derive P  X i / H i ,θ  , these assumptions are made: X i

depends only on vs  t (i )    X s  t (i )   xsi , ys  t (i )   ysi , the


where pi is the weight applied to the corresponding basis
functions Bi,n. The B-Spline functions are defined by the corresponding edge point in the direction H i has polar
recursion formulas in [2]: coordinates  Yi , H i  and P  X i / H i , Yi  is Gaussian. Then,

Bi ,0 (t )   10else
if 
ti  t  ti 1 , and   X  X   Y  Y   2 
1
exp   
oi si oi si 
P  X i / H i ,    P  X i / H i , Yi   
t  ti t t 2 Xi  2 Xi2 
Bi , n (t )  Bi , n 1 (t )  i  n 1 Bi 1, n 1 (t ) .  
ti  n  ti ti  n 1  ti 1
The computation of  Xi is based on a modified version
The Bi , n (t ) are nonnegative, J i   G yi  G xi  and obey the of the method described in [3]. Now, P  H i / θ  requires the
relationship:  i Bi ,n (t )  1 for all values of t. Without loss of components of H i . They can be computed by convolving the
generality, the index n for the cubic B-spline can be dropped. original image with the derivative kernels K x and K y .
Eq. (1) can be re-written in matrix notation as: Assuming an additive Gaussian noise, it is straightforward to
show that P  H i / Gi  is also Gaussian. The cross-correlation
f (t )  BT (t ). .
and auto-correlation functions of the vertical and horizontal
components of H are given by:
v( t )   x  t  , y  t   is the vector of B-spline functions
B( t )   B0 ( t ),B2 ( t ),...,BN 1 ( t )  and θ is the weight vector: Cxy  xi  x j , yi  y j   E  H xi .H yj   E  H xi  E  H yj 
  b2  xi  x j , yi  y j   K x  x, y  * K y   x,  y  .
T
θ   p0 ,..., p N  1  . The 2D version of Eq. (1) describes an
open parametric snake on the plane: v( t )   x  t  , y  t   . The

K x and K y are the complex conjugate of the matrices of K x
pixels pi   pxi , p yi  are now 2D vectors and are called the
control points. and K y , respectively. This relation leads to

E  H xi .H yi / Gxi G yi   E  H xi / Gxi G yi  E  H yi / Gxi Gyi   0 ,


III. SUBPIXEL B-SPLINE FITTING
This sub-section aims to obtain a likelihood expression for and
the observation, supposing additive Gaussian noise b with
standard deviation σb. E  H xi .H xi / Gxi   E  H xi / Gxi  E  H xi / Gxi    b2  K x (i, j ) 2
Let ve  ve (i.h )   xe (i.h ), ye (i.h)  , i  1,..., M  be a set of i, j

edge pixels with integer coordinates h computed by a classical   b2  K y (i, j )2   H2


i, j
.
algorithm. To simplify notation, ve (i.h) = ve for all variables
related to the pixel i.
For each pixel i belonging to this set, an observation vector P  H i / θ  represents the conditional expected value of w
Oi= (Xi , Hi) is assumed, where vector Hi= (Hxi , Hyi) is the assuming z. Let Ji be the vector defined by J i   G yi  G xi 
local gradient of the image and Xi corresponds to a sub-pixel
position estimation of the edge along Hi. Xi is estimated in and let Ri be the unit vector collinear to vs in vsi . Hi and Ji
the pixel local coordinate system by means of a quadratic are clearly related by a normal distribution. To find
interpolation [5]. These variables are supposed to be the
P  H i / θ  , the well known property of the edge being
orthogonal to the local gradient is used: E (θ )  (d  Bθ )T W (d  Bθ ) .

P( H i / J i )P( J i ) d  ( xo1 ,..., xoM , yo1 ,..., yoM , 0,..., 0)T is a (3M×I) vector, W is a
P( H i / θ )  P( H i / Ri ( θ ))   ,
P( Ri ( θ )) (3M×3M) diagonal matrix with Wi ,i  Wi  Wi  M ,i  M  1/  Xi2 ,
and Wi+ 2M,i+ 2M  1 /  T 2 2 H  .
for all the values of Ji collinear to Ri, that is Ji = a Ri. It can
be rewritten as: B is a (3M×2N ) matrix whose components are
Bij  B j  t (i )  . Currently, the points i are uniformly
P  O / v s    i P  Oi / vs  . distributed: t (i )  i / M . Bx and By are given by

The gradient does not have a privileged direction. Uniform Bxij  NH xi  Bi ,2 (i / M )  Bi 1,2 (i / M )  , and
regions are supposed to be more frequent than the regions
with a high gradient magnitude. Thus, the a priori probability Byij  Bxij  NH yj  B j ,2 (i / M )  B j 1,2 (i / M )  .
of Ji can be modelled by

1  || J ||2  1  a2 
P( J i )  exp   i 2   exp   2  .
      Σ 

Combining the two previous expressions results in

 H yi2  H xi2 
P( H i / θ )  K .exp   2  
 2   2
 H 
 ( H xi Rxi  H yi Ryi )2  2 
exp    .
 2 H2 ( 2 H2   2 )
 

K is a normalization constant involving P ( Ri ) ,  and  H .


If    H , then: Fig. 2. Test image.

 H yi2  H xi2   ( H xi Rxi  H yi Ryi )2 


P( H i / θ )  K .exp    exp    .
 2 2 H2
   

Vectors Ri  Ti || Ti || and

T
 x ( t( i )) ys ( t( i )) 
T Ti   s , 
 t t 

are constant along an edge. Ti components are also B-spline


functions having spline basis as follows:

Bn,i ( t ) n n
 Bi ,n 1 ( t )  Bi 1,n 1 ( t ).
t ti  n  ti ti  n  1  ti 1
Fig. 3. Results for the suggested algorithm (red), the true edge (white) and the
CSI (blue). (a) 10% of noise, (b) 20% of noise, (c) 40% of noise and (d) 50%
If the Oi ’s are conditionally independent, then the global of noise.
likelihood becomes P  O / v s    i P  Oi / v s  , and
θˆ  arg .max  P( X i / H i ,θ )P( H i / θ ) , leading to the The solution θˆ *  arg minθ E( θ ) is given by the weighted
θ
i
minimization of the quadratic energy function: least square relation: θˆ *  arg min E( θ ) .
θ
IV. EXPERIMENTAL RESULTS
Several tests were performed with the squared area of a
synthetic image (Fig. 2). For all the tests, the gradient was
computed by means of the derivative of a Gaussian kernel
with a standard deviation equal to 1. The number of knots N (a) (b)
was set to M/4. Fig. 6. Results for standard cubic B-spline fitting (a) and for stochastic cubic
B-Sline (b) for Gaussian noise with SNR=20 dB.

Figures 5 and 6 show the performance of the proposed


algorithm in real images. The rectangles mark regions where
one can check the results of standard cubic B-spline and its
stochastic counterpart for noisy images with SNR=20 dB. In
Fig. 6, the performance of our algorithm seems to be slightly
better.

V. CONCLUSION
In this paper, a robust algorithm for edge estimation with
sub-pixel accuracy based on a stochastic cubic B-spline is
introduced. The model parameters are calculated according to
an ML estimation framework relying on a Gaussian noise
model. The data likelihood is computed from the observation
model which includes both orientation and position
information.
Comparative numerical experiments between this algorithm
and the CSI have been carried out for two different types of
Fig. 4. Results for the suggested algorithm (red), the true edge (white) and
the CSI (blue). (a) p0 = 0.2, γ = 0.3; (b) p0 = 0.2, γ = 0.6; (c) p0 = 0.4, γ = 0.3;
noise: Gaussian and Salt & Pepper. The experiments have
and (d) p0 = 0.4, γ = 0.6. shown that our algorithm outperforms the other two, for both
kinds of noise. It remains accurate even for high noise levels
First, this algorithm was tested for an additive normal noise while the usual methods are generally sensitive to local
with standard deviations equal to 0.1, 0.2, 0.4 and 0.5 which perturbations due to the global computation of a given
represent, respectively, 10%, 20%, 40% and 50% of the boundary using a ML rule. The likelihood of the observations
maximum amplitude. Fig. 3 shows the results obtained with is explicitly computed.
this algorithm (red), the true edge (white) and the classical
spline interpolation (CSI; blue). The suggested model has ACKNOWLEDGMENT
been developed for Gaussian noise, but it remains efficient for Prof. Estrela and Prof. de Assis are grateful for the support
other types of noise as well. In Fig. 4, the results obtained received by CAPES, FAPERJ and CNPq.
with Salt & Pepper noise are shown, with  n  y 2 p0 , for low
rate noise ( p0  20) and high rate noise ( p0  40) with two REFERENCES
different values of the amplitude  . The Salt & Pepper noise [1] M. Baba, and K. Ohtani, “A novel sub-pixel edge detection system for
pdf is dimension measurement and object localization using an analogue-based
approach”, In IOP Publishing Journal of Optics A: Pure & Applied
Optics, 3, pp 276–83, 2001
P ( x)  p0 ( x   )  (1  2. p0) ( x)  p0 ( x   ) . [2] C. de Boor , A Practical Guide to Splines, Springer Verlag, N.Y,, 1978.
[3] F. Bouchara, “Efficient algorithm for computation of the second-order
moment of the sub-pixel edge position”, Applied Optics 43, pp 4550–
4558, 2004.
[4] P. Brigger, J. Hoeg, and M. Unser, “B-splines snakes: a flexible tool for
parametric contour detection”, IEEE Trans.Im.Proc. 9, pp. 1484–1087,
2000.
[5] F. Devernay, “A non-maxima suppression method for edge detection
with sub-pixel accuracy”, In: INRIA Sophia Antipolis Research Report
Nb. 2724, 1995.
[6] S. Ghosal, and R. Mehrotra, “Orthogonal moment operators for sub-pixel
edge detection”, Patt. Recog., 26, pp. 295–306, 1993.
[7] S. Hussmann, and T.H. Ho, “A high-speed sub-pixel edge detector
(a) (b) implementation inside a FPGA”, Real-Time Imaging 9, pp. 361–368,
2003.
Fig. 5. Results for standard cubic B-spline fitting (red) and for stochastic
cubic B-Sline (blue): (a) No noise; and (b) Gaussian noise with SNR=20 dB.
[8] K. Jensen, and D. Anastassiou, “Sub-pixel edge localization and the [16] A.J. Tabatabai, and R.Mitchell, “Edge localisation to sub-pixel values in
interpolation of still images”, IEEE Trans. Image Proc. 4, pp. 285–295, digital imagery”, IEEE Trans. PAMI. 6, pp. 188-201, 1984.
1995. [17] F. Truchetet, F. Nicolier, and O. Laligant, “Sub-pixel edge detection for
[9] M. Kass, A. Witkin, and D. Terzopoulos, “Snakes: active contour dimensional control by artificial vision”, Electronic Imaging 10, pp. 234–
models”, Int. J. Comp. Vision 1, pp. 321–331, 1988. 239, 2001.
[10] J.K. Kim, M.C. Lee, C.K. Ahn, and C.Y. Kim, “Acquisition of 3D [18] S. Venkatesh, M. Kisworo, and G.A. West, “Detection of curved edges
information using stereo vision system by relative stereo disparity with at sub-pixel accuracy using deformable models”, In Proc. of IEEE Conf.
sub-pixel resolution”, In Proc. of the IEEE Intl. Symp. on Ind. Electronics Vis. Im. Sig. Proc., pp. 304–312, 1995.
- ISIE, Pusan, South Korea, pp. 1671-1676, 2001. [19] Q. Ying-Donga, C. Cheng-Songa, C. San-Benb, and L. Jin-Quan, “A
[11] E.P. Lyvers, O.R. Mitchell, M.L. Akey, and A.P. Reeves, “Sub-pixel fast sub-pixel edge detection method using Sobel-Zernike moments
measurements using a moment based edge operator”, In IEEE Trans. operator”, In Image and Vision Computing, 23, pp. 11–17, 2005.
PAMI 11, pp. 1293–1309, 1989. [20] http://rst.gsfc.nasa.gov/Sect13_2.html
[12] R.G.N. Meegama, and J.C. Rajapakse, NURBS, In Image and Vision [21] X. Ren, and J. Malik, “A probabilistic multi-scale model for contour
Computing , 21 , pp. 551–562, 2003. completion based on image statistics”, In Proceedings of 7th European
[13] Y. Nomura, M. Sagara, and H. Naruse, “An edge location to sub-pixel Conference on Computer Vision , Vol. 1, pp. 312–327, 2002.
precision and analysis”, In System Comp. in Japan, 22, pp. 70–80, 1991. [22] K. Blekas, A. Likas, N. Galatsanos, and I. E. Lagaris, “A spatially-
[14] Y. Shan, and G.W. Boon, “Sub-pixel localisation of edges with non- constrained mixture model for image segmentation”, IEEE Trans. on
uniform blurring: a finite closed-form approach”, In Image and Vision Neural Networks, 16(2):494-498, 2005.
Computing 18, pp. 1015–1023, 2000. [23] C. Nikou, N. Galatsanos, and A. Likas, “A class-adaptive spatially
[15] C. Shyi-Chyi, and W. Tian-Luu, “Sub-pixel edge detection of color variant finite mixture model for image segmentation”, IEEE Trans. on
images by principal axis analysis and moment-preserving principle”, In Image Processing, 14(4):1121-1130, 2007.
Patt. Recog., 38, pp. 527–537, 2005.

Anda mungkin juga menyukai