Ask Your Question

Call classifier from multiple threads

asked 2014-01-13 15:04:33 -0500

MRDaniel gravatar image


If i have a thread pool and the object that manages it has a Neural Network, can it be called from multiple threads? For instance, a Kalman filter would fail as it's internal state is updated, so threads wouldn't work with this, but if we had an array of samples for a large classifier we could run each sample in it's own thread. Is this possible within OpenCV? Threading is core to Opencv, so i am curious as to how this is handled.

Are there C++ const functions, immutable, mutex options?


Kind regards,


edit retag flag offensive close merge delete



Bump! Bump!

MRDaniel gravatar imageMRDaniel ( 2014-01-15 15:04:05 -0500 )edit

I don't think the question is specific enough. Some functions are thread-safe, others are not.

xaffeine gravatar imagexaffeine ( 2014-01-27 13:26:49 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2014-01-26 20:52:54 -0500

MRDaniel gravatar image

All of the OpenCV functions are thread safe.

edit flag offensive delete link more


Many OpenCV functions are NOT thread-safe.

xaffeine gravatar imagexaffeine ( 2014-01-27 13:27:44 -0500 )edit
Login/Signup to Answer

Question Tools


Asked: 2014-01-13 15:04:33 -0500

Seen: 166 times

Last updated: Jan 26 '14