I call the following OpenCV method (Emgu CV wrapper), which detects faces in multiple threads at the same time:
IntPtr objects = CvInvoke.cvHaarDetectObjects( img.Ptr, haarObj.Ptr, stor.Ptr, scaleFactor, minNeighbors, flag, minSize);
I get an AccessViolationException. The standard .NET lock is not acceptable here, since this method takes up almost the entire lifetime of the thread. Any ideas how to make this method work at the same time?
source share