We find all $\theta k$, for which Display Formula
$|PartAvgk(yp,t)\u2212PartAvgk(yp,t+1)|>\beta .$(18)
Figure 5 graphically represent the motion estimation procedure. In order to calculate the magnitude of change, we move the segment in the estimated direction $\theta k$ for all possible $x$ and $y$ inside the circle and measure the average outside the segment for each coordinate pair. For pixel locations $yp$, Display Formula$yp(xi,yi)=yp(x+ri\u2009cos\u2009\theta k,y+ri\u2009sin\u2009\theta k),$
where $ri$ is such that the distance of the farthest pixel in segment $yp$ remains less than the radius of the circle; i.e., $d(yp,cenp)<radp$. Using Eq. (15), we calculate all averages outside the segment boundary, maximizing the difference between the average calculated and the previous frame average over all pairs of coordinates. We then calculate the magnitude of the displacement $m\theta k$ in the $\theta k$ direction: Display Formula$m\theta k=max|PartAvg\theta k[yp(x,y),t+1]\u2212PartAvg\theta k[yp(xi,yi),t]|i\u2200\u2009\u2009i.$(19)
The new coordinates for $yp$ in direction $\theta k$ will be defined as Display Formula$x\u2032=x+m\theta k\u2009cos\u2009\theta ky\u2032=y+m\theta ky\u2009sin\u2009\theta k.$
We calculate the updated segment dynamic area by combining the translated segment in all significant $\theta k$ directions. The updated segment dynamic area is found as Display Formula$yp(x,y)=yp(x,y)\u222ayp(x+m\theta 1\u2009cos\u2009\theta 1,y+m\theta 1\u2009sin\u2009\theta 1)\u2062\u222a\u2026\u222ayp(x+m\theta k\u2009cos\u2009\theta k,y+m\theta k\u2009sin\u2009\theta k).$(20)