'i    - the source image.
at_x - the sample x pixel position on the image.
at_y - the sample y pixel position on the image.
dx   - the x component of the optical flow vector.
dy   - the y component of the optical flow vector.
wndw - the size of the sample window (we assume it is square).'

def __init__(self, i, at_x, at_y, dx, dy, wndw):

    self.dx = dx
    self.dy = dy
    self.window = wndw
    sz = (wndw / 2)
    points = [((at_x + sz), (at_y + sz)), ((at_x - sz), (at_y + sz)), ((at_x + sz), (at_y + sz)), ((at_x + sz), (at_y - sz))]
    super(Motion, self).__init__(i, at_x, at_y, points)
