www.pudn.com > firev0.01.rar > featurefunction.hpp
/*
This file is part of the FIRE -- Flexible Image Retrieval System
FIRE is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
FIRE is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with FIRE; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/**
* @file featurefunction.hpp
* @author Thomas Deselaers
* @date Mon Jun 23 19:08:15 2003
*
* @brief Abstract base class for feature functions. only an
* interface is defined.
*/
#ifndef __featurefunction_hpp
#define __featurefunction_hpp
#include "interpolimg.hpp"
#include "interpolrgbimg.hpp"
#include "colorpixel.hpp"
class FeatureFunction {
public:
/**
* Calculate the feature f(X) for translation by (t0,t1) and
* rotation=2*pi*r/R, grey version.
*
* @param image from this image the feature function has to be calculated
* @param t0 assume image is translated by t0 in first direction
* @param t1 assume image is translated by t1 in second direction
* @param r assume image is rotated by r/r*2pi
* @param R number of steps to account for rotations
*
* @return the invariant feature for the given parameters.
*/
virtual double calculate(const ::img::InterpolBaseImage& image,
const int t0,
const int t1,
const int r,
const int R,
const double scale
) const=0;
/**
* Calculate the feature f(X) for translation by (t0,t1) and
* rotation=2*pi*r/R, color version.
*
* @param image from this image the feature function has to be calculated
* @param t0 assume image is translated by t0 in first direction
* @param t1 assume image is translated by t1 in second direction
* @param r assume image is rotated by r/r*2pi
* @param R number of steps to account for rotations
*
* @return the invariant feature for the given parameters.
*/
virtual ::img::ColorPixel calculate(const ::img::InterpolRGBImage& image,
const int t0,
const int t1,
const int r,
const int R,
const double scale
) const=0;
virtual double max() const=0;
};
#endif