# Questions about Optical Flow implementations

I have some doubts related to some of the optical flow implementations.

1. How to compute angular error for optical flow algorithms? I know the formula for computing,
$$\theta=\arccos(\vec{v}_c\cdot\vec{v}_e)$$

I have the computed flow field $$\vec{v}_c$$. How to get the exact flow field $$\vec{v}_e$$, ie the actual movement of pixels between frames ?

1. I am trying to implement Nagel's Paper for optical flow computation based on the discussion given in here. What I don't get is how to compute the weight matrix $$W$$. $$W$$ is given as

$$W=(I_x^2+I_y^2+2\delta)^{-1}\begin{pmatrix}I_y^2+\delta &-I_xI_y\\ -I_xI_y & I_x^2+\delta \end{pmatrix}$$

Assuming that the image dimensions are $$m\times n$$ the first matrix on the RHS has dimension $$m\times n$$, but the second block matrix is of dimension $$2m\times 2n$$. What am I doing wrong ?