parallel execution of opencv kmeans

asked 2016-02-28 07:27:53 -0500

mcExchange gravatar image

I need to run 3000 instances of kmeans and therefore would like to parllelize the code. However as soon as I'm starting to call kmeans from within a boost::thread group the results of kmeans look bad and are not random anymore. I guess inside a boost::threadGroup the random number generator just doesn't work anymore. Does anyone have a good suggestion how to solve this issue? Maybe there is even a better way to parralelize the execution of kmeans? Any help would be appreciated :)

edit retag flag offensive close merge delete

Comments

indeed, kmeans is using the static cv::theRNG() internally ;(

berak gravatar imageberak ( 2016-02-28 07:32:35 -0500 )edit