Commit dce0a076f110a74c8a7b01ce7c39487467b12d38
1 parent
6f7b3f60
remove hog
Showing
1 changed file
with
0 additions
and
56 deletions
openbr/plugins/imgproc/hog.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 <opencv2/objdetect/objdetect.hpp> | |
| 18 | - | |
| 19 | -#include <openbr/plugins/openbr_internal.h> | |
| 20 | - | |
| 21 | -using namespace cv; | |
| 22 | - | |
| 23 | -namespace br | |
| 24 | -{ | |
| 25 | - | |
| 26 | -/*! | |
| 27 | - * \ingroup transforms | |
| 28 | - * \brief OpenCV HOGDescriptor wrapper | |
| 29 | - * \br_link http://docs.opencv.org/modules/gpu/doc/object_detection.html | |
| 30 | - * \author Austin Blanton \cite imaus10 | |
| 31 | - */ | |
| 32 | -class HoGDescriptorTransform : public UntrainableTransform | |
| 33 | -{ | |
| 34 | - Q_OBJECT | |
| 35 | - | |
| 36 | - HOGDescriptor hog; | |
| 37 | - | |
| 38 | - void project(const Template &src, Template &dst) const | |
| 39 | - { | |
| 40 | - std::vector<float> descriptorVals; | |
| 41 | - std::vector<Point> locations; | |
| 42 | - Size winStride = Size(0,0); | |
| 43 | - Size padding = Size(0,0); | |
| 44 | - foreach (const Mat &rect, src) { | |
| 45 | - hog.compute(rect, descriptorVals, winStride, padding, locations); | |
| 46 | - Mat HoGFeats(descriptorVals, true); | |
| 47 | - dst += HoGFeats; | |
| 48 | - } | |
| 49 | - } | |
| 50 | -}; | |
| 51 | - | |
| 52 | -BR_REGISTER(Transform, HoGDescriptorTransform) | |
| 53 | - | |
| 54 | -} // namespace br | |
| 55 | - | |
| 56 | -#include "imgproc/hog.moc" |