Quantcast
Channel: OpenCV Q&A Forum - Latest question feed
Viewing all articles
Browse latest Browse all 19555

Do CvNormalBayesClassifier::train() and CvNormalBayesClassifier::predict() dynamically allocate heap memory internally ?

$
0
0
Hi all, I'm wondering if any folks with knowledge of OpenCV's internals can offer some advice. I'm looking for a library which offers a few different classifier types like Naive Bayes, SVM, Neural Nets etc. I need to be able to call the classifiers preditct/classify methods from a high priority and real-time audio callback thread. This means I cannot use methods which dynamically allocate heap memory internally or block/wait. So no locking or waiting on mutexes etc. Essentially I need things wait free. I looked into using the mlpack machine learning library but it dynamically allocates / requests heap space from the OS all over the place as does libarmadillo which it uses internally for matrix operations. Basically I need something which allocates all memory for containers and matrices only inside object constructors and is wait free. So no std::vector push backs or Mat(10, 10) type calls inside predict() - preferably not inside train() either. Otherwise it looks like I'll be climbing through trying to implement a couple of real-time audio friendly classifiers myself......daunting. Hoping OpenCV might be the answer. Josh

Viewing all articles
Browse latest Browse all 19555

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>