tailieunhanh - EBook - Mathematical Methods for Robotics and Vision Part 5

Tham khảo tài liệu 'ebook - mathematical methods for robotics and vision part 5', kỹ thuật - công nghệ, cơ khí - chế tạo máy phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | . SVD LINE FITTING 37 4. the line normal is the second column of the X matrix n v 5. the third coefficient of the line is p n 6. the residue of the fit is d l n The following mat lab code implements the line fitting method. function l residue linefit P check input matrix sizes m n size P if n 2 error matrix P must be m x 2 end if m 2 error Need at least two points end one ones m 1 centroid of all the points p P one m matrix of centered coordinates Q P - one p U Sigma V svd Q the line normal is the second column of V n V 2 assemble the three line coefficients into a column vector l n p n the smallest singular value of Q measures the residual fitting error residue Sigma 2 2 A useful exercise is to think how this procedure or something close to it can be adapted to fit a set of data points in R with an affine subspace of given dimension . An affine subspace is a linear subspace plus a point just like an arbitrary line is a line through the origin plus a point. Here plus means the following. Let be a linear space. Then an affine space has the form p a a p l and l Hint minimizing the distance between a point and a subspace is equivalent to maximizing the norm of the projection of the point onto the subspace. The fitting problem including fitting a line to a set of points can be cast either as a maximization or a minimization problem. 38 CHAPTER 3. THE SINGULAR VALUE DECOMPOSITION Chapter 4 Function Optimization There are three main reasons why most problems in robotics vision and arguably every other science or endeavor take on the form of optimization problems. One is that the desired goal may not be achievable and so we try to get as close as possible to it. The second reason is that there may be more ways to achieve the goal and so we can choose one by assigning a quality to all the solutions and selecting the best one. The third reason is that we may not know how to solve the system of equations f x 0 so instead we minimize the norm f x which is a scalar function

TỪ KHÓA LIÊN QUAN