Homogeneous_color_base 用法的示例程序

Boost.GIL库中Homogeneous_color_base用法示例
392 篇文章 ¥29.90 ¥99.00
本文介绍了一个使用Boost.GIL库中Homogeneous_color_base类的示例程序,展示了如何创建、访问和修改RGB颜色空间像素值。通过包含相关头文件,使用命名空间,创建RGB颜色空间的像素对象,并利用成员函数操作颜色通道,实现对像素值的读写。此示例有助于理解Homogeneous_color_base在图像处理中的应用。

Homogeneous_color_base 用法的示例程序

#include <iostream>
#include <boost/gil/gil_all.hpp>

int main() {
   
   
    using namespace boost
root@autodl-container-a53a4d9718-aacfe17b:~/autodl-tmp/detr/util# python plot_utils.py plot_utils.py::plot_logs info: logs param expects a list argument, converted to list[Path]. /root/autodl-tmp/detr/util/plot_utils.py:65: FutureWarning: DataFrame.interpolate with object dtype is deprecated and will raise in a future version. Call obj.infer_objects(copy=False) before interpolating instead. df.interpolate().ewm(com=ewm_col).mean().plot( TypeError: float() argument must be a string or a real number, not 'list' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/root/miniconda3/lib/python3.12/site-packages/pandas/core/window/rolling.py", line 371, in _prep_values values = ensure_float64(values) ^^^^^^^^^^^^^^^^^^^^^^ File "pandas/_libs/algos_common_helper.pxi", line 42, in pandas._libs.algos.ensure_float64 ValueError: setting an array element with a sequence. The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/root/miniconda3/lib/python3.12/site-packages/pandas/core/window/rolling.py", line 489, in _apply_columnwise arr = self._prep_values(arr) ^^^^^^^^^^^^^^^^^^^^^^ File "/root/miniconda3/lib/python3.12/site-packages/pandas/core/window/rolling.py", line 373, in _prep_values raise TypeError(f"cannot handle this type -> {values.dtype}") from err TypeError: cannot handle this type -> object The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/root/autodl-tmp/detr/util/plot_utils.py", line 113, in <module> plot_logs(logs=Path('../outputs/detrcss03/'),fields=('class_error', 'loss_bbox_unscaled', 'mAP'), ewm_col=0, log_name='log.txt') File "/root/autodl-tmp/detr/util/plot_utils.py", line 65, in plot_logs df.interpolate().ewm(com=ewm_col).mean().plot( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/miniconda3/lib/python3.12/site-packages/pandas/core/window/ewm.py", line 565, in mean return self._apply(window_func, name="mean", numeric_only=numeric_only) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/miniconda3/lib/python3.12/site-packages/pandas/core/window/rolling.py", line 619, in _apply return self._apply_columnwise(homogeneous_func, name, numeric_only) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/miniconda3/lib/python3.12/site-packages/pandas/core/window/rolling.py", line 491, in _apply_columnwise raise DataError( pandas.errors.DataError: Cannot aggregate non-numeric type: object
06-22
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符  | 博主筛选后可见
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值