在opencv中合并两个cvHistograms

发布于 2024-12-22 05:42:09 字数 172 浏览 2 评论 0原文

有没有办法合并两个 CvHistograms? 假设我们有 CvHistogram* hist1 和 CvHistogram* hist2。

那么,是否有一种自动方法来生成第三个直方图 (hist3),并添加 hist1 和 hist2 上的每种颜色外观,还是我必须手动执行?

非常感谢, 迪莫斯。

Is there a way to merge two CvHistograms?
Say we have CvHistogram* hist1 and CvHistogram* hist2.

Then, is there an automated way to produce a third histogram (hist3) with the addition of each color appearance on hist1 and hist2, or do I have to do it manually?

Many thanks,
Dimos.

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

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

发布评论

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

评论(1

又怨 2024-12-29 05:42:09

不。

令人失望,但没有方便的功能可以为您做到这一点。

但是,如果您想使用 C++ 接口,则直方图存储在 mat 对象中。您可以使用为矩阵定义的所有函数和运算符。

你会做的

h3 = h1 + h2;

No.

Disappointing, but there is no handy function to do that for you.

But, if you want to use the C++ interface, the histogram is stored in a mat object. And you can usee all the function and operators define for matrices.

And you'll can do

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