'Add a single image to the segmentation algorithm'

def addImage(self, img):

    if (img is None):
        return
    self.mColorImg = img
    if (self.mModelImg == None):
        self.mModelImg = Image(cv.CreateImage((img.width, img.height), cv.IPL_DEPTH_32F, 3))
        self.mDiffImg = Image(cv.CreateImage((img.width, img.height), cv.IPL_DEPTH_32F, 3))
    else:
        cv.AbsDiff(self.mModelImg.getBitmap(), img.getFPMatrix(), self.mDiffImg.getBitmap())
        cv.RunningAvg(img.getFPMatrix(), self.mModelImg.getBitmap(), self.mAlpha)
        self.mReady = True
    return
