Commit e8a5fd1041bba994a29c74552fa6d36cb7e4a3cb

Authored by Josh Klontz
1 parent 3c99d090

remove video

openbr/plugins/video/aggregate.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   -/*!
23   - * \ingroup transforms
24   - * \brief Passes along n sequential frames to the next Transform.
25   - *
26   - * For a video with m frames, AggregateFrames would create a total of m-n+1 sequences ([0,n] ... [m-n+1, m])
27   - *
28   - * \author Josh Klontz \cite jklontz
29   - */
30   -class AggregateFrames : public TimeVaryingTransform
31   -{
32   - Q_OBJECT
33   - Q_PROPERTY(int n READ get_n WRITE set_n RESET reset_n STORED false)
34   - BR_PROPERTY(int, n, 1)
35   -
36   - TemplateList buffer;
37   -
38   -public:
39   - AggregateFrames() : TimeVaryingTransform(false, false) {}
40   -
41   -private:
42   - void train(const TemplateList &data)
43   - {
44   - (void) data;
45   - }
46   -
47   - void projectUpdate(const TemplateList &src, TemplateList &dst)
48   - {
49   - buffer.append(src);
50   - if (buffer.size() < n) return;
51   - Template out;
52   - foreach (const Template &t, buffer) out.append(t);
53   - out.file = buffer.takeFirst().file;
54   - dst.append(out);
55   - }
56   -
57   - void finalize(TemplateList &output)
58   - {
59   - (void) output;
60   - buffer.clear();
61   - }
62   -
63   - void store(QDataStream &stream) const
64   - {
65   - (void) stream;
66   - }
67   -
68   - void load(QDataStream &stream)
69   - {
70   - (void) stream;
71   - }
72   -};
73   -
74   -BR_REGISTER(Transform, AggregateFrames)
75   -
76   -} // namespace br
77   -
78   -#include "video/aggregate.moc"
openbr/plugins/video/drop.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   -/*!
23   - * \ingroup transforms
24   - * \brief Only use one frame every n frames.
25   - * \author Austin Blanton \cite imaus10
26   - *
27   - * For a video with m frames, DropFrames will pass on m/n frames.
28   - */
29   -class DropFrames : public UntrainableMetaTransform
30   -{
31   - Q_OBJECT
32   - Q_PROPERTY(int n READ get_n WRITE set_n RESET reset_n STORED false)
33   - BR_PROPERTY(int, n, 1)
34   -
35   - void project(const TemplateList &src, TemplateList &dst) const
36   - {
37   - if (src.first().file.get<int>("FrameNumber") % n != 0) return;
38   - dst = src;
39   - }
40   -
41   - void project(const Template &src, Template &dst) const
42   - {
43   - (void) src; (void) dst; qFatal("shouldn't be here");
44   - }
45   -};
46   -
47   -BR_REGISTER(Transform, DropFrames)
48   -
49   -} // namespace br
50   -
51   -#include "video/drop.moc"