Also, try `img.getNumpyCv2()` here. `img.getNumpy()` gives column major RGB numpy array whereas `img.getNumpyCv2()` gives row major BGR numpy array which is the default numpy array that cv2 uses. You could check
  
    self.mDiffImg = Image(self.mBSMOG.apply(img.getNumpyCv2(), None, self.learningRate), cv2image=True) 

and see if there's some difference in both. Ideally your numpy array should be row major BGR array.