C++
C#
VB
JScript
All

External Function qmotion8


Copyright (C) 2005 IENT-RWTH Aachen

void qmotion8(int mx,int nx, const unsigned char *px, const unsigned char *py, int l, int m,int n, int m0,int n0, 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

l

Number of layers (image layer excluded) The value 0 makes quad_motion equivalent to the motion function.

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.

m0

Height of search areas at first layer, has to be 8, 16, 32 or 64

n0

Width of search areas at first layer, 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);
qmotion8(X.nrows(),X.ncols(), &X(0,0), &Y(0,0), 8,8, 16,16, (int *)&M(0,0));

See Also

quad_motion