gpt4 book ai didi

c++ - 如何在 opencv 中将 QPointf 转换为 Point?

转载 作者:太空宇宙 更新时间:2023-11-03 22:54:34 31 4
gpt4 key购买 nike

  • 我有一些点列表,存储在 QList<QPointF>

  • 但现在我想在 opencv 中将 QPointF 转换为 Point。我该怎么做。

最佳答案

QPointF 默认保存 xy 值作为 double,而 openCV 的 Point_ 是一个模板,所以:

Point_<double> convert(const QPointF & pt)
{
return Point_<double>(pt.x(), pt.y());
}

关于c++ - 如何在 opencv 中将 QPointf 转换为 Point?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33299250/

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