gpt4 book ai didi

opencv - 我如何计算 SVD 并验证第一个奇异值与最后一个奇异值的比率是否与 OpenCV 一致?

转载 作者:太空宇宙 更新时间:2023-11-03 20:57:10 28 4
gpt4 key购买 nike

我想验证单应矩阵会给出好的结果,而这个 this answer 有答案 - 但是,我不知道如何实现答案。
那么谁能推荐我如何使用 OpenCV 计算 SVD 并验证第一个奇异值与最后一个奇异值的比率是否合理?

最佳答案

在 OpenCV 中有几种计算 SVD 的方法:

cv::SVD homographySVD(homography, cv::SVD::FULL_UV); // constructor
// or:
homographySVD(newHomography, cv::SVD::FULL_UV); // operator ()
homographySVD.w.at<double>(0, 0); // access the first singular value

// alternatives:
cv::SVD::compute(homography, w); // compute just the singular values
cv::eigen(homography, w);

查看 cv::SVD 的文档和 cv::eigen了解更多详情。

关于opencv - 我如何计算 SVD 并验证第一个奇异值与最后一个奇异值的比率是否与 OpenCV 一致?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16439792/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com