www.pudn.com > firev0.01.rar > featureextraction.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   featureextraction.hpp
 * @author Thomas Deselaers
 * @date   Mon Jun 23 19:05:57 2003
 * 
 * @brief Extract invariant feature histograms from an image.
 * 
 * 
 */


#ifndef __featureextraction_hpp
#define __featureextraction_hpp

#include "rgbimage.hpp"
#include "mdhistogram.hpp"
#include "colorpixel.hpp"
#include

/** 
 * Extract invariant feature histograms from an image. This function
 * was needed for sobel filtered images and is probably not used
 * anymore.
 * 
 * @param image the RGBImage to be processed
 * @param suffix the suffix of the file to be written
 * @param featureFunctionName the name of the feature function to be used. 
 * @param steps the number of steps per dimension to be used for the histogram
 * @param samples the number of samples to be used for estimation. If
 * samples==-1 then the histogram is calculated exact. If there is any
 * other value only this amount of features is extracted randomly and
 * the histogram is "monte carlo estimated".
 */
const ::img::MDHistogram < ::img::ColorPixel >  
featureextractionRGB(const ::img::RGBImage image,  
                     const string &featureFunctionName, 
                     const int steps, 
                     const int samples, 
                     const bool spread=false) ;



// img::MDHistogram< img::ColorPixel > featureextractionRGB(::img::RGBImage image,  const string &featureFunctionName, const int samples);


/** 
 * Extract invariant feature histograms from an image.
 * 
 * @param filename the image to be processed
 * @param suffix the suffix of the file to be written
 * @param featureFunctionName the name of the feature function to be used. 
 * @param steps the number of steps per dimensionto be used for the histogram
 * @param samples the number of samples to be used for estimation. If
 * samples==-1 then the histogram is calculated exact. If there is any
 * other value only this amount of features is extracted randomly and
 * the histogram is "monte carlo estimated".
 */
void featureextractionRGB(const ::std::string &filename, 
                          const ::std::string &suffix,
                          const ::std::string &featureFunctionName, 
                          const int steps, 
                          const int samples,
                          const double scalingStart,
                          const double scalingMulti,
                          const double scalingStop,
                          const int rotationAngle,
                          const ::std::string &cmdline
                          );

/** 
 * Extract invariant feature histograms from an image.
 * 
 * @param filename the image to be processed
 * @param suffix the suffix of the file to be written
 * @param featureFunctionName the name of the feature function to be used. 
 * @param steps the number of steps per dimensionto be used for the histogram
 * @param samples the number of samples to be used for estimation. If
 * samples==-1 then the histogram is calculated exact. If there is any
 * other value only this amount of features is extracted randomly and
 * the histogram is "monte carlo estimated".
 */
void featureextractionGREY(const ::std::string &filename, 
                           const ::std::string &suffix, 
                           const ::std::string& featureFunctionName, 
                           const int steps, 
                           const int samples=-1,
                           const double scalingStart=0.02,
                           const double scalingMulti=1.1,
                           const double scalingStop=8.0,
                           const int rotationAngle=360,
                           const ::std::string &cmdline=""
                           );

#endif