Commit 9a9a279b3400c553f860d1941fe45f39bf0dbaab

Authored by Scott Klum
1 parent e8478d0b

rr output logic fix

Showing 1 changed file with 4 additions and 3 deletions
sdk/plugins/output.cpp
... ... @@ -168,7 +168,6 @@ class rrOutput : public MatrixOutput
168 168 const int limit = file.getInt("limit", 20);
169 169 const bool flat = file.getBool("flat");
170 170 const bool index = file.getBool("index");
171   - const bool score = file.getBool("score");
172 171 const bool invert = file.getBool("invert");
173 172 const bool metadata = file.getBool("metadata");
174 173 const float threshold = file.getFloat("threshold", -std::numeric_limits<float>::max());
... ... @@ -182,8 +181,10 @@ class rrOutput : public MatrixOutput
182 181 foreach (const Pair &pair, Common::Sort(OpenCVUtils::matrixToVector(data.row(i)), !invert).mid(0, limit)) {
183 182 if (pair.first < threshold) break;
184 183 QString output;
185   - if (score) targetFiles[pair.second].set("Score", QString::number(pair.first));
186   - if (metadata) output.append(targetFiles[pair.second].flat());
  184 + if (metadata) {
  185 + targetFiles[pair.second].set("Score", QString::number(pair.first));
  186 + output.append(targetFiles[pair.second].flat());
  187 + }
187 188 else output.append(index ? QString::number(pair.second) : targetFiles[pair.second].name);
188 189 files.append(output);
189 190 }
... ...