move paint object to MinBoundingBox and ObjectContour classes