- }
- std::cout << i << " / " << frames << " processed\n";
- if (i % 25 == 0) {
- end1 = std::chrono::system_clock::now();
- int seconds = 0, minutes = 0, hours = 0;
- seconds = std::chrono::duration_cast<std::chrono::seconds>(end1-start1).count();
- seconds = (float)seconds * (float)( (float)(frames - i) / (float)i );
- hours = seconds / 3600;
- seconds -= hours * 3600;
- minutes = seconds / 60;
- seconds %= 60;
- std::cout << "foretold time: " << hours << " hour(s) " << minutes << " minute(s) " << seconds << "second(s)\n";
- }
- }
- */
-
- for (int i = 1; i < frames; i++) {
- #pragma omp parallel
- {
- #pragma omp for schedule(dynamic)
- for (int j = 0; j < bone; j++) {
- rvec *etalon, *traj;
- snew(etalon, index.size());
- for (int k = 0; k < index.size(); k++) {
- copy_rvec(trajectory[etalon_frame][k].as_vec(), etalon[k]);
- }
- snew(traj, index.size());
- for (int k = 0; k < index.size(); k++) {
- copy_rvec(trajectory[i][k].as_vec(), traj[k]);
- }
- reset_x(index.size(), NULL, index.size(), NULL, etalon, w_rls[j]);
- reset_x(index.size(), NULL, index.size(), NULL, traj, w_rls[j]);
- do_fit(index.size(), w_rls[j], etalon, traj);
- update_graph(graph[j], traj, epsi);
- sfree(etalon);
- sfree(traj);