Updated with opencv 2.4.