Re[2]: [XviD-devel] Global Motion Compensation

Radek 'sysKin' Czyz xvid-devel@xvid.org
Fri, 25 Oct 2002 22:34:02 +0930


> Can you explain how you get global motion from local vectors?
> Just calculating the average of all MVs will not be robust against locally
> moving objects.

Ok sure.
My first idea was a histogram, which I would 'smooth' and find a
maximum. This function actually does a similar thing, but in a
different way:

First, it checks all possible vectors, but in a big squares of 32x32
halfpixels. I look for a square in which the biggest number of vectors
is. (this can be done faster, because there is a huge probability that
more than 50% vector is -15..16, -15..16).
After I know this square, I divide this square and find the 'most
popular' vector which would fit in this squre (by dividing again and
again). My final square is 3x3 pixels big, end even if there is only
one vector in it - it would still be close to 'original' (32x32), only
more precise.

Ok, now I don't understand it myself ;)

Radek