gpt4 book ai didi

c++ - opencv格式字符串

转载 作者:行者123 更新时间:2023-11-28 00:20:54 24 4
gpt4 key购买 nike

<分区>

请帮助我有这段代码,我想添加到这个 x 和 y 位置

cv::Rect r = some thing;
std::cout << cv::format("%d, %s (%dx%d)\n", i+1, outfile.c_str(), r.width, r.height);

如何像这样添加x和y我试过了,但没用

std::cout << cv::format("%d, %s (%dx%d)\n", i+1, outfile.c_str(), r.width, r.height, r.x, r.y);

我试了下不行

但是当我添加 r.x 和 r.y 并用 r、height 和 r.width 替换它的工作但我想要高度和宽度以及 x 和 y

      std::cout << cv::format("%d, %s (%dx%d)\n", i+1, outfile.c_str(), r.x, r.y);

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