/*********************************************************************
 * This file is part of the PRAPI library.
 *
 * Copyright (C) 2001 Topi Mäenpää
 * All rights reserved.
 *
 * This program is free software. You can redistribute and/or modify
 * it under the terms of the free software licence found in the
 * accompanying file "COPYING". The licence terms must always be
 * redistributed with this source file. The above copyright notice
 * must be reproduced in all modified and unmodified copies of this
 * source file.
 *
 * $Revision$
 *********************************************************************/

#ifndef _PCFEATUREEXTRACTOR_H
#define _PCFEATUREEXTRACTOR_H

#include <List.h>
#include <Matrix.h>
#include "../FeatureExtractor.h"

namespace prapi { namespace extras {

	class PCExtractor : public FeatureExtractor<double,util::Matrix<double> >
	{
	public:
		PCExtractor() : _bSplit(true) {}
		
		util::List<double> getFeatureVector(const util::Matrix<double>& img) throw (FeatureExtractionException&);
		void setSplit(bool split) { _bSplit = split; }

	private:
		double l1norm(const util::Matrix<double>& mat);
		bool _bSplit;
	};
	
}}

#endif
