From 7e79e495310f2bbfa96194ee40569485bfb5e41b Mon Sep 17 00:00:00 2001 From: Josh Klontz Date: Fri, 11 Jul 2014 10:20:10 -0400 Subject: [PATCH] added support for AlgorithmID=7 --- openbr/plugins/gallery.cpp | 7 +++++++ 1 file changed, 7 insertions(+), 0 deletions(-) diff --git a/openbr/plugins/gallery.cpp b/openbr/plugins/gallery.cpp index 96367c7..243fa1d 100644 --- a/openbr/plugins/gallery.cpp +++ b/openbr/plugins/gallery.cpp @@ -225,6 +225,13 @@ class utGallery : public BinaryGallery if (ut.algorithmID == 5) { QDataStream stream(&data, QIODevice::ReadOnly); stream >> t; + } else if (ut.algorithmID == 7) { + uint32_t *roi = (uint32_t*) data.data(); + t.file.set("X", roi[0]); + t.file.set("Y", roi[1]); + t.file.set("Width", roi[2]); + t.file.set("Height", roi[3]); + t.append(cv::Mat(1, data.size()-4*sizeof(uint32_t), CV_8UC1, data.data()+4*sizeof(uint32_t)).clone() /* We don't want a shallow copy! */); } else { t.append(cv::Mat(1, data.size(), CV_8UC1, data.data()).clone() /* We don't want a shallow copy! */); } -- libgit2 0.21.4