How do i Apply a Kmeans or KNN segmentation method to images using C++?

i don’t know how to use k-means or KNN algorithm in c++, any help is welcome.

Hi,
you can find kmeans example here and old example here