상속: IClassifier
예제 #1
0
        public HsvClassifier()
        {
            kmeans = new KNearestClassifier();

            Dictionary<float[], int> data = new Dictionary<float[], int>();
            foreach (KeyValuePair<float[], int> item in GenerateTrainPairs())
            {
                data.Add(item.Key, item.Value);
            }
            kmeans.Train(data);
        }
예제 #2
0
        public BgrClassifier()
        {
            kmeans = new KNearestClassifier();

            Dictionary<float[], string> data = new Dictionary<float[], string>();
            foreach (KeyValuePair<float[], string> item in TrainCsv())
            {
                data.Add(item.Key, item.Value);
            }
            kmeans.Train(data);
        }