Commit f76fe52625ecc9f45ec0c60298672532936ce86b

Authored by Josh Klontz
1 parent 74d09154

removed matlab cvmatio plugin

openbr/plugins/cmake/vbb.cmake deleted
1   -if(NOT BR_WITH_CVMATIO)
2   - set(BR_EXCLUDED_PLUGINS ${BR_EXCLUDED_PLUGINS} plugins/gallery/vbb.cpp)
3   -endif()
openbr/plugins/gallery/vbb.cpp deleted
1   -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
2   - * Copyright 2012 The MITRE Corporation *
3   - * *
4   - * Licensed under the Apache License, Version 2.0 (the "License"); *
5   - * you may not use this file except in compliance with the License. *
6   - * You may obtain a copy of the License at *
7   - * *
8   - * http://www.apache.org/licenses/LICENSE-2.0 *
9   - * *
10   - * Unless required by applicable law or agreed to in writing, software *
11   - * distributed under the License is distributed on an "AS IS" BASIS, *
12   - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
13   - * See the License for the specific language governing permissions and *
14   - * limitations under the License. *
15   - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
16   -
17   -#include <openbr/plugins/openbr_internal.h>
18   -
19   -namespace br
20   -{
21   -
22   -using namespace cv;
23   -
24   -/*!
25   - * \brief DOCUMENT ME
26   - * \author Unknown \cite unknown
27   - */
28   -class vbbGallery : public Gallery
29   -{
30   - Q_OBJECT
31   -
32   - void init()
33   - {
34   - MatlabIO matio;
35   - QString filename = (Globals->path.isEmpty() ? "" : Globals->path + "/") + file.name;
36   - bool ok = matio.open(filename.toStdString(), "r");
37   - if (!ok) qFatal("Couldn't open the vbb file");
38   -
39   - vector<MatlabIOContainer> variables;
40   - variables = matio.read();
41   - matio.close();
42   -
43   - double vers = variables[1].data<Mat>().at<double>(0,0);
44   - if (vers != 1.4) qFatal("This is an old vbb version, we don't mess with that.");
45   -
46   - A = variables[0].data<vector<vector<MatlabIOContainer> > >().at(0);
47   - objLists = A.at(1).data<vector<MatlabIOContainer> >();
48   -
49   - // start at the first frame (duh!)
50   - currFrame = 0;
51   - }
52   -
53   - TemplateList readBlock(bool *done)
54   - {
55   - *done = false;
56   - Template rects(file);
57   - if (objLists[currFrame].typeEquals<vector<vector<MatlabIOContainer> > >()) {
58   - vector<vector<MatlabIOContainer> > bbs = objLists[currFrame].data<vector<vector<MatlabIOContainer> > >();
59   - for (unsigned int i=0; i<bbs.size(); i++) {
60   - vector<MatlabIOContainer> bb = bbs[i];
61   - Mat pos = bb[1].data<Mat>();
62   - double left = pos.at<double>(0,0);
63   - double top = pos.at<double>(0,1);
64   - double width = pos.at<double>(0,2);
65   - double height = pos.at<double>(0,3);
66   - rects.file.appendRect(QRectF(left, top, width, height));
67   - }
68   - }
69   - TemplateList tl;
70   - tl.append(rects);
71   - if (++currFrame == (int)objLists.size()) *done = true;
72   - return tl;
73   - }
74   -
75   - void write(const Template &t)
76   - {
77   - (void)t; qFatal("Not implemented");
78   - }
79   -
80   -private:
81   - // this holds a bunch of stuff, maybe we'll use it all later
82   - vector<MatlabIOContainer> A;
83   - // this, a field in A, holds bounding boxes for each frame
84   - vector<MatlabIOContainer> objLists;
85   - int currFrame;
86   -};
87   -
88   -BR_REGISTER(Gallery, vbbGallery)
89   -
90   -} // namespace br
91   -
92   -#include "gallery/vbb.moc"