Commit c522f25b536938e8b6b4968779426e6183beeaab
1 parent
f7e01930
remove verifydetection
Showing
1 changed file
with
0 additions
and
59 deletions
openbr/plugins/metadata/verifydetection.cpp deleted
| 1 | -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * | |
| 2 | - * Copyright 2015 Rank One Computing 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 Check if a the automated face detection contains the landmarks corresponding | |
| 25 | - * to the tempate metadata. If not, drop the template. This is meant for use | |
| 26 | - * during training, where the landmarks will be ground truth'd. If one wants to | |
| 27 | - * using a ground truth bounding box instead, then convert the BB to a landmark. | |
| 28 | - * \br_property int index Index of the landmark to be used. | |
| 29 | - * \br_property QString inputVariable Metadata key for the rect. | |
| 30 | - * \author Brendan Klare \cite bklare | |
| 31 | - */ | |
| 32 | -class VerifyDetectionTransform : public UntrainableMetaTransform | |
| 33 | -{ | |
| 34 | - Q_OBJECT | |
| 35 | - Q_PROPERTY(int index READ get_index WRITE set_index RESET reset_index STORED false) | |
| 36 | - Q_PROPERTY(QString inputVariable READ get_inputVariable WRITE set_inputVariable RESET reset_inputVariable STORED false) | |
| 37 | - BR_PROPERTY(int, index, 14) | |
| 38 | - BR_PROPERTY(QString, inputVariable, "Face") | |
| 39 | - | |
| 40 | - void project(const Template &src, Template &dst) const | |
| 41 | - { | |
| 42 | - TemplateList temp; | |
| 43 | - project(TemplateList() << src, temp); | |
| 44 | - if (!temp.isEmpty()) dst = temp.first(); | |
| 45 | - } | |
| 46 | - | |
| 47 | - void project(const TemplateList &src, TemplateList &dst) const | |
| 48 | - { | |
| 49 | - for (int i = 0; i < src.size(); i++) | |
| 50 | - if (src[i].file.get<QRectF>(inputVariable).contains(src[i].file.points()[index])) | |
| 51 | - dst.append(src[i]); | |
| 52 | - } | |
| 53 | -}; | |
| 54 | - | |
| 55 | -BR_REGISTER(Transform, VerifyDetectionTransform) | |
| 56 | - | |
| 57 | -} // namespace br | |
| 58 | - | |
| 59 | -#include "metadata/verifydetection.moc" |