How to write Pyhton wrapper
I have no idea to create a python wrapper file for my source code, Any one of the expert can provide me a solution
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <iostream>
using namespace cv;
using namespace std;
int my(Mat image)
{
cv::Mat out;
int z1=10;
if(! image.data ) // Check for invalid input
{
cout << "Could not open or find the image" << std::endl ;
}
cvtColor(image, out,COLOR_BGR2GRAY);
imshow( "Display window", out); // Show our image inside it.
waitKey(0); // Wait for a keystroke in the window
return z1;
}
Why do you want to wrap this? The same functionality is available in the python commands ... I suggest you start by looking into the official python tutorials.
Thanks, I am planning to have a common C++ development and would like to build a wrappers for other languages like Python, Java(Desktop/android), C#... Do you know how OpenCV automates the Wrapper Generation?
Nope, maybe @berak will have a clue on how they do so, or what they are using for it.