Thread Safe
Hello.
OpenCV is Thread Safe. How is this achieved deep down in the code? What patterns or techniques are used?
Regards,
Daniel
Hello.
OpenCV is Thread Safe. How is this achieved deep down in the code? What patterns or techniques are used?
Regards,
Daniel
I've had a few thread glitches while using OpenCV.
The library itself is thread safe in that you can have multiple calls into the library at the same time, however the data is not always thread safe.
This means that if you have to pass a mat image between threads you have to use a mutex and call .CopyTo() to force a copy instead of a reference.
Note: Std::Vector is also not thread safe under all conditions as well.
Like he said, since OpenCV uses extensive internal use of the vector class, achieving thread safety is not always that easy ...
Asked: 2014-04-27 22:40:30 -0600
Seen: 10,842 times
Last updated: Apr 28 '14
How to build OpenCV with TBB support?
How to reduce false positives for face detection
OpenCV DescriptorMatcher matches
Record/Store constant refreshing coordinates points into notepad
Conversion between IplImage and MxArray
How can solvePnPRansac be used with double values?
Combine SIFT with other method for object recognition