Sync with OpenCV 2.4