In the following case:
double algorithm(IplImage* imgin) {
I use the following method of calling a function:
cv::Mat image = cv::imread("image.bmp"); double erg = algorithm(&image.operator IplImage());
I did some tests and saw how the image object will manage memory. The IplImage() operator IplImage() build the header for IplImage . Maybe this can be useful?
source share