123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- #ifndef KMeansMatlabINCLUDE
- #define KMeansMatlabINCLUDE
- #include "core/vector/VectorT.h"
- #include "core/vector/MatrixT.h"
- #include "core/basics/Config.h"
- #include "ClusterAlgorithm.h"
- namespace OBJREC {
- class KMeansMatlab : public ClusterAlgorithm
- {
- protected:
- int noClasses;
-
-
- std::string kmeansDir;
-
-
- std::string matlabExec;
-
-
- std::string matlabArgs;
-
-
- std::string inputFN;
-
-
- std::string outputFN;
- FILE *matlabPipe;
-
- int compute_prototypes ( const NICE::VVector & features,
- NICE::VVector & prototypes,
- std::vector<double> & weights,
- const std::vector<int> & assignment );
- public:
-
-
- KMeansMatlab( const NICE::Config *conf, int noClasses );
-
-
- virtual ~KMeansMatlab();
-
- void cluster ( const NICE::VVector & features,
- NICE::VVector & prototypes,
- std::vector<double> & weights,
- std::vector<int> & assignment );
- };
- }
- #endif
|