Commit 5614859928c1352c2f4116efcefc398b45416608

Authored by Josh Klontz
1 parent 03f84430

Fatal messages need no longer include file/class/function context information

sdk/core/bee.cpp
@@ -42,8 +42,8 @@ FileList BEE::readSigset(const QString &sigset, bool ignoreMetadata) @@ -42,8 +42,8 @@ FileList BEE::readSigset(const QString &sigset, bool ignoreMetadata)
42 QDomDocument doc(sigset); 42 QDomDocument doc(sigset);
43 QFile file(sigset); 43 QFile file(sigset);
44 bool success; 44 bool success;
45 - success = file.open(QIODevice::ReadOnly); if (!success) qFatal("BEE::readSigset unable to open %s for reading.", qPrintable(sigset));  
46 - success = doc.setContent(&file); if (!success) qFatal("BEE::readSigset unable to parse %s.", qPrintable(sigset)); 45 + success = file.open(QIODevice::ReadOnly); if (!success) qFatal("Unable to open %s for reading.", qPrintable(sigset));
  46 + success = doc.setContent(&file); if (!success) qFatal("Unable to parse %s.", qPrintable(sigset));
47 file.close(); 47 file.close();
48 48
49 QDomElement docElem = doc.documentElement(); 49 QDomElement docElem = doc.documentElement();
@@ -75,7 +75,7 @@ FileList BEE::readSigset(const QString &sigset, bool ignoreMetadata) @@ -75,7 +75,7 @@ FileList BEE::readSigset(const QString &sigset, bool ignoreMetadata)
75 } 75 }
76 } 76 }
77 77
78 - if (file.isNull()) qFatal("BEE::readSigset empty file-name in %s.", qPrintable(sigset)); 78 + if (file.isNull()) qFatal("Empty file-name in %s.", qPrintable(sigset));
79 fileList.append(file); 79 fileList.append(file);
80 80
81 fileNode = fileNode.nextSibling(); 81 fileNode = fileNode.nextSibling();
@@ -115,7 +115,7 @@ Mat readMatrix(const br::File &matrix) @@ -115,7 +115,7 @@ Mat readMatrix(const br::File &matrix)
115 if (matrix == "Matrix") { 115 if (matrix == "Matrix") {
116 const int size = matrix.getInt("Size"); 116 const int size = matrix.getInt("Size");
117 const int step = matrix.getInt("Step", 1); 117 const int step = matrix.getInt("Step", 1);
118 - if (size % step != 0) qFatal("bee.cpp readMatrix step does not divide size evenly."); 118 + if (size % step != 0) qFatal("Step does not divide size evenly.");
119 119
120 if (sizeof(T) == sizeof(BEE::Mask_t)) { 120 if (sizeof(T) == sizeof(BEE::Mask_t)) {
121 const bool selfSimilar = matrix.getBool("SelfSimilar"); 121 const bool selfSimilar = matrix.getBool("SelfSimilar");
@@ -140,12 +140,12 @@ Mat readMatrix(const br::File &matrix) @@ -140,12 +140,12 @@ Mat readMatrix(const br::File &matrix)
140 140
141 QFile file(matrix); 141 QFile file(matrix);
142 bool success = file.open(QFile::ReadOnly); 142 bool success = file.open(QFile::ReadOnly);
143 - if (!success) qFatal("bee.cpp readMatrix unable to open %s for reading.", qPrintable((QString)matrix)); 143 + if (!success) qFatal("Unable to open %s for reading.", qPrintable((QString)matrix));
144 144
145 // Check format 145 // Check format
146 QByteArray format = file.readLine(); 146 QByteArray format = file.readLine();
147 bool isDistance = (format[0] == 'D'); 147 bool isDistance = (format[0] == 'D');
148 - if (format[1] != '2') qFatal("bee.cpp readMatrix invalid matrix header."); 148 + if (format[1] != '2') qFatal("Invalid matrix header.");
149 149
150 // Skip sigset lines 150 // Skip sigset lines
151 file.readLine(); 151 file.readLine();
@@ -160,7 +160,7 @@ Mat readMatrix(const br::File &matrix) @@ -160,7 +160,7 @@ Mat readMatrix(const br::File &matrix)
160 qint64 bytesExpected = (qint64)rows*(qint64)cols*(qint64)sizeof(T); 160 qint64 bytesExpected = (qint64)rows*(qint64)cols*(qint64)sizeof(T);
161 Mat m(rows, cols, OpenCVType<T,1>::make()); 161 Mat m(rows, cols, OpenCVType<T,1>::make());
162 if (file.read((char*)m.data, bytesExpected) != bytesExpected) 162 if (file.read((char*)m.data, bytesExpected) != bytesExpected)
163 - qFatal("bee.cpp readMatrix invalid matrix size."); 163 + qFatal("Invalid matrix size.");
164 file.close(); 164 file.close();
165 165
166 Mat result; 166 Mat result;
@@ -182,17 +182,17 @@ Mat BEE::readMask(const br::File &amp;mask) @@ -182,17 +182,17 @@ Mat BEE::readMask(const br::File &amp;mask)
182 template <typename T> 182 template <typename T>
183 void writeMatrix(const Mat &m, const QString &matrix, const QString &targetSigset, const QString &querySigset) 183 void writeMatrix(const Mat &m, const QString &matrix, const QString &targetSigset, const QString &querySigset)
184 { 184 {
185 - if (m.type() != OpenCVType<T,1>::make()) qFatal("bee.cpp writeMatrix invalid matrix type."); 185 + if (m.type() != OpenCVType<T,1>::make()) qFatal("Invalid matrix type.");
186 186
187 int elemSize = sizeof(T); 187 int elemSize = sizeof(T);
188 QString matrixType; 188 QString matrixType;
189 if (elemSize == 1) matrixType = "B"; 189 if (elemSize == 1) matrixType = "B";
190 else if (elemSize == 4) matrixType = "F"; 190 else if (elemSize == 4) matrixType = "F";
191 - else qFatal("bee.cpp writeMatrix invalid element size.\n"); 191 + else qFatal("Invalid element size.");
192 192
193 char buff[4]; 193 char buff[4];
194 QFile file(matrix); 194 QFile file(matrix);
195 - bool success = file.open(QFile::WriteOnly); if (!success) qFatal("bee.cpp writeMatrix unable to open %s for writing.", qPrintable(matrix)); 195 + bool success = file.open(QFile::WriteOnly); if (!success) qFatal("Unable to open %s for writing.", qPrintable(matrix));
196 file.write("S2\n"); 196 file.write("S2\n");
197 file.write(qPrintable(QFileInfo(targetSigset).fileName())); 197 file.write(qPrintable(QFileInfo(targetSigset).fileName()));
198 file.write("\n"); 198 file.write("\n");
@@ -265,12 +265,12 @@ void BEE::combineMasks(const QStringList &amp;inputMasks, const QString &amp;outputMask, @@ -265,12 +265,12 @@ void BEE::combineMasks(const QStringList &amp;inputMasks, const QString &amp;outputMask,
265 bool AND = true; 265 bool AND = true;
266 if (method == "And") AND = true; 266 if (method == "And") AND = true;
267 else if (method == "Or") AND = false; 267 else if (method == "Or") AND = false;
268 - else qFatal("combineMasks invalid method"); 268 + else qFatal("Invalid method.");
269 269
270 QList<Mat> masks; 270 QList<Mat> masks;
271 foreach (const QString &inputMask, inputMasks) 271 foreach (const QString &inputMask, inputMasks)
272 masks.append(readMask(inputMask)); 272 masks.append(readMask(inputMask));
273 - if (masks.size() < 2) qFatal("BEE::mergeMasks expects at least two masks."); 273 + if (masks.size() < 2) qFatal("Expected at least two masks.");
274 274
275 const int rows = masks.first().rows; 275 const int rows = masks.first().rows;
276 const int columns = masks.first().cols; 276 const int columns = masks.first().cols;
@@ -294,7 +294,7 @@ void BEE::combineMasks(const QStringList &amp;inputMasks, const QString &amp;outputMask, @@ -294,7 +294,7 @@ void BEE::combineMasks(const QStringList &amp;inputMasks, const QString &amp;outputMask,
294 break; 294 break;
295 } 295 }
296 } 296 }
297 - if ((genuineCount != 0) && (imposterCount != 0)) qFatal("BEE::combinedMasks comparison is both a genuine and an imposter."); 297 + if ((genuineCount != 0) && (imposterCount != 0)) qFatal("Comparison is both a genuine and an imposter.");
298 298
299 Mask_t val; 299 Mask_t val;
300 if (genuineCount > 0) val = Match; 300 if (genuineCount > 0) val = Match;
sdk/core/classify.cpp
@@ -39,12 +39,12 @@ void br::EvalClassification(const QString &amp;predictedInput, const QString &amp;truthI @@ -39,12 +39,12 @@ void br::EvalClassification(const QString &amp;predictedInput, const QString &amp;truthI
39 39
40 TemplateList predicted(TemplateList::fromInput(predictedInput)); 40 TemplateList predicted(TemplateList::fromInput(predictedInput));
41 TemplateList truth(TemplateList::fromInput(truthInput)); 41 TemplateList truth(TemplateList::fromInput(truthInput));
42 - if (predicted.size() != truth.size()) qFatal("br::EvalClassification input size mismatch."); 42 + if (predicted.size() != truth.size()) qFatal("Input size mismatch.");
43 43
44 QHash<int, Counter> counters; 44 QHash<int, Counter> counters;
45 for (int i=0; i<predicted.size(); i++) { 45 for (int i=0; i<predicted.size(); i++) {
46 if (predicted[i].file.name != truth[i].file.name) 46 if (predicted[i].file.name != truth[i].file.name)
47 - qFatal("br::EvalClassification input order mismatch."); 47 + qFatal("Input order mismatch.");
48 48
49 const int trueLabel = truth[i].file.label(); 49 const int trueLabel = truth[i].file.label();
50 const int predictedLabel = predicted[i].file.label(); 50 const int predictedLabel = predicted[i].file.label();
@@ -85,13 +85,13 @@ void br::EvalRegression(const QString &amp;predictedInput, const QString &amp;truthInput @@ -85,13 +85,13 @@ void br::EvalRegression(const QString &amp;predictedInput, const QString &amp;truthInput
85 85
86 const TemplateList predicted(TemplateList::fromInput(predictedInput)); 86 const TemplateList predicted(TemplateList::fromInput(predictedInput));
87 const TemplateList truth(TemplateList::fromInput(truthInput)); 87 const TemplateList truth(TemplateList::fromInput(truthInput));
88 - if (predicted.size() != truth.size()) qFatal("br::EvalRegression input size mismatch."); 88 + if (predicted.size() != truth.size()) qFatal("Input size mismatch.");
89 89
90 float rmsError = 0; 90 float rmsError = 0;
91 QStringList truthValues, predictedValues; 91 QStringList truthValues, predictedValues;
92 for (int i=0; i<predicted.size(); i++) { 92 for (int i=0; i<predicted.size(); i++) {
93 if (predicted[i].file.name != truth[i].file.name) 93 if (predicted[i].file.name != truth[i].file.name)
94 - qFatal("br::EvalRegression input order mismatch."); 94 + qFatal("Input order mismatch.");
95 rmsError += pow(predicted[i].file.label()-truth[i].file.label(), 2.f); 95 rmsError += pow(predicted[i].file.label()-truth[i].file.label(), 2.f);
96 truthValues.append(QString::number(truth[i].file.label())); 96 truthValues.append(QString::number(truth[i].file.label()));
97 predictedValues.append(QString::number(predicted[i].file.label())); 97 predictedValues.append(QString::number(predicted[i].file.label()));
sdk/core/cluster.cpp
@@ -90,7 +90,7 @@ Neighborhood getNeighborhood(const QStringList &amp;simmats) @@ -90,7 +90,7 @@ Neighborhood getNeighborhood(const QStringList &amp;simmats)
90 float globalMin = std::numeric_limits<float>::max(); 90 float globalMin = std::numeric_limits<float>::max();
91 int numGalleries = (int)sqrt((float)simmats.size()); 91 int numGalleries = (int)sqrt((float)simmats.size());
92 if (numGalleries*numGalleries != simmats.size()) 92 if (numGalleries*numGalleries != simmats.size())
93 - qFatal("cluser.cpp readGalleries incorrect number of similarity matrices."); 93 + qFatal("Incorrect number of similarity matrices.");
94 94
95 // Process each simmat 95 // Process each simmat
96 for (int i=0; i<numGalleries; i++) { 96 for (int i=0; i<numGalleries; i++) {
@@ -104,7 +104,7 @@ Neighborhood getNeighborhood(const QStringList &amp;simmats) @@ -104,7 +104,7 @@ Neighborhood getNeighborhood(const QStringList &amp;simmats)
104 currentRows = m.rows; 104 currentRows = m.rows;
105 allNeighbors.resize(currentRows); 105 allNeighbors.resize(currentRows);
106 } 106 }
107 - if (currentRows != m.rows) qFatal("cluster.cpp::getNeighborhood row count mismatch."); 107 + if (currentRows != m.rows) qFatal("Row count mismatch.");
108 108
109 // Get data row by row 109 // Get data row by row
110 for (int k=0; k<m.rows; k++) { 110 for (int k=0; k<m.rows; k++) {
@@ -322,7 +322,7 @@ br::Clusters br::ReadClusters(const QString &amp;csv) @@ -322,7 +322,7 @@ br::Clusters br::ReadClusters(const QString &amp;csv)
322 Clusters clusters; 322 Clusters clusters;
323 QFile file(csv); 323 QFile file(csv);
324 bool success = file.open(QFile::ReadOnly); 324 bool success = file.open(QFile::ReadOnly);
325 - if (!success) qFatal("br::ReadClusters failed to open %s for reading.", qPrintable(csv)); 325 + if (!success) qFatal("Failed to open %s for reading.", qPrintable(csv));
326 QStringList lines = QString(file.readAll()).split("\n"); 326 QStringList lines = QString(file.readAll()).split("\n");
327 file.close(); 327 file.close();
328 328
@@ -332,7 +332,7 @@ br::Clusters br::ReadClusters(const QString &amp;csv) @@ -332,7 +332,7 @@ br::Clusters br::ReadClusters(const QString &amp;csv)
332 foreach (const QString &id, ids) { 332 foreach (const QString &id, ids) {
333 bool ok; 333 bool ok;
334 cluster.append(id.toInt(&ok)); 334 cluster.append(id.toInt(&ok));
335 - if (!ok) qFatal("br::ReadClusters non-interger id."); 335 + if (!ok) qFatal("Non-interger id.");
336 } 336 }
337 clusters.append(cluster); 337 clusters.append(cluster);
338 } 338 }
@@ -343,7 +343,7 @@ void br::WriteClusters(const Clusters &amp;clusters, const QString &amp;csv) @@ -343,7 +343,7 @@ void br::WriteClusters(const Clusters &amp;clusters, const QString &amp;csv)
343 { 343 {
344 QFile file(csv); 344 QFile file(csv);
345 bool success = file.open(QFile::WriteOnly); 345 bool success = file.open(QFile::WriteOnly);
346 - if (!success) qFatal("br::WriteClusters failed to open %s for writing.", qPrintable(csv)); 346 + if (!success) qFatal("Failed to open %s for writing.", qPrintable(csv));
347 347
348 foreach (Cluster cluster, clusters) { 348 foreach (Cluster cluster, clusters) {
349 if (cluster.empty()) continue; 349 if (cluster.empty()) continue;
sdk/core/common.cpp
@@ -33,7 +33,7 @@ QList&lt;int&gt; Common::RandSample(int n, int max, int min, bool unique) @@ -33,7 +33,7 @@ QList&lt;int&gt; Common::RandSample(int n, int max, int min, bool unique)
33 33
34 QList<int> samples; samples.reserve(n); 34 QList<int> samples; samples.reserve(n);
35 int range = max-min; 35 int range = max-min;
36 - if (range <= 0) qFatal("Common::RandSample non-positive range."); 36 + if (range <= 0) qFatal("Non-positive range.");
37 if (unique && (n >= range)) { 37 if (unique && (n >= range)) {
38 for (int i=min; i<max; i++) 38 for (int i=min; i<max; i++)
39 samples.append(i); 39 samples.append(i);
sdk/core/fuse.cpp
@@ -60,7 +60,7 @@ static void normalizeMatrix(Mat &amp;matrix, const Mat &amp;mask, const QString &amp;method) @@ -60,7 +60,7 @@ static void normalizeMatrix(Mat &amp;matrix, const Mat &amp;mask, const QString &amp;method)
60 } 60 }
61 } 61 }
62 } else if (method == "ZScore") { 62 } else if (method == "ZScore") {
63 - if (stddev == 0) qFatal("fuse.cpp normalizeMatrix stddev is 0."); 63 + if (stddev == 0) qFatal("Stddev is 0.");
64 for (int i=0; i<matrix.rows; i++) { 64 for (int i=0; i<matrix.rows; i++) {
65 for (int j=0; j<matrix.cols; j++) { 65 for (int j=0; j<matrix.cols; j++) {
66 if (mask.at<BEE::Mask_t>(i,j) == BEE::DontCare) continue; 66 if (mask.at<BEE::Mask_t>(i,j) == BEE::DontCare) continue;
@@ -71,7 +71,7 @@ static void normalizeMatrix(Mat &amp;matrix, const Mat &amp;mask, const QString &amp;method) @@ -71,7 +71,7 @@ static void normalizeMatrix(Mat &amp;matrix, const Mat &amp;mask, const QString &amp;method)
71 } 71 }
72 } 72 }
73 } else { 73 } else {
74 - qFatal("fuse.cpp normalizeMatrix invalid normalization method %s.", qPrintable(method)); 74 + qFatal("Invalid normalization method %s.", qPrintable(method));
75 } 75 }
76 } 76 }
77 77
@@ -81,8 +81,8 @@ void br::Fuse(const QStringList &amp;inputSimmats, const QString &amp;mask, const QStrin @@ -81,8 +81,8 @@ void br::Fuse(const QStringList &amp;inputSimmats, const QString &amp;mask, const QStrin
81 QList<Mat> matrices; 81 QList<Mat> matrices;
82 foreach (const QString &simmat, inputSimmats) 82 foreach (const QString &simmat, inputSimmats)
83 matrices.append(BEE::readSimmat(simmat)); 83 matrices.append(BEE::readSimmat(simmat));
84 - if ((matrices.size() < 2) && (fusion != "None")) qFatal("br::Fuse expected at least two similarity matrices.");  
85 - if ((matrices.size() > 1) && (fusion == "None")) qFatal("mm:Fuse expected exactly one similarity matrix."); 84 + if ((matrices.size() < 2) && (fusion != "None")) qFatal("Expected at least two similarity matrices.");
  85 + if ((matrices.size() > 1) && (fusion == "None")) qFatal("Expected exactly one similarity matrix.");
86 Mat matrix_mask = BEE::readMask(mask); 86 Mat matrix_mask = BEE::readMask(mask);
87 87
88 for (int i=0; i<matrices.size(); i++) 88 for (int i=0; i<matrices.size(); i++)
@@ -107,27 +107,27 @@ void br::Fuse(const QStringList &amp;inputSimmats, const QString &amp;mask, const QStrin @@ -107,27 +107,27 @@ void br::Fuse(const QStringList &amp;inputSimmats, const QString &amp;mask, const QStrin
107 bool ok; 107 bool ok;
108 for (int k=0; k<matrices.size(); k++) { 108 for (int k=0; k<matrices.size(); k++) {
109 float weight = words[k].toFloat(&ok); 109 float weight = words[k].toFloat(&ok);
110 - if (!ok) qFatal("br::Fuse non-numerical weight %s.", qPrintable(words[k])); 110 + if (!ok) qFatal("Non-numerical weight %s.", qPrintable(words[k]));
111 weights.append(weight); 111 weights.append(weight);
112 } 112 }
113 } else { 113 } else {
114 - qFatal("br::Fuse number of weights does not match number of similarity matrices."); 114 + qFatal("Number of weights does not match number of similarity matrices.");
115 } 115 }
116 116
117 addWeighted(matrices[0], weights[0], matrices[1], weights[1], 0, fused); 117 addWeighted(matrices[0], weights[0], matrices[1], weights[1], 0, fused);
118 for (int i=2; i<matrices.size(); i++) 118 for (int i=2; i<matrices.size(); i++)
119 addWeighted(fused, 1, matrices[i], weights[i], 0, fused); 119 addWeighted(fused, 1, matrices[i], weights[i], 0, fused);
120 } else if (fusion == "Replace") { 120 } else if (fusion == "Replace") {
121 - if (matrices.size() != 2) qFatal("br::Fuse Replace fusion requires exactly two matrices."); 121 + if (matrices.size() != 2) qFatal("Replace fusion requires exactly two matrices.");
122 fused = matrices.first().clone(); 122 fused = matrices.first().clone();
123 matrices.last().copyTo(fused, matrix_mask != BEE::DontCare); 123 matrices.last().copyTo(fused, matrix_mask != BEE::DontCare);
124 } else if (fusion == "Difference") { 124 } else if (fusion == "Difference") {
125 - if (matrices.size() != 2) qFatal("br::Fuse Difference fusion requires exactly two matrices."); 125 + if (matrices.size() != 2) qFatal("Difference fusion requires exactly two matrices.");
126 subtract(matrices[0], matrices[1], fused); 126 subtract(matrices[0], matrices[1], fused);
127 } else if (fusion == "None") { 127 } else if (fusion == "None") {
128 fused = matrices[0]; 128 fused = matrices[0];
129 } else { 129 } else {
130 - qFatal("br::Fuse invalid fusion method %s.", qPrintable(fusion)); 130 + qFatal("Invalid fusion method %s.", qPrintable(fusion));
131 } 131 }
132 132
133 BEE::writeSimmat(fused, outputSimmat); 133 BEE::writeSimmat(fused, outputSimmat);
sdk/core/opencvutils.cpp
@@ -55,7 +55,7 @@ void OpenCVUtils::saveImage(const Mat &amp;src, const QString &amp;file) @@ -55,7 +55,7 @@ void OpenCVUtils::saveImage(const Mat &amp;src, const QString &amp;file)
55 55
56 Mat draw; 56 Mat draw;
57 cvtUChar(src, draw); 57 cvtUChar(src, draw);
58 - bool success = imwrite(file.toStdString(), draw); if (!success) qFatal("OpenCVUtils::saveImage failed to save %s", qPrintable(file)); 58 + bool success = imwrite(file.toStdString(), draw); if (!success) qFatal("Failed to save %s", qPrintable(file));
59 } 59 }
60 60
61 void OpenCVUtils::showImage(const Mat &src, const QString &window, bool waitKey) 61 void OpenCVUtils::showImage(const Mat &src, const QString &window, bool waitKey)
@@ -112,7 +112,7 @@ Mat OpenCVUtils::toMat(const QList&lt;float&gt; &amp;src, int rows) @@ -112,7 +112,7 @@ Mat OpenCVUtils::toMat(const QList&lt;float&gt; &amp;src, int rows)
112 { 112 {
113 if (rows == -1) rows = src.size(); 113 if (rows == -1) rows = src.size();
114 int columns = src.isEmpty() ? 0 : src.size() / rows; 114 int columns = src.isEmpty() ? 0 : src.size() / rows;
115 - if (rows*columns != src.size()) qFatal("OpenCVUtils::toMat invalid matrix size."); 115 + if (rows*columns != src.size()) qFatal("Invalid matrix size.");
116 Mat dst(rows, columns, CV_32FC1); 116 Mat dst(rows, columns, CV_32FC1);
117 for (int i=0; i<src.size(); i++) 117 for (int i=0; i<src.size(); i++)
118 dst.at<float>(i/columns,i%columns) = src[i]; 118 dst.at<float>(i/columns,i%columns) = src[i];
@@ -131,7 +131,7 @@ Mat OpenCVUtils::toMat(const QList&lt;Mat&gt; &amp;src) @@ -131,7 +131,7 @@ Mat OpenCVUtils::toMat(const QList&lt;Mat&gt; &amp;src)
131 for (int i=0; i<rows; i++) { 131 for (int i=0; i<rows; i++) {
132 const Mat &m = src[i]; 132 const Mat &m = src[i];
133 if ((m.total() != total) || (m.type() != type) || !m.isContinuous()) 133 if ((m.total() != total) || (m.type() != type) || !m.isContinuous())
134 - qFatal("OpenCVUtils::toMat invalid matrix."); 134 + qFatal("Invalid matrix.");
135 memcpy(dst.ptr(i), m.ptr(), total * src.first().elemSize()); 135 memcpy(dst.ptr(i), m.ptr(), total * src.first().elemSize());
136 } 136 }
137 return dst; 137 return dst;
@@ -149,7 +149,7 @@ Mat OpenCVUtils::toMatByRow(const QList&lt;Mat&gt; &amp;src) @@ -149,7 +149,7 @@ Mat OpenCVUtils::toMatByRow(const QList&lt;Mat&gt; &amp;src)
149 int row = 0; 149 int row = 0;
150 foreach (const Mat &m, src) { 150 foreach (const Mat &m, src) {
151 if ((m.cols != cols) || (m.type() != type) || (!m.isContinuous())) 151 if ((m.cols != cols) || (m.type() != type) || (!m.isContinuous()))
152 - qFatal("OpenCVUtils::toMatByRow invalid matrix."); 152 + qFatal("Invalid matrix.");
153 memcpy(dst.ptr(row), m.ptr(), m.rows*m.cols*m.elemSize()); 153 memcpy(dst.ptr(row), m.ptr(), m.rows*m.cols*m.elemSize());
154 row += m.rows; 154 row += m.rows;
155 } 155 }
@@ -167,7 +167,7 @@ QString OpenCVUtils::elemToString(const Mat &amp;m, int r, int c) @@ -167,7 +167,7 @@ QString OpenCVUtils::elemToString(const Mat &amp;m, int r, int c)
167 case CV_32S: return QString::number(m.at<qint32>(r,c)); 167 case CV_32S: return QString::number(m.at<qint32>(r,c));
168 case CV_32F: return QString::number(m.at<float>(r,c)); 168 case CV_32F: return QString::number(m.at<float>(r,c));
169 case CV_64F: return QString::number(m.at<double>(r,c)); 169 case CV_64F: return QString::number(m.at<double>(r,c));
170 - default: qFatal("OpenCVUtils::elemToString unknown matrix depth"); 170 + default: qFatal("Unknown matrix depth");
171 } 171 }
172 return "?"; 172 return "?";
173 } 173 }
@@ -183,7 +183,7 @@ float OpenCVUtils::elemToFloat(const Mat &amp;m, int r, int c) @@ -183,7 +183,7 @@ float OpenCVUtils::elemToFloat(const Mat &amp;m, int r, int c)
183 case CV_32S: return float(m.at<qint32>(r,c)); 183 case CV_32S: return float(m.at<qint32>(r,c));
184 case CV_32F: return float(m.at<float>(r,c)); 184 case CV_32F: return float(m.at<float>(r,c));
185 case CV_64F: return float(m.at<double>(r,c)); 185 case CV_64F: return float(m.at<double>(r,c));
186 - default: qFatal("OpenCVUtils::elemToFloat unknown matrix depth"); 186 + default: qFatal("Unknown matrix depth");
187 } 187 }
188 return 0; 188 return 0;
189 } 189 }
@@ -300,10 +300,9 @@ QDataStream &amp;operator&lt;&lt;(QDataStream &amp;stream, const Mat &amp;m) @@ -300,10 +300,9 @@ QDataStream &amp;operator&lt;&lt;(QDataStream &amp;stream, const Mat &amp;m)
300 int len = rows*cols*m.elemSize(); 300 int len = rows*cols*m.elemSize();
301 stream << len; 301 stream << len;
302 if (len > 0) { 302 if (len > 0) {
303 - if (!m.isContinuous()) qFatal("opencvutils.cpp operator<< Mat can't serialize non-continuous matrices."); 303 + if (!m.isContinuous()) qFatal("Can't serialize non-continuous matrices.");
304 int written = stream.writeRawData((const char*)m.data, len); 304 int written = stream.writeRawData((const char*)m.data, len);
305 -  
306 - if (written != len) qFatal("opencvutils.cpp operator<< Mat serialization failure."); 305 + if (written != len) qFatal("Serialization failure.");
307 } 306 }
308 return stream; 307 return stream;
309 } 308 }
sdk/core/plot.cpp
@@ -309,7 +309,7 @@ struct RPlot @@ -309,7 +309,7 @@ struct RPlot
309 309
310 RPlot(QStringList files, const br::File &destination, bool isEvalFormat = true) 310 RPlot(QStringList files, const br::File &destination, bool isEvalFormat = true)
311 { 311 {
312 - if (files.isEmpty()) qFatal("RPlot::RPlot() empty file list."); 312 + if (files.isEmpty()) qFatal("Empty file list.");
313 qSort(files.begin(), files.end(), sortFiles); 313 qSort(files.begin(), files.end(), sortFiles);
314 314
315 // Parse destination 315 // Parse destination
@@ -320,7 +320,7 @@ struct RPlot @@ -320,7 +320,7 @@ struct RPlot
320 320
321 file.setFileName(basename+".R"); 321 file.setFileName(basename+".R");
322 bool success = file.open(QFile::WriteOnly); 322 bool success = file.open(QFile::WriteOnly);
323 - if (!success) qFatal("RPlot::RPlot() failed to open %s for writing.", qPrintable(file.fileName())); 323 + if (!success) qFatal("Failed to open %s for writing.", qPrintable(file.fileName()));
324 324
325 file.write("# Load libraries\n" 325 file.write("# Load libraries\n"
326 "library(ggplot2)\n" 326 "library(ggplot2)\n"
sdk/core/qtutils.cpp
@@ -44,7 +44,7 @@ QStringList QtUtils::getFiles(QDir dir, bool recursive) @@ -44,7 +44,7 @@ QStringList QtUtils::getFiles(QDir dir, bool recursive)
44 44
45 foreach (const QString &folder, dir.entryList(QDir::Dirs | QDir::NoDotAndDotDot)) { 45 foreach (const QString &folder, dir.entryList(QDir::Dirs | QDir::NoDotAndDotDot)) {
46 QDir subdir(dir); 46 QDir subdir(dir);
47 - bool success = subdir.cd(folder); if (!success) qFatal("QtUtils::getFiles cd failure."); 47 + bool success = subdir.cd(folder); if (!success) qFatal("cd failure.");
48 files.append(getFiles(subdir, true)); 48 files.append(getFiles(subdir, true));
49 } 49 }
50 return files; 50 return files;
@@ -74,7 +74,7 @@ QStringList QtUtils::readLines(const QString &amp;file) @@ -74,7 +74,7 @@ QStringList QtUtils::readLines(const QString &amp;file)
74 void QtUtils::readFile(const QString &file, QStringList &lines) 74 void QtUtils::readFile(const QString &file, QStringList &lines)
75 { 75 {
76 QFile f(file); 76 QFile f(file);
77 - if (!f.open(QFile::ReadOnly)) qFatal("QtUtils::readFile unable to open %s for reading.", qPrintable(file)); 77 + if (!f.open(QFile::ReadOnly)) qFatal("Unable to open %s for reading.", qPrintable(file));
78 lines = QString(f.readAll()).split('\n', QString::SkipEmptyParts); 78 lines = QString(f.readAll()).split('\n', QString::SkipEmptyParts);
79 for (int i=0; i<lines.size(); i++) 79 for (int i=0; i<lines.size(); i++)
80 lines[i] = lines[i].simplified(); 80 lines[i] = lines[i].simplified();
@@ -84,7 +84,7 @@ void QtUtils::readFile(const QString &amp;file, QStringList &amp;lines) @@ -84,7 +84,7 @@ void QtUtils::readFile(const QString &amp;file, QStringList &amp;lines)
84 void QtUtils::readFile(const QString &file, QByteArray &data, bool uncompress) 84 void QtUtils::readFile(const QString &file, QByteArray &data, bool uncompress)
85 { 85 {
86 QFile f(file); 86 QFile f(file);
87 - if (!f.open(QFile::ReadOnly)) qFatal("QtUtils::readFile unable to open %s for reading.", qPrintable(file)); 87 + if (!f.open(QFile::ReadOnly)) qFatal("Unable to open %s for reading.", qPrintable(file));
88 data = f.readAll(); 88 data = f.readAll();
89 if (uncompress) data = qUncompress(data); 89 if (uncompress) data = qUncompress(data);
90 f.close(); 90 f.close();
@@ -112,7 +112,7 @@ void QtUtils::writeFile(const QString &amp;file, const QByteArray &amp;data, int compres @@ -112,7 +112,7 @@ void QtUtils::writeFile(const QString &amp;file, const QByteArray &amp;data, int compres
112 QFile f(file); 112 QFile f(file);
113 touchDir(f); 113 touchDir(f);
114 if (!f.open(QFile::WriteOnly)) 114 if (!f.open(QFile::WriteOnly))
115 - qFatal("QtUtils::writeFile failed to open %s for writing.", qPrintable(file)); 115 + qFatal("Failed to open %s for writing.", qPrintable(file));
116 f.write(contents); 116 f.write(contents);
117 f.close(); 117 f.close();
118 } 118 }
@@ -139,7 +139,7 @@ void QtUtils::emptyDir(QDir &amp;dir) @@ -139,7 +139,7 @@ void QtUtils::emptyDir(QDir &amp;dir)
139 { 139 {
140 foreach (const QString &folder, dir.entryList(QDir::Dirs | QDir::NoDotAndDotDot | QDir::NoSymLinks)) { 140 foreach (const QString &folder, dir.entryList(QDir::Dirs | QDir::NoDotAndDotDot | QDir::NoSymLinks)) {
141 QDir subdir(dir); 141 QDir subdir(dir);
142 - bool success = subdir.cd(folder); if (!success) qFatal("QtUtils::emptyDir cd failure."); 142 + bool success = subdir.cd(folder); if (!success) qFatal("cd failure.");
143 emptyDir(subdir); 143 emptyDir(subdir);
144 } 144 }
145 145
@@ -163,28 +163,28 @@ QString QtUtils::find(const QString &amp;file, const QString &amp;alt) @@ -163,28 +163,28 @@ QString QtUtils::find(const QString &amp;file, const QString &amp;alt)
163 { 163 {
164 if (QFileInfo(file).exists()) return file; 164 if (QFileInfo(file).exists()) return file;
165 if (QFileInfo(alt).exists()) return alt; 165 if (QFileInfo(alt).exists()) return alt;
166 - qFatal("QtUtils::find can't find file %s or alt %s\n", qPrintable(file), qPrintable(alt)); 166 + qFatal("Can't find file %s or alt %s\n", qPrintable(file), qPrintable(alt));
167 return ""; 167 return "";
168 } 168 }
169 169
170 bool QtUtils::toBool(const QString &string) 170 bool QtUtils::toBool(const QString &string)
171 { 171 {
172 bool ok; 172 bool ok;
173 - bool result = (bool)string.toInt(&ok); if (!ok) qFatal("QtUtils::toBool expected integer value, got %s.", qPrintable(string)); 173 + bool result = (bool)string.toInt(&ok); if (!ok) qFatal("Expected integer value, got %s.", qPrintable(string));
174 return result; 174 return result;
175 } 175 }
176 176
177 int QtUtils::toInt(const QString &string) 177 int QtUtils::toInt(const QString &string)
178 { 178 {
179 bool ok; 179 bool ok;
180 - int result = string.toInt(&ok); if (!ok) qFatal("QtUtils::toInt expected integer value, got %s.", qPrintable(string)); 180 + int result = string.toInt(&ok); if (!ok) qFatal("Expected integer value, got %s.", qPrintable(string));
181 return result; 181 return result;
182 } 182 }
183 183
184 float QtUtils::toFloat(const QString &string) 184 float QtUtils::toFloat(const QString &string)
185 { 185 {
186 bool ok; 186 bool ok;
187 - float result = string.toFloat(&ok); if (!ok) qFatal("QtUtils::toFloat expected floating point value, got %s.", qPrintable(string)); 187 + float result = string.toFloat(&ok); if (!ok) qFatal("Expected floating point value, got %s.", qPrintable(string));
188 return result; 188 return result;
189 } 189 }
190 190
@@ -194,7 +194,7 @@ QList&lt;float&gt; QtUtils::toFloats(const QStringList &amp;strings) @@ -194,7 +194,7 @@ QList&lt;float&gt; QtUtils::toFloats(const QStringList &amp;strings)
194 bool ok; 194 bool ok;
195 foreach (const QString &string, strings) { 195 foreach (const QString &string, strings) {
196 floats.append(string.toFloat(&ok)); 196 floats.append(string.toFloat(&ok));
197 - if (!ok) qFatal("QtUtils::toFloats failed to convert %s to floating point format.", qPrintable(string)); 197 + if (!ok) qFatal("Failed to convert %s to floating point format.", qPrintable(string));
198 } 198 }
199 return floats; 199 return floats;
200 } 200 }
@@ -239,13 +239,13 @@ QStringList QtUtils::parse(QString args, char split) @@ -239,13 +239,13 @@ QStringList QtUtils::parse(QString args, char split)
239 } else if ((args[i] == '(') || (args[i] == '[') || (args[i] == '<') || (args[i] == '{')) { 239 } else if ((args[i] == '(') || (args[i] == '[') || (args[i] == '<') || (args[i] == '{')) {
240 subexpressions.push(args[i]); 240 subexpressions.push(args[i]);
241 } else if (args[i] == ')') { 241 } else if (args[i] == ')') {
242 - if (subexpressions.pop() != '(') qFatal("QtUtils::parse unexpected ')'."); 242 + if (subexpressions.pop() != '(') qFatal("Unexpected ')'.");
243 } else if (args[i] == ']') { 243 } else if (args[i] == ']') {
244 - if (subexpressions.pop() != '[') qFatal("QtUtils::parse unexpected ']'."); 244 + if (subexpressions.pop() != '[') qFatal("Unexpected ']'.");
245 } else if (args[i] == '>') { 245 } else if (args[i] == '>') {
246 - if (subexpressions.pop() != '<') qFatal("QtUtils::parse unexpected '>'."); 246 + if (subexpressions.pop() != '<') qFatal("Unexpected '>'.");
247 } else if (args[i] == '}') { 247 } else if (args[i] == '}') {
248 - if (subexpressions.pop() != '{') qFatal("QtUtils::parse unexpected '}'."); 248 + if (subexpressions.pop() != '{') qFatal("Unexpected '}'.");
249 } else if (subexpressions.isEmpty() && (args[i] == split)) { 249 } else if (subexpressions.isEmpty() && (args[i] == split)) {
250 words.append(args.mid(start, i-start).trimmed()); 250 words.append(args.mid(start, i-start).trimmed());
251 start = i+1; 251 start = i+1;
sdk/openbr_plugin.cpp
@@ -155,7 +155,7 @@ void File::set(const QString &amp;key, const QVariant &amp;value) @@ -155,7 +155,7 @@ void File::set(const QString &amp;key, const QVariant &amp;value)
155 155
156 QVariant File::get(const QString &key) const 156 QVariant File::get(const QString &key) const
157 { 157 {
158 - if (!contains(key)) qFatal("File::get missing key: %s", qPrintable(key)); 158 + if (!contains(key)) qFatal("Missing key: %s", qPrintable(key));
159 return value(key); 159 return value(key);
160 } 160 }
161 161
@@ -182,9 +182,9 @@ void File::setBool(const QString &amp;key, bool value) @@ -182,9 +182,9 @@ void File::setBool(const QString &amp;key, bool value)
182 182
183 int File::getInt(const QString &key) const 183 int File::getInt(const QString &key) const
184 { 184 {
185 - if (!contains(key)) qFatal("File::getInt missing key: %s", qPrintable(key)); 185 + if (!contains(key)) qFatal("Missing key: %s", qPrintable(key));
186 bool ok; int result = value(key).toInt(&ok); 186 bool ok; int result = value(key).toInt(&ok);
187 - if (!ok) qFatal("File::getInt invalid conversion from: %s", qPrintable(getString(key))); 187 + if (!ok) qFatal("Invalid conversion from: %s", qPrintable(getString(key)));
188 return result; 188 return result;
189 } 189 }
190 190
@@ -198,9 +198,9 @@ int File::getInt(const QString &amp;key, int defaultValue) const @@ -198,9 +198,9 @@ int File::getInt(const QString &amp;key, int defaultValue) const
198 198
199 float File::getFloat(const QString &key) const 199 float File::getFloat(const QString &key) const
200 { 200 {
201 - if (!contains(key)) qFatal("File::getFloat missing key: %s", qPrintable(key)); 201 + if (!contains(key)) qFatal("Missing key: %s", qPrintable(key));
202 bool ok; float result = value(key).toFloat(&ok); 202 bool ok; float result = value(key).toFloat(&ok);
203 - if (!ok) qFatal("File::getFloat invalid conversion from: %s", qPrintable(getString(key))); 203 + if (!ok) qFatal("Invalid conversion from: %s", qPrintable(getString(key)));
204 return result; 204 return result;
205 } 205 }
206 206
@@ -214,7 +214,7 @@ float File::getFloat(const QString &amp;key, float defaultValue) const @@ -214,7 +214,7 @@ float File::getFloat(const QString &amp;key, float defaultValue) const
214 214
215 QString File::getString(const QString &key) const 215 QString File::getString(const QString &key) const
216 { 216 {
217 - if (!contains(key)) qFatal("File::getString missing key: %s", qPrintable(key)); 217 + if (!contains(key)) qFatal("Missing key: %s", qPrintable(key));
218 return value(key).toString(); 218 return value(key).toString();
219 } 219 }
220 220
@@ -657,7 +657,7 @@ void Object::setProperty(const QString &amp;name, const QString &amp;value) @@ -657,7 +657,7 @@ void Object::setProperty(const QString &amp;name, const QString &amp;value)
657 657
658 QVariant variant; 658 QVariant variant;
659 if (type.startsWith("QList<") && type.endsWith(">")) { 659 if (type.startsWith("QList<") && type.endsWith(">")) {
660 - if (!value.startsWith('[')) qFatal("Object::setProperty expected a list."); 660 + if (!value.startsWith('[')) qFatal("Expected a list.");
661 const QStringList strings = parse(value.mid(1, value.size()-2)); 661 const QStringList strings = parse(value.mid(1, value.size()-2));
662 662
663 if (type == "QList<float>") { 663 if (type == "QList<float>") {
sdk/openbr_plugin.h
@@ -277,7 +277,7 @@ struct Template : public QList&lt;cv::Mat&gt; @@ -277,7 +277,7 @@ struct Template : public QList&lt;cv::Mat&gt;
277 Template(const cv::Mat &mat) { append(mat); } /*!< \brief Append a matrix. */ 277 Template(const cv::Mat &mat) { append(mat); } /*!< \brief Append a matrix. */
278 278
279 inline const cv::Mat &m() const { static const cv::Mat NullMatrix; 279 inline const cv::Mat &m() const { static const cv::Mat NullMatrix;
280 - return isEmpty() ? qFatal("Template::m() empty template."), NullMatrix : last(); } /*!< \brief Idiom to treat the template as a matrix. */ 280 + return isEmpty() ? qFatal("Empty template."), NullMatrix : last(); } /*!< \brief Idiom to treat the template as a matrix. */
281 inline cv::Mat &m() { return isEmpty() ? append(cv::Mat()), last() : last(); } /*!< \brief Idiom to treat the template as a matrix. */ 281 inline cv::Mat &m() { return isEmpty() ? append(cv::Mat()), last() : last(); } /*!< \brief Idiom to treat the template as a matrix. */
282 inline cv::Mat &operator=(const cv::Mat &other) { return m() = other; } /*!< \brief Idiom to treat the template as a matrix. */ 282 inline cv::Mat &operator=(const cv::Mat &other) { return m() = other; } /*!< \brief Idiom to treat the template as a matrix. */
283 inline operator const cv::Mat&() const { return m(); } /*!< \brief Idiom to treat the template as a matrix. */ 283 inline operator const cv::Mat&() const { return m(); } /*!< \brief Idiom to treat the template as a matrix. */
sdk/plugins/cascade.cpp
@@ -37,7 +37,7 @@ public: @@ -37,7 +37,7 @@ public:
37 else if (model == "Eye") file += "haarcascades/haarcascade_eye_tree_eyeglasses.xml"; 37 else if (model == "Eye") file += "haarcascades/haarcascade_eye_tree_eyeglasses.xml";
38 else if (model == "FrontalFace") file += "haarcascades/haarcascade_frontalface_alt2.xml"; 38 else if (model == "FrontalFace") file += "haarcascades/haarcascade_frontalface_alt2.xml";
39 else if (model == "ProfileFace") file += "haarcascades/haarcascade_profileface.xml"; 39 else if (model == "ProfileFace") file += "haarcascades/haarcascade_profileface.xml";
40 - else qFatal("CascadeResourceMaker::CascadeResourceMaker invalid model."); 40 + else qFatal("Invalid model.");
41 } 41 }
42 42
43 private: 43 private:
@@ -45,7 +45,7 @@ private: @@ -45,7 +45,7 @@ private:
45 { 45 {
46 CascadeClassifier *cascade = new CascadeClassifier(); 46 CascadeClassifier *cascade = new CascadeClassifier();
47 if (!cascade->load(file.toStdString())) 47 if (!cascade->load(file.toStdString()))
48 - qFatal("CascadeResourceMaker::make failed to load: %s", qPrintable(file)); 48 + qFatal("Failed to load: %s", qPrintable(file));
49 return cascade; 49 return cascade;
50 } 50 }
51 }; 51 };
sdk/plugins/distance.cpp
@@ -87,7 +87,7 @@ private: @@ -87,7 +87,7 @@ private:
87 } 87 }
88 88
89 if (result != result) 89 if (result != result)
90 - qFatal("Dist::compare NaN result."); 90 + qFatal("NaN result.");
91 91
92 return -log(result+1); 92 return -log(result+1);
93 } 93 }
sdk/plugins/eigen3.cpp
@@ -82,7 +82,7 @@ private: @@ -82,7 +82,7 @@ private:
82 void train(const TemplateList &trainingSet) 82 void train(const TemplateList &trainingSet)
83 { 83 {
84 if (trainingSet.first().m().type() != CV_32FC1) 84 if (trainingSet.first().m().type() != CV_32FC1)
85 - qFatal("PCA::train requires single channel 32-bit floating point matrices."); 85 + qFatal("Requires single channel 32-bit floating point matrices.");
86 86
87 originalRows = trainingSet.first().m().rows; 87 originalRows = trainingSet.first().m().rows;
88 int dimsIn = trainingSet.first().m().rows * trainingSet.first().m().cols; 88 int dimsIn = trainingSet.first().m().rows * trainingSet.first().m().cols;
@@ -156,7 +156,7 @@ private: @@ -156,7 +156,7 @@ private:
156 } 156 }
157 } else { 157 } else {
158 if (keep + drop > allEVals.rows()) 158 if (keep + drop > allEVals.rows())
159 - qFatal("PCA::train insufficient samples, needed at least %d but only got %d.", (int)keep + drop, (int)allEVals.rows()); 159 + qFatal("Insufficient samples, needed at least %d but only got %d.", (int)keep + drop, (int)allEVals.rows());
160 } 160 }
161 161
162 // Keep highest energy vectors 162 // Keep highest energy vectors
sdk/plugins/eyes.cpp
@@ -71,10 +71,10 @@ public: @@ -71,10 +71,10 @@ public:
71 71
72 // Open the eye locator model 72 // Open the eye locator model
73 file.setFileName(Globals->sdkPath + "/share/openbr/models/EyeLocatorASEF128x128.fel"); 73 file.setFileName(Globals->sdkPath + "/share/openbr/models/EyeLocatorASEF128x128.fel");
74 - bool success = file.open(QFile::ReadOnly); if (!success) qFatal("ASEFEyes::ASEFEyes failed to open %s for reading.", qPrintable(file.fileName())); 74 + if (!file.open(QFile::ReadOnly)) qFatal("Failed to open %s for reading.", qPrintable(file.fileName()));
75 75
76 // Check the first line 76 // Check the first line
77 - line = file.readLine().simplified(); if (line != "CFEL") qFatal("ASEFEyes::ASEFEyes invalid header."); 77 + if (file.readLine().simplified() != "CFEL") qFatal("Invalid header.");
78 78
79 // Read past the comment and copyright. 79 // Read past the comment and copyright.
80 file.readLine(); 80 file.readLine();
sdk/plugins/fill.cpp
@@ -114,7 +114,7 @@ class BlendTransform : public UntrainableMetaTransform @@ -114,7 +114,7 @@ class BlendTransform : public UntrainableMetaTransform
114 114
115 void project(const Template &src, Template &dst) const 115 void project(const Template &src, Template &dst) const
116 { 116 {
117 - if (src.size() != 2) qFatal("Blend::project expected two source matrices."); 117 + if (src.size() != 2) qFatal("Expected two source matrices.");
118 addWeighted(src[0], alpha, src[1], 1-alpha, 0, dst); 118 addWeighted(src[0], alpha, src[1], 1-alpha, 0, dst);
119 } 119 }
120 }; 120 };
sdk/plugins/filter.cpp
@@ -130,7 +130,7 @@ class CSDNTransform : public UntrainableTransform @@ -130,7 +130,7 @@ class CSDNTransform : public UntrainableTransform
130 130
131 void project(const Template &src, Template &dst) const 131 void project(const Template &src, Template &dst) const
132 { 132 {
133 - if (src.m().channels() != 1) qFatal("ContrastEq::project expected single channel source matrix."); 133 + if (src.m().channels() != 1) qFatal("Expected single channel source matrix.");
134 134
135 const int nRows = src.m().rows; 135 const int nRows = src.m().rows;
136 const int nCols = src.m().cols; 136 const int nCols = src.m().cols;
@@ -180,7 +180,7 @@ class ContrastEqTransform : public UntrainableTransform @@ -180,7 +180,7 @@ class ContrastEqTransform : public UntrainableTransform
180 180
181 void project(const Template &src, Template &dst) const 181 void project(const Template &src, Template &dst) const
182 { 182 {
183 - if (src.m().channels() != 1) qFatal("ContrastEq::project expected single channel source matrix."); 183 + if (src.m().channels() != 1) qFatal("Expected single channel source matrix.");
184 184
185 // Stage 1 185 // Stage 1
186 Mat stage1; 186 Mat stage1;
sdk/plugins/format.cpp
@@ -112,7 +112,7 @@ class binFormat : public Format @@ -112,7 +112,7 @@ class binFormat : public Format
112 { 112 {
113 Mat m; 113 Mat m;
114 t.m().convertTo(m, CV_32F); 114 t.m().convertTo(m, CV_32F);
115 - if (m.channels() != 1) qFatal("binFormat::write only supports single channel matrices."); 115 + if (m.channels() != 1) qFatal("Only supports single channel matrices.");
116 116
117 QByteArray data; 117 QByteArray data;
118 QDataStream stream(&data, QFile::WriteOnly); 118 QDataStream stream(&data, QFile::WriteOnly);
@@ -168,8 +168,8 @@ class csvFormat : public Format @@ -168,8 +168,8 @@ class csvFormat : public Format
168 void write(const Template &t) const 168 void write(const Template &t) const
169 { 169 {
170 const Mat &m = t.m(); 170 const Mat &m = t.m();
171 - if (t.size() != 1) qFatal("csvFormat::write only supports single matrix templates.");  
172 - if (m.channels() != 1) qFatal("csvFormat::write only supports single channel matrices."); 171 + if (t.size() != 1) qFatal("Only supports single matrix templates.");
  172 + if (m.channels() != 1) qFatal("Only supports single channel matrices.");
173 173
174 QStringList lines; lines.reserve(m.rows); 174 QStringList lines; lines.reserve(m.rows);
175 for (int r=0; r<m.rows; r++) { 175 for (int r=0; r<m.rows; r++) {
@@ -337,7 +337,7 @@ class matFormat : public Format @@ -337,7 +337,7 @@ class matFormat : public Format
337 int skipBytes = (bytes < 4) ? (4 - bytes) : (8 - bytes%8)%8; 337 int skipBytes = (bytes < 4) ? (4 - bytes) : (8 - bytes%8)%8;
338 if (skipBytes != 0) stream.skipRawData(skipBytes); 338 if (skipBytes != 0) stream.skipRawData(skipBytes);
339 339
340 - if (error) qFatal("matFormat::Element Unexpected end of file."); 340 + if (error) qFatal("Unexpected end of file.");
341 } 341 }
342 342
343 void print() const 343 void print() const
@@ -356,7 +356,7 @@ class matFormat : public Format @@ -356,7 +356,7 @@ class matFormat : public Format
356 QByteArray header(128, 0); 356 QByteArray header(128, 0);
357 f.readRawData(header.data(), 128); 357 f.readRawData(header.data(), 128);
358 if (!header.startsWith("MATLAB 5.0 MAT-file")) 358 if (!header.startsWith("MATLAB 5.0 MAT-file"))
359 - qFatal("matFormat::read Invalid MAT header."); 359 + qFatal("Invalid MAT header.");
360 } 360 }
361 361
362 Template t(file); 362 Template t(file);
@@ -426,7 +426,7 @@ class matFormat : public Format @@ -426,7 +426,7 @@ class matFormat : public Format
426 426
427 for (int i=0; i<t.size(); i++) { 427 for (int i=0; i<t.size(); i++) {
428 const Mat &m = t[i]; 428 const Mat &m = t[i];
429 - if (m.channels() != 1) qFatal("matFormat::write only supports single channel matrices."); 429 + if (m.channels() != 1) qFatal("Only supports single channel matrices.");
430 430
431 QByteArray subdata; 431 QByteArray subdata;
432 QDataStream substream(&subdata, QFile::WriteOnly); 432 QDataStream substream(&subdata, QFile::WriteOnly);
@@ -443,7 +443,7 @@ class matFormat : public Format @@ -443,7 +443,7 @@ class matFormat : public Format
443 case CV_16UC1: arrayClass = 10; break; 443 case CV_16UC1: arrayClass = 10; break;
444 case CV_16SC1: arrayClass = 11; break; 444 case CV_16SC1: arrayClass = 11; break;
445 case CV_32SC1: arrayClass = 12; break; 445 case CV_32SC1: arrayClass = 12; break;
446 - default: qFatal("matFormat::write unsupported matrix class."); 446 + default: qFatal("Unsupported matrix class.");
447 } 447 }
448 substream.writeRawData((const char*)&type, 4); 448 substream.writeRawData((const char*)&type, 4);
449 substream.writeRawData((const char*)&bytes, 4); 449 substream.writeRawData((const char*)&bytes, 4);
@@ -480,7 +480,7 @@ class matFormat : public Format @@ -480,7 +480,7 @@ class matFormat : public Format
480 case CV_32SC1: type = 5; break; 480 case CV_32SC1: type = 5; break;
481 case CV_32FC1: type = 7; break; 481 case CV_32FC1: type = 7; break;
482 case CV_64FC1: type = 9; break; 482 case CV_64FC1: type = 9; break;
483 - default: qFatal("matFormat::write unsupported matrix type."); 483 + default: qFatal("Unsupported matrix type.");
484 } 484 }
485 quint32 bytes = m.elemSize() * m.rows * m.cols; 485 quint32 bytes = m.elemSize() * m.rows * m.cols;
486 QByteArray buffer((8 - bytes%8)%8, 0); 486 QByteArray buffer((8 - bytes%8)%8, 0);
@@ -531,7 +531,7 @@ class webcamFormat : public Format @@ -531,7 +531,7 @@ class webcamFormat : public Format
531 void write(const Template &t) const 531 void write(const Template &t) const
532 { 532 {
533 (void) t; 533 (void) t;
534 - qFatal("webcamFormat::write not supported."); 534 + qFatal("Not supported.");
535 } 535 }
536 }; 536 };
537 537
@@ -552,8 +552,8 @@ class xmlFormat : public Format @@ -552,8 +552,8 @@ class xmlFormat : public Format
552 { 552 {
553 QDomDocument doc(file); 553 QDomDocument doc(file);
554 QFile f(file); 554 QFile f(file);
555 - if (!f.open(QIODevice::ReadOnly)) qFatal("xmlFormat::read unable to open %s for reading.", qPrintable(file.flat()));  
556 - if (!doc.setContent(&f)) qFatal("xmlFormat::read unable to parse %s.", qPrintable(file.flat())); 555 + if (!f.open(QIODevice::ReadOnly)) qFatal("Unable to open %s for reading.", qPrintable(file.flat()));
  556 + if (!doc.setContent(&f)) qFatal("Unable to parse %s.", qPrintable(file.flat()));
557 f.close(); 557 f.close();
558 558
559 Template t; 559 Template t;
@@ -599,7 +599,7 @@ class xmlFormat : public Format @@ -599,7 +599,7 @@ class xmlFormat : public Format
599 void write(const Template &t) const 599 void write(const Template &t) const
600 { 600 {
601 (void) t; 601 (void) t;
602 - qFatal("xmlFormat::write not supported."); 602 + qFatal("Not supported.");
603 } 603 }
604 }; 604 };
605 605
sdk/plugins/gallery.cpp
@@ -291,12 +291,12 @@ class memGallery : public Gallery @@ -291,12 +291,12 @@ class memGallery : public Gallery
291 size_t offset = 0; 291 size_t offset = 0;
292 for (int i=0; i<templates.size(); i++) { 292 for (int i=0; i<templates.size(); i++) {
293 Template &t = templates[i]; 293 Template &t = templates[i];
294 - if (t.size() > 1) qFatal("memGallery::align can't handle multi-matrix template %s.", qPrintable(t.file.flat())); 294 + if (t.size() > 1) qFatal("Can't handle multi-matrix template %s.", qPrintable(t.file.flat()));
295 295
296 cv::Mat &m = t; 296 cv::Mat &m = t;
297 if (m.data) { 297 if (m.data) {
298 const size_t size = m.total() * m.elemSize(); 298 const size_t size = m.total() * m.elemSize();
299 - if (!m.isContinuous()) qFatal("memGallery::align requires continuous matrix data of size %d for %s.", (int)size, qPrintable(t.file.flat())); 299 + if (!m.isContinuous()) qFatal("Requires continuous matrix data of size %d for %s.", (int)size, qPrintable(t.file.flat()));
300 memcpy(&(alignedData.data()[offset]), m.ptr(), size); 300 memcpy(&(alignedData.data()[offset]), m.ptr(), size);
301 m = cv::Mat(m.rows, m.cols, m.type(), &(alignedData.data()[offset])); 301 m = cv::Mat(m.rows, m.cols, m.type(), &(alignedData.data()[offset]));
302 offset += size; 302 offset += size;
@@ -596,7 +596,7 @@ class dbGallery : public Gallery @@ -596,7 +596,7 @@ class dbGallery : public Gallery
596 void write(const Template &t) 596 void write(const Template &t)
597 { 597 {
598 (void) t; 598 (void) t;
599 - qFatal("Writing not supported."); 599 + qFatal("Not supported.");
600 } 600 }
601 }; 601 };
602 602
@@ -649,7 +649,7 @@ class googleGallery : public Gallery @@ -649,7 +649,7 @@ class googleGallery : public Gallery
649 void write(const Template &t) 649 void write(const Template &t)
650 { 650 {
651 (void) t; 651 (void) t;
652 - qFatal("Writing to a txtGallery not supported."); 652 + qFatal("Not supported.");
653 } 653 }
654 }; 654 };
655 655
sdk/plugins/keypoint.cpp
@@ -42,7 +42,7 @@ class KeyPointDetectorTransform : public UntrainableTransform @@ -42,7 +42,7 @@ class KeyPointDetectorTransform : public UntrainableTransform
42 { 42 {
43 featureDetector = FeatureDetector::create(detector.toStdString()); 43 featureDetector = FeatureDetector::create(detector.toStdString());
44 if (featureDetector.empty()) 44 if (featureDetector.empty())
45 - qFatal("KeyPointDetector::init failed to create KeyPointDetector: %s", qPrintable(detector)); 45 + qFatal("Failed to create KeyPointDetector: %s", qPrintable(detector));
46 } 46 }
47 47
48 void project(const Template &src, Template &dst) const 48 void project(const Template &src, Template &dst) const
@@ -85,7 +85,7 @@ class KeyPointDescriptorTransform : public UntrainableTransform @@ -85,7 +85,7 @@ class KeyPointDescriptorTransform : public UntrainableTransform
85 { 85 {
86 descriptorExtractor = DescriptorExtractor::create(descriptor.toStdString()); 86 descriptorExtractor = DescriptorExtractor::create(descriptor.toStdString());
87 if (descriptorExtractor.empty()) 87 if (descriptorExtractor.empty())
88 - qFatal("KeyPointDescriptor::make failed to create DescriptorExtractor: %s", qPrintable(descriptor)); 88 + qFatal("Failed to create DescriptorExtractor: %s", qPrintable(descriptor));
89 } 89 }
90 90
91 void project(const Template &src, Template &dst) const 91 void project(const Template &src, Template &dst) const
@@ -123,7 +123,7 @@ class KeyPointMatcherTransform : public Distance @@ -123,7 +123,7 @@ class KeyPointMatcherTransform : public Distance
123 { 123 {
124 descriptorMatcher = DescriptorMatcher::create(matcher.toStdString()); 124 descriptorMatcher = DescriptorMatcher::create(matcher.toStdString());
125 if (descriptorMatcher.empty()) 125 if (descriptorMatcher.empty())
126 - qFatal("KeyPointMatcher::make failed to create DescriptorMatcher: %s", qPrintable(matcher)); 126 + qFatal("Failed to create DescriptorMatcher: %s", qPrintable(matcher));
127 } 127 }
128 128
129 float compare(const Template &a, const Template &b) const 129 float compare(const Template &a, const Template &b) const
sdk/plugins/lbp.cpp
@@ -171,7 +171,7 @@ class ColoredU2Transform : public UntrainableTransform @@ -171,7 +171,7 @@ class ColoredU2Transform : public UntrainableTransform
171 } 171 }
172 172
173 if (src.m().type() != CV_8UC1) 173 if (src.m().type() != CV_8UC1)
174 - qFatal("ColoredU2::project expected 8UC1 source type."); 174 + qFatal("Expected 8UC1 source type.");
175 175
176 Mat hue, saturation, value; 176 Mat hue, saturation, value;
177 LUT(src, hueLUT, hue); 177 LUT(src, hueLUT, hue);
sdk/plugins/mask.cpp
@@ -59,7 +59,7 @@ class GradientMaskTransform : public UntrainableTransform @@ -59,7 +59,7 @@ class GradientMaskTransform : public UntrainableTransform
59 void project(const Template &src, Template &dst) const 59 void project(const Template &src, Template &dst) const
60 { 60 {
61 const Mat &m = src.m(); 61 const Mat &m = src.m();
62 - if (m.type() != CV_8UC1) qFatal("GradientMask operates on 8UC1 matrices."); 62 + if (m.type() != CV_8UC1) qFatal("Requires 8UC1 matrices.");
63 Mat n = Mat(m.rows, m.cols, CV_8UC1); 63 Mat n = Mat(m.rows, m.cols, CV_8UC1);
64 n.setTo(255); 64 n.setTo(255);
65 for (int i=0; i<m.rows; i++) { 65 for (int i=0; i<m.rows; i++) {
sdk/plugins/meta.cpp
@@ -39,8 +39,8 @@ static TemplateList Simplified(const TemplateList &amp;templates) @@ -39,8 +39,8 @@ static TemplateList Simplified(const TemplateList &amp;templates)
39 const bool fte = t.file.getBool("FTE"); 39 const bool fte = t.file.getBool("FTE");
40 QList<QPointF> landmarks = t.file.landmarks(); 40 QList<QPointF> landmarks = t.file.landmarks();
41 QList<QRectF> ROIs = t.file.ROIs(); 41 QList<QRectF> ROIs = t.file.ROIs();
42 - if (landmarks.size() % t.size() != 0) qFatal("TemplateList::simplified uneven landmark count.");  
43 - if (ROIs.size() % t.size() != 0) qFatal("TemplateList::simplified uneven ROI count."); 42 + if (landmarks.size() % t.size() != 0) qFatal("Uneven landmark count.");
  43 + if (ROIs.size() % t.size() != 0) qFatal("Uneven ROI count.");
44 const int landmarkStep = landmarks.size() / t.size(); 44 const int landmarkStep = landmarks.size() / t.size();
45 const int ROIStep = ROIs.size() / t.size(); 45 const int ROIStep = ROIs.size() / t.size();
46 46
@@ -281,7 +281,7 @@ class ForkTransform : public MetaTransform @@ -281,7 +281,7 @@ class ForkTransform : public MetaTransform
281 foreach (const Transform *f, transforms) { 281 foreach (const Transform *f, transforms) {
282 TemplateList m; 282 TemplateList m;
283 f->project(src, m); 283 f->project(src, m);
284 - if (m.size() != dst.size()) qFatal("Fork::project templateList is of an unexpected size."); 284 + if (m.size() != dst.size()) qFatal("TemplateList is of an unexpected size.");
285 for (int i=0; i<src.size(); i++) dst[i].append(m[i]); 285 for (int i=0; i<src.size(); i++) dst[i].append(m[i]);
286 } 286 }
287 } else { 287 } else {
@@ -313,7 +313,8 @@ public: @@ -313,7 +313,8 @@ public:
313 313
314 // Write to cache 314 // Write to cache
315 QFile file("Cache"); 315 QFile file("Cache");
316 - bool success = file.open(QFile::WriteOnly); if (!success) qFatal("Cache::Cache unable to open %s for writing.", qPrintable(file.fileName())); 316 + if (!file.open(QFile::WriteOnly))
  317 + qFatal("Unable to open %s for writing.", qPrintable(file.fileName()));
317 QDataStream stream(&file); 318 QDataStream stream(&file);
318 stream << cache; 319 stream << cache;
319 file.close(); 320 file.close();
@@ -327,7 +328,8 @@ private: @@ -327,7 +328,8 @@ private:
327 // Read from cache 328 // Read from cache
328 QFile file("Cache"); 329 QFile file("Cache");
329 if (file.exists()) { 330 if (file.exists()) {
330 - bool success = file.open(QFile::ReadOnly); if (!success) qFatal("Cache::make unable to open %s for reading.", qPrintable(file.fileName())); 331 + if (!file.open(QFile::ReadOnly))
  332 + qFatal("Unable to open %s for reading.", qPrintable(file.fileName()));
331 QDataStream stream(&file); 333 QDataStream stream(&file);
332 stream >> cache; 334 stream >> cache;
333 file.close(); 335 file.close();
@@ -458,7 +460,8 @@ class FTETransform : public Transform @@ -458,7 +460,8 @@ class FTETransform : public Transform
458 460
459 QList<float> vals; 461 QList<float> vals;
460 foreach (const Template &t, projectedData) { 462 foreach (const Template &t, projectedData) {
461 - if (!t.file.contains(transform->objectName())) qFatal("FTE::train matrix metadata missing key %s.", qPrintable(transform->objectName())); 463 + if (!t.file.contains(transform->objectName()))
  464 + qFatal("Matrix metadata missing key %s.", qPrintable(transform->objectName()));
462 vals.append(t.file.getFloat(transform->objectName())); 465 vals.append(t.file.getFloat(transform->objectName()));
463 } 466 }
464 float q1, q3; 467 float q1, q3;
sdk/plugins/normalize.cpp
@@ -100,7 +100,7 @@ private: @@ -100,7 +100,7 @@ private:
100 if (method == Mean) mean(m.col(i), &A, &B); 100 if (method == Mean) mean(m.col(i), &A, &B);
101 else if (method == Median) median(m.col(i), &A, &B); 101 else if (method == Median) median(m.col(i), &A, &B);
102 else if (method == Range) range(m.col(i), &A, &B); 102 else if (method == Range) range(m.col(i), &A, &B);
103 - else qFatal("Center::train invalid method"); 103 + else qFatal("Invalid method.");
104 ca->at<double>(0, i) = A; 104 ca->at<double>(0, i) = A;
105 cb->at<double>(0, i) = B; 105 cb->at<double>(0, i) = B;
106 } 106 }
sdk/plugins/pixel.cpp
@@ -54,7 +54,6 @@ class PerPixelClassifierTransform : public MetaTransform @@ -54,7 +54,6 @@ class PerPixelClassifierTransform : public MetaTransform
54 54
55 void rotate(Template &src, Template &dst) const 55 void rotate(Template &src, Template &dst) const
56 { 56 {
57 - //if (src.m().cols%9 != 0) qFatal("Rotation invariance can only be used after Neighbors");  
58 int images = (src.m().cols)/9; 57 int images = (src.m().cols)/9;
59 dst = src; 58 dst = src;
60 for (int i = 0; i < images; i++){ 59 for (int i = 0; i < images; i++){
sdk/plugins/pp5.cpp
@@ -283,7 +283,7 @@ class PP5Compare : public Distance @@ -283,7 +283,7 @@ class PP5Compare : public Distance
283 { 283 {
284 (void) target; 284 (void) target;
285 (void) query; 285 (void) query;
286 - qFatal("PP5Compare::compare (single templates) should never be called!"); 286 + qFatal("Compare single templates should never be called!");
287 return 0; 287 return 0;
288 } 288 }
289 289
sdk/plugins/quantize.cpp
@@ -95,7 +95,7 @@ class PackTransform : public UntrainableTransform @@ -95,7 +95,7 @@ class PackTransform : public UntrainableTransform
95 { 95 {
96 const Mat &m = src; 96 const Mat &m = src;
97 if ((m.cols % 2 != 0) || (m.type() != CV_8UC1)) 97 if ((m.cols % 2 != 0) || (m.type() != CV_8UC1))
98 - qFatal("Pack::project invalid template format."); 98 + qFatal("Invalid template format.");
99 99
100 Mat n(m.rows, m.cols/2, CV_8UC1); 100 Mat n(m.rows, m.cols/2, CV_8UC1);
101 for (int i=0; i<m.rows; i++) 101 for (int i=0; i<m.rows; i++)
sdk/plugins/reduce.cpp
@@ -32,7 +32,7 @@ class SubtractTransform : public UntrainableMetaTransform @@ -32,7 +32,7 @@ class SubtractTransform : public UntrainableMetaTransform
32 32
33 void project(const Template &src, Template &dst) const 33 void project(const Template &src, Template &dst) const
34 { 34 {
35 - if (src.size() != 2) qFatal("Subtract::project expected exactly two source images, got %d.", src.size()); 35 + if (src.size() != 2) qFatal("Expected exactly two source images, got %d.", src.size());
36 dst.file = src.file; 36 dst.file = src.file;
37 subtract(src[0], src[1], dst); 37 subtract(src[0], src[1], dst);
38 } 38 }
@@ -51,7 +51,7 @@ class AbsDiffTransform : public UntrainableMetaTransform @@ -51,7 +51,7 @@ class AbsDiffTransform : public UntrainableMetaTransform
51 51
52 void project(const Template &src, Template &dst) const 52 void project(const Template &src, Template &dst) const
53 { 53 {
54 - if (src.size() != 2) qFatal("AbsDiff::project expected exactly two source images, got %d.", src.size()); 54 + if (src.size() != 2) qFatal("Expected exactly two source images, got %d.", src.size());
55 dst.file = src.file; 55 dst.file = src.file;
56 absdiff(src[0], src[1], dst); 56 absdiff(src[0], src[1], dst);
57 } 57 }
sdk/plugins/regions.cpp
@@ -89,7 +89,7 @@ class CatTransform : public UntrainableMetaTransform @@ -89,7 +89,7 @@ class CatTransform : public UntrainableMetaTransform
89 dst.file = src.file; 89 dst.file = src.file;
90 90
91 if (src.size() % partitions != 0) 91 if (src.size() % partitions != 0)
92 - qFatal("Cat %d partitions does not evenly divide %d matrices.", partitions, src.size()); 92 + qFatal("%d partitions does not evenly divide %d matrices.", partitions, src.size());
93 QVector<int> sizes(partitions, 0); 93 QVector<int> sizes(partitions, 0);
94 for (int i=0; i<src.size(); i++) 94 for (int i=0; i<src.size(); i++)
95 sizes[i%partitions] += src[i].total() * src[i].channels(); 95 sizes[i%partitions] += src[i].total() * src[i].channels();
sdk/plugins/svm.cpp
@@ -86,7 +86,7 @@ private: @@ -86,7 +86,7 @@ private:
86 } 86 }
87 87
88 if (data.type() != CV_32FC1) 88 if (data.type() != CV_32FC1)
89 - qFatal("SVM::train expected single channel floating point training data."); 89 + qFatal("Expected single channel floating point training data.");
90 90
91 CvSVMParams params; 91 CvSVMParams params;
92 params.kernel_type = kernel; 92 params.kernel_type = kernel;
sdk/plugins/synthetic.cpp
@@ -71,7 +71,7 @@ class OrigLinearRegressionTransform : public UntrainableMetaTransform @@ -71,7 +71,7 @@ class OrigLinearRegressionTransform : public UntrainableMetaTransform
71 71
72 void project(const Template &src, Template &dst) const 72 void project(const Template &src, Template &dst) const
73 { 73 {
74 - if (src.size() != 3) qFatal("OrigLinearRegression::project expected exactly three source images, got %d.", src.size()); 74 + if (src.size() != 3) qFatal("Expected exactly three source images, got %d.", src.size());
75 Mat m1; src[0].convertTo(m1, CV_32F); assert(m1.isContinuous() && (m1.channels() == 1)); 75 Mat m1; src[0].convertTo(m1, CV_32F); assert(m1.isContinuous() && (m1.channels() == 1));
76 Mat m2; src[1].convertTo(m2, CV_32F); assert(m2.isContinuous() && (m2.channels() == 1)); 76 Mat m2; src[1].convertTo(m2, CV_32F); assert(m2.isContinuous() && (m2.channels() == 1));
77 Mat m3; src[2].convertTo(m3, CV_32F); assert(m3.isContinuous() && (m3.channels() == 1)); 77 Mat m3; src[2].convertTo(m3, CV_32F); assert(m3.isContinuous() && (m3.channels() == 1));
sdk/plugins/wavelet.cpp
@@ -109,7 +109,7 @@ private: @@ -109,7 +109,7 @@ private:
109 else if (component == Imaginary) dst = imaginary; 109 else if (component == Imaginary) dst = imaginary;
110 else if (component == Magnitude) dst = magnitude; 110 else if (component == Magnitude) dst = magnitude;
111 else if (component == Phase) dst = phase; 111 else if (component == Phase) dst = phase;
112 - else qFatal("Gabor::project invalid component."); 112 + else qFatal("Invalid component.");
113 } 113 }
114 }; 114 };
115 115
@@ -183,7 +183,7 @@ class GaborJetTransform : public UntrainableTransform @@ -183,7 +183,7 @@ class GaborJetTransform : public UntrainableTransform
183 else if (component == GaborTransform::Imaginary) dst = imaginary; 183 else if (component == GaborTransform::Imaginary) dst = imaginary;
184 else if (component == GaborTransform::Magnitude) dst = magnitude; 184 else if (component == GaborTransform::Magnitude) dst = magnitude;
185 else if (component == GaborTransform::Phase) dst = phase; 185 else if (component == GaborTransform::Phase) dst = phase;
186 - else qFatal("GaborJet::response invalid component."); 186 + else qFatal("Invalid component.");
187 return dst; 187 return dst;
188 } 188 }
189 189