C++
C#
VB
JScript
All

# motion8

Copyright (C) 2005 IENT-RWTH Aachen

void motion8(int mx,int nx, const unsigned char *px, const unsigned char *py, int m,int n, int *p)

Motion Estimation of two greyscale images with 8x8 blocks

Parameters

mx | Height of the images
nx | Width of the images
px | Pointer to the first image
py | Pointer to the second image
m | Height of search areas, has to be 8, 16, 32 or 64.
n | Width of search areas, has to be 8, 16, 32 or 64.
p | A matrix of indexes representing the motion estimation vectors of each 8x8 block of X. Motion vectors are in the range [-m/2 ... m/2-1] for vertical shifting and [-n/2...n/2-1] for horizontal shifting. Positive values mean displacement to the bottom, respectively to the right. At least 2*(mx/8)*(nx/8) integers have to be allocated.

Example

    ucharImage Image0, Image1;
    PGMFile fin0("x.pgm"), fin1("y.pgm");
    fin0>>Image0; fin1>>Image1;
    DenseVector<ucharImage::index_type>::self M(X.size()/8);
    motion8(X.nrows(),X.ncols(), &X(0,0), &Y(0,0), 32,32, (int *)&M(0,0));

See Also

motion