OpenCV CalcPca 输入数据

发布于 2024-10-09 07:08:40 字数 187 浏览 0 评论 0原文

我正在尝试使用“eigenfaces”用opencv实现人脸识别训练功能。我有示例数据,但找不到有关 CalcPCA 函数参数的任何信息。我所知道的是它需要数据矩阵、对平均特征脸矩阵的引用、对特征向量的引用和对特征值矩阵的引用。

我的问题是,我应该如何将多个测试图像矩阵中的数据传递到 CalcPCA 的第一个参数中,以便获得平均特征脸和向量?

I am trying to implement a face recognition training function with opencv, using "eigenfaces". I have the sample data, but I can't find any info on CalcPCA function arguments. All I know is that it takes data matrix, reference to average eigenface matrix, reference to eigen vector, and reference to eigen values matrix.

My question is, how should I pass the data from several test image matrices into the first argument of CalcPCA so I can get the average eigenface and vectors?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

蓝眼泪 2024-10-16 07:08:40

你可以这样做:
例如,您有 10 个 Mat,其中每个数学代表一个图像。
现在您可以创建一个新的 Mat,您可以将之前的 10 个 Mat 放入这个新的 Mat 中。
此时使用Mat.pushback(...)插入10个Mat。
希望这对您有帮助。
马可

You can do in this way:
You have for example 10 Mat where each math represent an image.
Now you can create a new Mat that you can put into this new Mat the previus 10 Mat.
At this point use Mat.pushback(...) to insert the 10 Mat.
Hope this is helpful for you.
Marco

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文