Commit f8ea166ae2db7196bdc17ae4f5491d1d94ba32a8

Authored by Scott Klum
1 parent 9a6fb37c

removed metadata output loop, using flat() instead

Showing 1 changed file with 3 additions and 9 deletions
sdk/plugins/output.cpp
@@ -156,7 +156,7 @@ BR_REGISTER(Output, mtxOutput) @@ -156,7 +156,7 @@ BR_REGISTER(Output, mtxOutput)
156 /*! 156 /*!
157 * \ingroup outputs 157 * \ingroup outputs
158 * \brief Rank retrieval output. 158 * \brief Rank retrieval output.
159 - * \author Josh Klontz \cite jklontz 159 + * \author Josh Klontz \cite jklontz Scott Klum \cite sklum
160 */ 160 */
161 class rrOutput : public MatrixOutput 161 class rrOutput : public MatrixOutput
162 { 162 {
@@ -182,14 +182,8 @@ class rrOutput : public MatrixOutput @@ -182,14 +182,8 @@ class rrOutput : public MatrixOutput
182 foreach (const Pair &pair, Common::Sort(OpenCVUtils::matrixToVector(data.row(i)), !invert).mid(0, limit)) { 182 foreach (const Pair &pair, Common::Sort(OpenCVUtils::matrixToVector(data.row(i)), !invert).mid(0, limit)) {
183 if (pair.first < threshold) break; 183 if (pair.first < threshold) break;
184 QString output; 184 QString output;
185 - output.append((index ? QString::number(pair.second) : targetFiles[pair.second].name) +  
186 - (score ? "=" + QString::number(pair.first) : ""));  
187 - if (metadata) {  
188 - foreach (const QString &key, targetFiles[pair.second].localKeys()) {  
189 - const QString value = targetFiles[pair.second].getString(key, "");  
190 - output.append("," + key + "=" + value);  
191 - }  
192 - } 185 + if (metadata) output.append(targetFiles[pair.second].flat());
  186 + else output.append((index ? QString::number(pair.second) : targetFiles[pair.second].name) + (score ? "=" + QString::number(pair.first) : ""));
193 files.append(output); 187 files.append(output);
194 } 188 }
195 lines.append(files.join(flat ? "\n" : ",")); 189 lines.append(files.join(flat ? "\n" : ","));