Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/shingt/fuzzycmeans

Fuzzy C-Means Clustering implementation using C++ and OpenCV interface.
https://github.com/shingt/fuzzycmeans

c-plus-plus fuzzy-cmeans-clustering opencv

Last synced: about 21 hours ago
JSON representation

Fuzzy C-Means Clustering implementation using C++ and OpenCV interface.

Awesome Lists containing this project

README

        

# FuzzyCMeans

* Fuzzy C-Means clustering implementation using OpenCV.

## Usage

```cpp
cv::Mat dataset = (cv::Mat_ (4, 2)
<<
0, 0,
5, 4,
100, 150,
200, 102);

static unsigned int number_clusters = 2;
float fuzziness = 1.5;
float epsilon = 0.01; // Threshold

SoftCDistType dist_type = kSoftCDistL2;
SoftCInitType init_type = kSoftCInitKmeansPP;
SoftC::Fuzzy f (dataset, number_clusters, fuzziness, epsilon, dist_type, init_type);
unsigned int num_iterations = 100;
f.clustering (num_iterations);

cv::Mat centroids = f.get_centroids_ ();
std::cout << centroids << std::endl;

cv::Mat memberships = f.get_membership_ ();
std::cout << memberships << std::endl;
}
```

#### Copyright (c) 2014 Shinichi Goto All rights reserved.