Image Processing using C++ vector and provide the API to opencv