Agg2图形引擎:C++中的高保真2D图形渲染

版权申诉
0 下载量 84 浏览量 更新于2024-11-10 收藏 644KB ZIP 举报
资源摘要信息:"Agg2.zip是一个包含High Fidelity agg_graphics engine的压缩包。该引擎是一个高质量的2D图形渲染引擎,专门为C++语言开发。它的核心是Anti-Grain Geometry (AGG)库,这是一个强大的2D图形处理库。" Anti-Grain Geometry (AGG)是一个开源的2D图形渲染库,它提供了一套丰富的工具和算法,用于高质量的图形渲染。AGG的目的是提供一个高度优化、面向对象的API,可以满足各种图形处理需求,如字体渲染、图像处理等。 High Fidelity agg_graphics engine是基于AGG库开发的,旨在为C++用户提供一个高性能的2D图形渲染解决方案。它具有高保真度,能够处理复杂的图形任务,并保持图像的质量和清晰度。 agg2.zip中可能包含了这个引擎的所有相关文件,包括源代码、示例程序、文档等。这些文件可以帮助开发者快速理解和使用该引擎。 Agg2.zip的标签"high_fidelity"和"agg"进一步强调了这个引擎的特点。"high_fidelity"表示这个引擎在图形渲染上具有高保真度,能够生成高质量的图像。"agg"则表明这个引擎是基于AGG库开发的。 总的来说,agg2.zip是一个非常有价值的资源,尤其是对于需要进行高质量2D图形渲染的C++开发者。它提供了一个强大的工具集,可以处理各种复杂的图形任务,同时保持了图像的高质量和清晰度。
2023-06-01 上传

class TemporalBlock(nn.Module): """ Temporal block with the following layers: - 2x3x3, 1x3x3, spatio-temporal pyramid pooling - dropout - skip connection. """ def __init__(self, in_channels, out_channels=None, use_pyramid_pooling=False, pool_sizes=None): super().__init__() self.in_channels = in_channels self.half_channels = in_channels // 2 self.out_channels = out_channels or self.in_channels self.kernels = [(2, 3, 3), (1, 3, 3)] # Flag for spatio-temporal pyramid pooling self.use_pyramid_pooling = use_pyramid_pooling # 3 convolution paths: 2x3x3, 1x3x3, 1x1x1 self.convolution_paths = [] for kernel_size in self.kernels: self.convolution_paths.append( nn.Sequential( conv_1x1x1_norm_activated(self.in_channels, self.half_channels), CausalConv3d(self.half_channels, self.half_channels, kernel_size=kernel_size), ) ) self.convolution_paths.append(conv_1x1x1_norm_activated(self.in_channels, self.half_channels)) self.convolution_paths = nn.ModuleList(self.convolution_paths) agg_in_channels = len(self.convolution_paths) * self.half_channels if self.use_pyramid_pooling: assert pool_sizes is not None, "setting must contain the list of kernel_size, but is None." reduction_channels = self.in_channels // 3 self.pyramid_pooling = PyramidSpatioTemporalPooling(self.in_channels, reduction_channels, pool_sizes) agg_in_channels += len(pool_sizes) * reduction_channels # Feature aggregation self.aggregation = nn.Sequential( conv_1x1x1_norm_activated(agg_in_channels, self.out_channels),) if self.out_channels != self.in_channels: self.projection = nn.Sequential( nn.Conv3d(self.in_channels, self.out_channels, kernel_size=1, bias=False), nn.BatchNorm3d(self.out_channels), ) else: self.projection = None网络结构是什么?

2023-06-10 上传

优化SQL select round( ohbmc.after_actual_amount/zz,0) cost_moneyi ,count(distinct case when ddp.orig_plan_rid = -1 then null else ddp.orig_plan_rid end) AS orig_num ,array_agg (dlt.state) AS loading_state ,count(DISTINCT CASE WHEN ddp.sale_planid = -1 THEN NULL ELSE ddp.sale_planid END) AS saleid_num--销地已计划数量 ,array_agg(dto.state) AS saletransport_state from ( SELECT id AS origin_planid , unnest(cabinet_rule_id) cabinet_rule_id -- 判断 next_plan_id 本身是空和 next_plan_id 为 {} ,unnest(case when (next_plan_id is null or next_plan_id[1] is null) then ARRAY[-1]::integer[] else next_plan_id end) as sale_planid --销地计划 , case when dp.plan_receiver_id is null then -1 else dp.plan_receiver_id end orig_plan_rid --产地计划 FROM ods.ods_durian_delivery_plan as dp left join ods.ods_hl_commodity_category as hcc on hcc.category_id = dp.category_id WHERE dp.type = 'ORIGIN' AND dp.deleted = 99 AND dp.tenant_id = 1 and cabinet_rule_id='{8}'or cabinet_rule_id='{9}'or cabinet_rule_id='{10000005}'---取白心火龙果 AND hcc.category_name = '火龙果') as ddp LEFT JOIN ods.ods_durian_loading_task AS dlt ON dlt.plan_id = ddp.origin_planid and dlt.plan_type='ORIGIN' AND dlt.deleted = 99 LEFT JOIN ods.ods_durian_transport_order AS dto ON dto.plan_id = ddp.sale_planid AND dto.deleted = 99 LEFT JOIN ods.ods_durian_receipt_task AS drt ON drt.plan_id = ddp.sale_planid AND drt.deleted = 99 LEFT JOIN ods.ods_durian_transport_order AS dto1 ON dto1.plan_id = ddp.sale_planid AND dto1.sort_no = 1 AND dto1.deleted = 99 left join (select odlsi.plan_id,sum(odlsi.quantity) zz from ods.ods_durian_loading_sku_item odlsi group by 1) odlsi on odlsi.plan_id=dlt.plan_id left join (select *, unnest(case when ( odbr.bill_main_id is null or odbr.bill_main_id is null) then ARRAY[-1]::integer[] else odbr.bill_main_id end) bill_main_id_r from ods.ods_durian_bill_rel odbr) odbr on odbr.data_id= dlt.plan_id and odbr.data_type='ORIGIN_FEE' left join ods.ods_hl_bill_main_currency ohbmc on ohbmc.bill_main_id=odbr.bill_main_id_r and ohbmc.deleted=99 group by 1;

2023-06-13 上传