fix three warning about mog, mog2 and KNearestNeighbour.