From f76fe52625ecc9f45ec0c60298672532936ce86b Mon Sep 17 00:00:00 2001 From: Josh Klontz Date: Tue, 31 Aug 2021 12:53:48 -0600 Subject: [PATCH] removed matlab cvmatio plugin --- openbr/plugins/cmake/vbb.cmake | 3 --- openbr/plugins/gallery/vbb.cpp | 92 -------------------------------------------------------------------------------------------- 2 files changed, 0 insertions(+), 95 deletions(-) delete mode 100644 openbr/plugins/cmake/vbb.cmake delete mode 100644 openbr/plugins/gallery/vbb.cpp diff --git a/openbr/plugins/cmake/vbb.cmake b/openbr/plugins/cmake/vbb.cmake deleted file mode 100644 index 92b2711..0000000 --- a/openbr/plugins/cmake/vbb.cmake +++ /dev/null @@ -1,3 +0,0 @@ -if(NOT BR_WITH_CVMATIO) - set(BR_EXCLUDED_PLUGINS ${BR_EXCLUDED_PLUGINS} plugins/gallery/vbb.cpp) -endif() diff --git a/openbr/plugins/gallery/vbb.cpp b/openbr/plugins/gallery/vbb.cpp deleted file mode 100644 index 5a217ce..0000000 --- a/openbr/plugins/gallery/vbb.cpp +++ /dev/null @@ -1,92 +0,0 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * Copyright 2012 The MITRE Corporation * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -#include - -namespace br -{ - -using namespace cv; - -/*! - * \brief DOCUMENT ME - * \author Unknown \cite unknown - */ -class vbbGallery : public Gallery -{ - Q_OBJECT - - void init() - { - MatlabIO matio; - QString filename = (Globals->path.isEmpty() ? "" : Globals->path + "/") + file.name; - bool ok = matio.open(filename.toStdString(), "r"); - if (!ok) qFatal("Couldn't open the vbb file"); - - vector variables; - variables = matio.read(); - matio.close(); - - double vers = variables[1].data().at(0,0); - if (vers != 1.4) qFatal("This is an old vbb version, we don't mess with that."); - - A = variables[0].data > >().at(0); - objLists = A.at(1).data >(); - - // start at the first frame (duh!) - currFrame = 0; - } - - TemplateList readBlock(bool *done) - { - *done = false; - Template rects(file); - if (objLists[currFrame].typeEquals > >()) { - vector > bbs = objLists[currFrame].data > >(); - for (unsigned int i=0; i bb = bbs[i]; - Mat pos = bb[1].data(); - double left = pos.at(0,0); - double top = pos.at(0,1); - double width = pos.at(0,2); - double height = pos.at(0,3); - rects.file.appendRect(QRectF(left, top, width, height)); - } - } - TemplateList tl; - tl.append(rects); - if (++currFrame == (int)objLists.size()) *done = true; - return tl; - } - - void write(const Template &t) - { - (void)t; qFatal("Not implemented"); - } - -private: - // this holds a bunch of stuff, maybe we'll use it all later - vector A; - // this, a field in A, holds bounding boxes for each frame - vector objLists; - int currFrame; -}; - -BR_REGISTER(Gallery, vbbGallery) - -} // namespace br - -#include "gallery/vbb.moc" -- libgit2 0.21.4