HELP SOLVE_DILATION David Young April 1994 LIB * SOLVE_DILATION provides a single procedure that finds the focus of expansion and the rate of dilation for a simple dilating dense flow-field. solve_dilation(U_array, V_array) -> (D, x0, y0) solve_dilation(UVlist) -> (D, x0, y0) In the first form, U_array and V_array should be arrays of identical dimensions containing numbers representing the components of the optic flow field, perhaps as returned by the procedure provided by *horn_schunck. In the second form, UVlist should be a list of vectors or other explodable structures. Each vector should contain 4 elements, specifying x, y, u and v in that order, where u and v are the components of the flow vector for the point (x, y) in the image. The three results are as described below. This is intended mainly for teaching demonstrations rather than for practical applications. The procedure assumes that the flow is of the form u = D (x - x0) v = D (y - y0) where x and y are image coordinates, u and v are the flow vector components for the image point at (x, y), x0 and y0 are the coordinates of the focus of expansion, and D is the rate of dilation. This assumption is valid for movement relative to a surface normal to the line of sight, with no camera rotation. It will be a reasonable approximation if the visible objects in similar distances from the camera and the amount of camera rotation is small. The algorithm uses a least-squares approach. The quantity 2 2 E = SUM [ (u - D x - u0) + (v - D y - v0) ] i i i i i where u0 = -D x0 and v0 = -D y0 is minimised. Here (u , v ) is the flow vector at (x , y ). i i i i The least-squares solution is straightforward - see the program for the formulae. --- $popvision/help/solve_dilation --- Copyright University of Sussex 1994. All rights reserved.