Is it possible to use OpenCV's K-Means implementation with arbitrary objects?
===

I have a set of objects that don't intuitively fit into a `cv::Mat`, and I want to cluster them.  I have a distance function defined between any two objects, and I'm already including OpenCV into my project, so it seems convenient to use its implementation.

So, my question is, given a defined distance function, can I use OpenCV's k-means clustering implementation when the objects aren't intuitively `cv::Mat` compatible?