Commit 62aba1681632cdef130a00531bd3c75875846016
1 parent
8dbaa9c3
remove rootnorm
Showing
1 changed file
with
0 additions
and
53 deletions
openbr/plugins/imgproc/rootnorm.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 | -using namespace cv; | |
| 20 | - | |
| 21 | -namespace br | |
| 22 | -{ | |
| 23 | - | |
| 24 | -/*! | |
| 25 | - * \ingroup transforms | |
| 26 | - * \brief dst=sqrt(norm_L1(src)) proposed as RootSIFT (see paper) | |
| 27 | - * \br_paper Arandjelovic, Relja, and Andrew Zisserman. | |
| 28 | - * "Three things everyone should know to improve object retrieval." | |
| 29 | - * Computer Vision and Pattern Recognition (CVPR), 2012 IEEE Conference on. IEEE, 2012. | |
| 30 | - * \author Josh Klontz \cite jklontz | |
| 31 | - */ | |
| 32 | -class RootNormTransform : public UntrainableTransform | |
| 33 | -{ | |
| 34 | - Q_OBJECT | |
| 35 | - | |
| 36 | - void project(const Template &src, Template &dst) const | |
| 37 | - { | |
| 38 | - const Mat &m = src; | |
| 39 | - dst.m() = Mat(m.rows, m.cols, m.type()); | |
| 40 | - for (int i=0; i<m.rows; i++) { | |
| 41 | - Mat temp; | |
| 42 | - cv::normalize(m.row(i), temp, 1, 0, NORM_L1); | |
| 43 | - cv::sqrt(temp, temp); | |
| 44 | - temp.copyTo(dst.m().row(i)); | |
| 45 | - } | |
| 46 | - } | |
| 47 | -}; | |
| 48 | - | |
| 49 | -BR_REGISTER(Transform, RootNormTransform) | |
| 50 | - | |
| 51 | -} // namespace br | |
| 52 | - | |
| 53 | -#include "imgproc/rootnorm.moc" |