Commit 555651690788bf316fe83b80a5ef945302dd0909

Authored by Josh Klontz
1 parent 2627418b

fixed ShowTransform empty matrix edge case

openbr/plugins/gui.cpp
... ... @@ -447,7 +447,8 @@ public:
447 447 }
448 448 emit this->changeTitle(newTitle);
449 449  
450   - foreach(const cv::Mat & m, t) {
  450 + foreach (const cv::Mat &m, t) {
  451 + if (!m.data) continue;
451 452 qImageBuffer = toQImage(m);
452 453 displayBuffer->convertFromImage(qImageBuffer);
453 454  
... ...
openbr/plugins/slidingwindow.cpp
... ... @@ -270,6 +270,7 @@ class Detector : public Transform
270 270 {
271 271 const float aspectRatio = getAspectRatio(data);
272 272 TemplateList cropped = cropTrainingSamples(data, aspectRatio);
  273 + qDebug("Detector using: %d training samples.", cropped.size());
273 274 cropped.first().file.set("aspectRatio", aspectRatio);
274 275 transform->train(cropped);
275 276 }
... ...