set fmt: cur_mode: 3864x2192, hdr: 0
时间: 2024-02-03 12:03:07 浏览: 39
这是一个相机或者图像处理软件输出的信息,它表示当前的图像格式为 3864x2192,且不包含 HDR(高动态范围)信息。其中,3864x2192 表示图像的分辨率,即图像的水平像素数为 3864,垂直像素数为 2192。而 HDR 则是一种图像处理技术,它可以提高图像的动态范围,使得图像在暗部和亮部的细节都能够更好地呈现。
相关问题
/usr/include/spdlog/logger.h:90:9: required from ‘void spdlog::logger::log(spdlog::source_loc, spdlog::level::level_enum, fmt::v8::format_string<T ...>, Args&& ...) [with Args = {cv::Rect_<int>&}; fmt::v8::format_string<T ...> = fmt::v8::basic_format_string<char, cv::Rect_<int>&>]’
这个错误提示出现在 `spdlog` 库的 `logger.h` 文件中,它表示在使用 `spdlog` 记录日志时,传递了一个 `cv::Rect_<int>&` 类型的参数,这个类型无法被格式化输出。具体来说,`fmt` 库不知道如何将这个类型转换成字符串,所以编译器报错了。
为了解决这个问题,你需要为 `cv::Rect_<int>&` 类型提供一个格式化器,告诉 `fmt` 库如何将它转换成字符串。具体的做法是,在你的代码中实现一个 `formatter<cv::Rect_<int>&>` 类型的类,然后在这个类中实现 `format` 函数,将 `cv::Rect_<int>&` 类型转换成字符串。然后将这个格式化器传递给 `spdlog::logger` 对象,让它在记录日志时使用这个格式化器。
下面是一个示例:
```c++
#include <fmt/format.h>
#include <spdlog/spdlog.h>
template <>
struct fmt::formatter<cv::Rect_<int>&> {
template <typename ParseContext>
constexpr auto parse(ParseContext& ctx) { return ctx.begin(); }
template <typename FormatContext>
auto format(const cv::Rect_<int>& rect, FormatContext& ctx) {
return fmt::format_to(ctx.out(), "{{ x:{}, y:{}, width:{}, height:{} }}", rect.x, rect.y, rect.width, rect.height);
}
};
int main() {
auto logger = spdlog::stdout_logger_mt("console");
cv::Rect_<int> rect(10, 20, 30, 40);
logger->info("Rect: {}", rect);
return 0;
}
```
在这个示例中,我们为 `cv::Rect_<int>&` 类型提供了一个格式化器 `formatter<cv::Rect_<int>&>`,然后在使用 `spdlog` 记录日志时,传递了一个 `cv::Rect_<int>&` 类型的参数,让它使用我们自己实现的格式化器输出日志。
type fmt::v7::format_to
I'm sorry, but as an AI language model, I don't have access to specific libraries or programming languages. Can you please provide more context or information about the language or library you are referring to?
相关推荐
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)