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.