call opencv function from c++ dll
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
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.