/** 
* @file NegativeFactory.h
* @brief obtain negative examples from some images
* @author Erik Rodner
* @date 11/13/2008

*/
#ifndef NEGATIVEFACTORYINCLUDE
#define NEGATIVEFACTORYINCLUDE

#include "core/vector/VectorT.h"
#include "core/vector/MatrixT.h"
 
#include <vector>
#include <string>

#include "vislearning/cbaselib/LabeledSet.h"
#include "core/vector/VVector.h"
#include "vislearning/features/fpfeatures/ImageFeatures.h"

#include "vislearning/classifier/classifierbase/FeaturePoolClassifier.h"


namespace OBJREC {

/** obtain negative examples from some images */
class NegativeFactory
{

    protected:

    public:
  
	/** simple constructor */
	NegativeFactory();
      
	/** simple destructor */
	virtual ~NegativeFactory();
  
	void createNegatives ( Examples & examples,
			      std::vector<CachedExample *> & cexamples,
			      const LabeledSet *ls,
			      ImageFeatures & imgf,
			      int noImages,
			      int examplesPerImage,
			      int negativeClassSRC,
			      int negativeClassDST,
			      FeaturePoolClassifier *fpc,
			      double & falsePositiveEstimate,
			      const NICE::VVector & bb);
 
	void createNegativesFromText ( Examples & examples,
				      std::vector<CachedExample *> & cexamples,
				      const std::string & filename,
				      ImageFeatures & imgf,
				      int negativeClassDST );

	void createNegativesExhaustiveSearch ( Examples & examples,
				      std::vector<CachedExample *> & cexamples,
				      const LabeledSet *ls,
				      ImageFeatures & imgf,
				      int examplesPerImage,
				      int negativeClassSRC,
				      int negativeClassDST,
				      FeaturePoolClassifier *fpc,
				      double & falsePositiveEstimate,
				      const NICE::VVector & bb,
				      int subsample );
  
};


} // namespace

#endif