hierarchicalClustering with custom distance
How can use cv::hierarchicalClustering with custom distance? how should the operator declaration should be?
for example if I have 2D dataset, I want something like this:
[](auto l, auto r){
return l[0]*r[0]+l[1]r[1];
}
How can I prepare it to be passed to cv::hierarchicalClustering
is that cvflann::hierarchicalClustering ?
@berak yes. but my question about how the distance function should be declared
no idea, if it is possible at all, but Distance is a template object, it needs an operator () and some more things. for sure you won't get away with a simple lambda.. have a look at the L2 implementation
@berak, yup I saw it and that what makes me ask here :D. Thank you for your time :)