In k means, If a cluster is empty FORB::meanValue() will call relase() on the cv::Mat/TDescriptor parameter (i.e. clusters[c]). This will lead to a segfault in FORB::distance(). Therefore, if the cv::Mat is empty after meanValue(), it needs to be erased from the clusters vector before proceeding.
In k means, If a cluster is empty FORB::meanValue() will call relase() on the cv::Mat/TDescriptor parameter (i.e. clusters[c]). This will lead to a segfault in FORB::distance(). Therefore, if the cv::Mat is empty after meanValue(), it needs to be erased from the clusters vector before proceeding.