// Save the current color into the 'previous' buffer
}
else
{
// if this pixel isnt in our area of interest, just show current video frame colour
pixels[index] = currColor;
}
// keep the current pixel colour for comparison next time
previousFrame[index] = currColor;
}
}
int totalPossibleMovement = w*h*255*3; // width * height (of area of interest) * 255 (is the max difference per colour) * 3 (number of colour channels eg:rgb)