0

I'm developing a program with OpenCV in C++. The program it's working fine. The line of code that I've put below normally needs some miliseconds to execute but sometimes the same line needs 5, 10 or even 50 seconds.

clustEM.trainE(resP.colRange(0, 2), clusters.means, clusters.covs, clusters.weights, logLikeli, labels);

Do you have any idea what could be the problem?? The inputs are normally the same size.

TylerH
  • 20,799
  • 66
  • 75
  • 101
Ricardo
  • 300
  • 1
  • 3
  • 12
  • time for em goes exponentioal with the sample-col-size. – berak Dec 17 '14 at 13:20
  • Thank for your reply. I know it and how I say in the first post the size isn't the problem because with 5000 elements sometimes the time is more than the time with 9000 elements.... Any other idea?? – Ricardo Dec 17 '14 at 13:26
  • Can you provide the arg values for short & long time ? – Thomas Ayoub Dec 17 '14 at 13:28
  • Sure. Link: https://www.dropbox.com/s/go45sjzj9tm5okh/times.txt?dl=0 The first column is the size and the second the time (ms). The problem is here: 5282 106.609 4897 8342.179 <-- 8seconds!! 5128 22413.789 <-- 22seconds!! 5258 106.547 – Ricardo Dec 17 '14 at 13:38
  • How different are the samples in those 2 cases? It could be a problem of converging? – sop Dec 17 '14 at 15:03
  • The samples are very similar about data and size... I don't understand you... converging? Someone have any idea about my problem? THANKS – Ricardo Dec 18 '14 at 09:13
  • Someone could show me the way to find the error? THANKS!! – Ricardo Dec 19 '14 at 09:04

0 Answers0