I am referencing the book "Robot Vision" by Dr Horn. There, he provides the following equations for estimating the general motion parameters of a rigid body:-
$∫∫((u-u_r)β - (v - v_r)α)(-xyβ + (y^2 + 1)α)dxdy = 0$,
$∫∫((u-u_r)β - (v - v_r)α)((x^2+1)β - xyα)dxdy = 0$,
$∫∫((u-u_r)β - (v - v_r)α)(yβ + xα)dxdy = 0$,
$∫∫((u-u_r)β - (v - v_r)α)(v-v_r)dxdy + λU = 0$,
$∫∫((u-u_r)β - (v - v_r)α)(u-u_r)dxdy - λV = 0$,
$∫∫((u-u_r)β - (v - v_r)α)((u - u_r)y + (v - v_r)x)dxdy + λW = 0$,
$U^2 + V^2 + W^2 = 1$
Here, $U,V,W$ are the components of the translational component of a rigid body. $(x,y)$ is a point in the image plane. $α = -U +xW$ and $β = -V+yW$. Also $u_r = Axy - B(x^2 + 1) + Cy$ and $v_r = A(y^2 + 1) - Bxy - Cx$. Here $A,B,C$ are the components of the rotational component of a rigid body. And $(u,v)$ are the optical flow at point $(x,y)$. $λ$ is the lagrange multiplier. Since there would be multiple points in a image, and there would be multiple frames, $(u,v)$ would be a matrix of values.
These equations came after the following expression was minimized: -
$∫∫((u-ur)\beta - (v - vr)α)^2 dxdy + λ(U^2+V^2+W^2 + 1)$
So, I am trying to derive equations that can be used to find the values (A,B,C,U,V,W), so how can I approach this problem? It is given in the book that the first three equations are linear in A,B,C so these can be determined uniquely in U,V,W. Then the last four equations have to be used to get U,V,W. So how can I derive their values so that I could develop a code that could calculate these after I have calculated u,v using Horn and Schunk or Lucas Kannade algorithms?