30 std::vector<Pds::Matrix> Block;
31 std::vector<Pds::Matrix> WPI;
32 std::vector<Pds::Matrix> CC;
34 Block=Pds::Matrix::ImportBmpFile(
"imagen1.bmp");
38 Pds::Array<unsigned int> MAPID;
44 MAPID.ExportBmpFile(Pds::Array<unsigned char>(Colors),
"imagen1-kmeans.bmp");
46 WPI =Pds::Image::WhitePatch(Block);
47 CC =Pds::Image::ChromaticityCoordinates(WPI,255);
50 MAPID.ExportBmpFile(Pds::Array<unsigned char>(Colors),
"imagen1-cc-kmeans.bmp");
53 Pds::Matrix::ExportBmpFile(CC[0],CC[1],CC[2],
"imagen1-cc.bmp");
La clase tipo Pds::IterationConf . Esta clase genera una matriz de Nlin lineas y 1 columna....
bool SetMinError(double MinError)
Coloca el valor MinError.
Pds::Matrix Kmeans(Pds::IterationConf &Conf, const std::vector< Pds::Matrix > &Block, unsigned int K, Pds::Array< unsigned int > &IDMAP)
Calculo de los centroides.