call opencv function from c++ dll

asked 2014-03-06 10:51:12 -0600

I created a c++ dll, that uses Opencv functions, in a c# program. When I try to call a function from the dll containing:

std::vector<cv::Mat> bgChannels(3);
cv::split(bg, bgChannels);

or

cv::Mat mask;
imwrite("masks img.jpg",mask);

it crashes without displaying any error. Any help please? thanks in advance

edit retag flag offensive close merge delete

Comments

I have found that making a test program that compiles in your custom DLL by grabbing the pointers to the exported functions a useful way to debug things.

GrumbleLion gravatar imageGrumbleLion ( 2014-03-08 18:53:13 -0600 )edit