我可以只寻找最低的非零特征值,然后得到相应的特征向量。
你知道还有其他更清洁的方法吗?
来自 eigen() 的 lowindex 在当前实现中显然被忽略了 :(
最佳答案
因为它says in the documentation :
eigenvalues – output vector of eigenvalues of the same type as src; the eigenvalues are stored in the descending order.
和
eigenvectors – output matrix of eigenvectors; it has the same size and type as src; the eigenvectors are stored as subsequent matrix rows, in the same order as the corresponding eigenvalues
因此,最低特征值只是特征值 vector 中的最后一个元素,相应的特征向量是特征向量 矩阵的最后一行。
如果最后一个特征值为零(即您的输入是单数),如果您想要最低的非零值,则需要从最后一个条目向上搜索。
关于c++ - 如何找到OpenCV中最低特征值对应的特征向量?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30269753/