Commit d5486fb55f3ce0b91bd0a4b5436b77ea2f856970
1 parent
4f2f80e2
Using printStatus() for deduplication progress
Showing
2 changed files
with
5 additions
and
7 deletions
openbr/core/core.cpp
| ... | ... | @@ -272,22 +272,20 @@ struct AlgorithmCore |
| 272 | 272 | for (int j=0; j<i; j++) { |
| 273 | 273 | float score = distance->compare(t[i], t[j]); |
| 274 | 274 | if (score >= threshold) { |
| 275 | - qDebug() << t[i].file.baseName() << t[j].file.baseName() << score << i; | |
| 276 | 275 | duplicates.append(i); |
| 276 | + break; | |
| 277 | 277 | } |
| 278 | 278 | } |
| 279 | + Globals->currentStep++; | |
| 280 | + Globals->printStatus(); | |
| 279 | 281 | } |
| 280 | 282 | |
| 281 | 283 | std::sort(duplicates.begin(),duplicates.end(),std::greater<float>()); |
| 282 | 284 | |
| 283 | 285 | qDebug("\n%d duplicates removed.", duplicates.size()); |
| 284 | 286 | |
| 285 | - qDebug() << duplicates; | |
| 286 | - | |
| 287 | - for (int i=0; i<duplicates.size(); i++) { | |
| 288 | - qDebug() << "Removing" << inputFiles.at(duplicates[i]); | |
| 287 | + for (int i=0; i<duplicates.size(); i++) | |
| 289 | 288 | inputFiles.removeAt(duplicates[i]); |
| 290 | - } | |
| 291 | 289 | |
| 292 | 290 | QScopedPointer<Gallery> o(Gallery::make(outputGallery)); |
| 293 | 291 | ... | ... |
openbr/plugins/misc.cpp
| ... | ... | @@ -537,7 +537,7 @@ class ProgressCounterTransform : public TimeVaryingTransform |
| 537 | 537 | { |
| 538 | 538 | (void) data; |
| 539 | 539 | float p = br_progress(); |
| 540 | - qDebug("%05.2f%% ELAPSED=%s REMAINING=%s COUNT=%g/%g \r", p*100., QtUtils::toTime(Globals->startTime.elapsed()/1000.0f).toStdString().c_str(), QtUtils::toTime(0).toStdString().c_str(), Globals->currentStep, Globals->totalSteps); | |
| 540 | + qDebug("%05.2f%% ELAPSED=%s REMAINING=%s COUNT=%g/%g \r", p*100, QtUtils::toTime(Globals->startTime.elapsed()/1000.0f).toStdString().c_str(), QtUtils::toTime(0).toStdString().c_str(), Globals->currentStep, Globals->totalSteps); | |
| 541 | 541 | } |
| 542 | 542 | |
| 543 | 543 | void init() | ... | ... |