OpenCV的partition()底层算法

标签 opencv machine-learning cluster-analysis

有谁知道使用什么算法here

我想实现这个函数来进行检测的窗口分组。

谢谢。

最佳答案

如果您查看partition函数的OpenCV源代码,您将看到以下注释:

// This function splits the input sequence or set into one or more equivalence classes and
// returns the vector of labels - 0-based class indexes for each element.
// predicate(a,b) returns true if the two sequence elements certainly belong to the same class.
//
// The algorithm is described in "Introduction to Algorithms"
// by Cormen, Leiserson and Rivest, the chapter "Data structures for disjoint sets"
template<typename _Tp, class _EqPredicate> int partition( const vector<_Tp>& _vec, vector<int>& labels, _EqPredicate predicate=_EqPredicate())
{
    // ... etc.
}

这为您提供了源代码和算法引用。

所以,这是第 21 章 in this book .

关于OpenCV的partition()底层算法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31289929/

相关文章:

c++ - 使用 openCV 和 fftw3 Visual Studio 2010 时出现链接器错误

linux - Debian 使用 IPP :/usr/bin/ld: cannot find -llibsvml. 编译 OpenCV 示例,因此 collect2: error: ld returned 1 exit status

algorithm - 在数学上如何将分类结果与聚类结果进行比较

algorithm - k-means 输入应该包含唯一值还是所有值(也重复)?

python - findHomography 产生不准确的变换矩阵

android - Android 应用程序中的 SQLite-sync 同步框架

r - 自定义 ML 函数不起作用 : undefined columns selected

machine-learning - 吉布斯抽样给出的概率很小

algorithm - Infomap社区检测理解

r - 如何在 R 中绘制用 kmeans 获得的簇的 3D 图?