Professional Documents
Culture Documents
Weighted - MSE - Estimator Line Follow
Weighted - MSE - Estimator Line Follow
Authorized licensed use limited to: Kelvin Smith Library @ CASE. Downloaded on November 11, 2008 at 21:26 from IEEE Xplore. Restrictions apply.
abstraction for a higher level vision algorithm than a simple pixel in the unage. Since clearly the line pixels are not hmwn in ad-
based description. As discussed in section 2 we assume that the vance (they are the objective of the estimation process). the line
middle ofthe line we try to detect satisfies this equation: c = J ( T ) . equation is applied to all pixels in the iniage after they are appro-
To be exact. we assume that the hnction J ( . ) is a low order poly- priately weighted. Pixels that have a high intensity value are more
nomial, that is. c = 21 * TO + x2 * TO-' + +
. . . xo--l * r zo, + likely to belong to the line, hence their weights should be high (in
where zi are the coefficients and o is the order of the polynomial. our experiments we used white tape to indicate the line shown in
It is important lo note that we have also investigated other line fig. 1). In other words, the weight for a pixel (vi c;) should be ~
models. Again. they all introduced some form of continuity and proportional to its intensity value I(ri, ci).
smoothness since these are features of real lines on a floor. One Furthermore. in the edge image E, which is in our case the
model which is more general than the one used above is that of a squared norm of the gradient of a Gaussian (U = 1) lowpass fil-
Hemitc spline, where the column c and the row r are both poly- tered image, high values belong to pixels that are on edges. Clearly
nomial functions of a parameter s. While this model allows for the line creates two edges, but the weighted MSE solution results
more complex lines, the resulting optimi7ation procedure is more in the middle in the horizontal direction or these two edges, since
complex and will not be discussed in tlus paper. at this p i n t the average squared error is kept the smallest. Hence
Another way to enforce continuity and smoothness of a line is the weight of a pixel at ( ~ iG, ) should also be proportional to the
by following a snake based approach [Z] and its more recent vari- value in the edge image E(ri, ci).
ants. such as deformable templates [3]. These approaches have the In our pnrticular application, we are more interested in the part
problem that they are not globally optimal but depend 011 the ini- of the line closer to the camera than the one in the far distance.
tial conditions. As we will show "1 section 4 the proposed solution Hence we also weight the importance of the error proportionally to
does not require any initial conditions and h d s in fact the globally the closeness to the camera. To make sure that all these weights are
optimal solution. of tl!e same magnitude. we normalize the intensity image. denoted
by I, such that its standard deviation is 1 arid its ni@inium value
4. WEIGHTED MSE SOLUTION is 0. We do the same for the edge image and call it E. One row i
of the set of equations W y = W A X(there are N = RC rows of
Now that the line model is decided its parameters need to be es- them) Ims the form: wi t ci = 70; * (21 * rp -t22 * rp-' + + ...
timated. We use the wcll known concept of MSE estimation via xo--l * r i + x , ) _ w h c r e w i = i ( r i , c i ) t E ( r i , c i ) t r i J R . N o t e
the generalized inverse (also known as pseudo-inverso or Moore- that the error for a particular parameter vector i is now equal to
Penrose-inverse) of a matrix A t which we denote by ( A t ) ' . As- e * ( ? ) = wi * (c,- (21 *rp+ i 2 try-' -t . . . + i , - l * ri + i o ) ) ,
sume that we have the following equation y = Ax where y is which illustrates the idea behind weighting the error of the pixels
an N x 1 vector, x = [z1,z2, , . . ,zo--l,x,IT is the h e model differently.
parameter vector of dimensions o x 1 and A is a matrix of di- In short. this setup is such that the solution will follow the
mensions N x 0. Theii the MSE solution to this problem is: edges and the bright areas closer to the camera as well as the order
i = (ATA)'ATy. In other words the total quadratic error e' = of the line model allows. Note that for OUT application it is quite
(y - A i ) T ( y- A i ) is as small as possible for the selected i. meaningful to weight heavier the pixels closer to the camera. This
Since we would Like to he able to weight the individual com- clearly depends on the particular applicatioR though it shows a
ponents of the quadratic error. we introduce an invertible diagonal nice feature of the algorithm which is the ability to include such
weight matrix 14' ofdimensions N x N . Hence we are interested in prior knowledge into the formulation of the problem. For example
the solution that m h h i z e s the following weighted quadratic error in a tracking application, where the previous location of the line is
eT, = ( y - ~ i ) T ~ , ~ - =T (W~( (~ y
- A- ~~) t) ~ ) ) . one can use a location weighting function that favors solu-
) ( W ( ~ - A ? known,
Note that this is an equivalent problem lo minimizing the mean tions that are close to where a motion nmdel would have predicted
squared error of the following equation: y, = A,x,. where them.
U,, = W U ,A, = WA and x W is the " n e t e r vector that
needs to be estimated. The solution to tlus problem is now :e, = 6. EXPERIMENTAL RESULTS
~ I
..)'ATV,.,= (ATWTWAI'ATWTCV~.
(4TA..", I"- ~
Now that we have a line model and a method for finding the Figure 1 shows the image acquired by the on-board camera. Only
optimal solution lo a weighted MSE problem, we need to set up the rows 15 through 60 are processedby the proposed algorithm, since
problem. In other words we need to d e h e the matrix A. which from the mounting of the camera this is where we expect the line
contains the line model, the vector y which reflects the desired to be.
values atid the weighting matrix W which reflects the importance We have performed a series of experiments where we visually
of each pixel in the image. 'Tlus is done in the next section. compare the perfomlance of an automatic Canny edge detector [4]
(the first step of a two step line detection process) and our proposed
5. WEIGHTING SELECTION algorithm First we show the perfomlance in a noise-free environ-
ment, which represents hnages taken with suficient ambient light
The basic idea of this algorithm is to use all available pixels for and theii we show results when the ambient light is low and hence
detecting a line that is given by a linc model. In other words, no tbe images are noisy. Polynomials ofvarious orders were tested for
pixels are eliminated dpriori but all ofthem are involved in hiding describing the line. For the example of fig. 1 orders o = 2 , . . . ,5
the proper estimate. Clearly some pixels are more important than gave comparable results. The results reported in this section were
others and hence we use a weighted MSE scheme discussed in achieved using an order o = 3.
section 4 for estimating the parameters. Figure 3 shows the result of the automatic Canny edge detec-
+
The line equation used is c = TI * ro 2 2 * TO-^ . . . + + tor implemented in the MATLAB image processing toolbox. Fig-
zo-l* v i -zo.This equation must hold for all line pixels (r.c) ure 4 shows the same image processed hy the proposed algnrithni.
I - 291
Authorized licensed use limited to: Kelvin Smith Library @ CASE. Downloaded on November 11, 2008 at 21:26 from IEEE Xplore. Restrictions apply.
Clearly the result is at least as good as the Canny edge detector and
in addition the proposed algorithm results in a parametric descrip-
tion of the line and not only in an edge image. Note that the pix-
els closer to the camera (bottom of the image) are better matched
than the ones Funher away, which is tbe intention of the row-based
weighting. Furthermore, in the MATLAB implementation of both
algorithms our algorithm is about an order ofmagnitude faster.
For the next experiment we added zero mean additive w h t e
Gaussian noise (AWGN) to the image resulting in a signal to noise
ratio (SNR) of OdB, simulating a low light environment. The re-
sulting grayscale image can be seen in fig. 5 , the squared norm of
the g d i e n t o f a Gaussian (U : 1) lowpass filtered version of this
noisy image can he seen in fig. 6 and fig.7 shows the result ofthe
Canny edge detector. Figure 8 shows the image of fig. 5 processed
by die proposed algorithm. Clearly this is still a g o d result even
though the SNR is so low that the Canny edge detector fails.
8. REFERENCES
Fig. 3. Canny edge detector processing the image shown 111 fig. 1
I - 295
Authorized licensed use limited to: Kelvin Smith Library @ CASE. Downloaded on November 11, 2008 at 21:26 from IEEE Xplore. Restrictions apply.
(" ?(I 3,) 40 !e 8') 1" ""
Fig. I. Canny edge detector processbig the image shown "I fig.5
I - 296
Authorized licensed use limited to: Kelvin Smith Library @ CASE. Downloaded on November 11, 2008 at 21:26 from IEEE Xplore. Restrictions apply.