C API will be declared as deprecated in OpenCV 3.0. I suggest to remove this function