updated for opencv 2.4.9