Compute Graph Framework SDK Reference  5.16
dwCameraChannelNode.hpp
Go to the documentation of this file.
1
2//
3// Notice
4// ALL NVIDIA DESIGN SPECIFICATIONS AND CODE ("MATERIALS") ARE PROVIDED "AS IS" NVIDIA MAKES
5// NO REPRESENTATIONS, WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
6// THE MATERIALS, AND EXPRESSLY DISCLAIMS ANY IMPLIED WARRANTIES OF NONINFRINGEMENT,
7// MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8//
9// NVIDIA CORPORATION & AFFILIATES assumes no responsibility for the consequences of use of such
10// information or for any infringement of patents or other rights of third parties that may
11// result from its use. No license is granted by implication or otherwise under any patent
12// or patent rights of NVIDIA CORPORATION & AFFILIATES. No third party distribution is allowed unless
13// expressly authorized by NVIDIA. Details are subject to change without notice.
14// This code supersedes and replaces all information previously supplied.
15// NVIDIA CORPORATION & AFFILIATES products are not authorized for use as critical
16// components in life support devices or systems without express written approval of
17// NVIDIA CORPORATION & AFFILIATES.
18//
19// SPDX-FileCopyrightText: Copyright (c) 2018-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
20// SPDX-License-Identifier: LicenseRef-NvidiaProprietary
21//
22// NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
23// property and proprietary rights in and to this material, related
24// documentation and any modifications thereto. Any use, reproduction,
25// disclosure or distribution of this material and related documentation
26// without an express license agreement from NVIDIA CORPORATION or
27// its affiliates is strictly prohibited.
28//
30
31#ifndef DW_FRAMEWORK_CAMERA_NODE_HPP_
32#define DW_FRAMEWORK_CAMERA_NODE_HPP_
33
34#include <dwcgf/node/Node.hpp>
37#include <dwcgf/port/Port.hpp>
39#include <dwcgf/pass/Pass.hpp>
41
42#include <dwframework/dwnodes/common/SensorCommonTypes.hpp>
43/* Need to include the appropriate ChannelPacketTypes.hpp since port initialization requires
44 the parameter_trait overrides. Otherwise, it will be considered as a packet of generic type. */
45//#include <dwframework/dwnodes/common/ChannelPacketTypes.hpp>
47#include <dwframework/dwnodes/common/channelpackets/SelfCalibrationTypes.hpp>
48#include <dwframework/dwnodes/common/channelpackets/Rig.hpp>
49
50#include <dw/sensors/Sensors.h>
51#include <dw/sensors/SensorExtras.h>
52#include <dw/sensors/SensorStats.h>
53#include <dw/sensors/camera/Camera.h>
54
55namespace dw
56{
57namespace framework
58{
59
60class dwCameraChannelNodeImpl;
61
63{
64 char8_t const* sensorName;
65 cudaStream_t cudaStream;
67 dwConstRigHandle_t rig;
68 dwSALHandle_t sal;
69 dw::core::FixedString<32> frameSkipMask;
70 dwImageProperties imageProperties;
71};
72
74{
75public:
76 static constexpr char LOG_TAG[] = "dwCameraChannelNode";
77
78 static constexpr auto describeInputPorts()
79 {
81 DW_DESCRIBE_PORT(dwCalibratedExtrinsics, "SENSOR_EXTRINSICS"_sv),
82 DW_DESCRIBE_PORT(dwTime_t, "VIRTUAL_SYNC_TIME"_sv),
83 DW_DESCRIBE_PORT(dwImageHandle_t, "IMAGE_NATIVE_PROCESSED"_sv));
84 };
85 static constexpr auto describeOutputPorts()
86 {
88 DW_DESCRIBE_PORT(dwSensorNodeProperties, "SENSOR_PROPERTIES"_sv),
89 DW_DESCRIBE_PORT(dwFThetaCameraConfig, "INTRINSICS"_sv),
90 DW_DESCRIBE_PORT(dwImageHandle_t, "IMAGE_NATIVE_PROCESSED"_sv),
91 DW_DESCRIBE_PORT(dwTime_t, "IMAGE_TIMESTAMP"_sv),
92 DW_DESCRIBE_PORT(dwTime_t, "NEXT_IMAGE_TIMESTAMP"_sv),
93 DW_DESCRIBE_PORT(dwSensorStats, "SENSOR_STATS"_sv),
94 DW_DESCRIBE_PORT(dwSensorTsAndID, "IMAGE_TIMESTAMP_AND_ID"_sv));
95 };
96
97 static constexpr auto describePasses()
98 {
100 describePass("SETUP"_sv, DW_PROCESSOR_TYPE_CPU),
101 describePass("PROCESSED_OUTPUT"_sv, DW_PROCESSOR_TYPE_GPU),
102 describePass("TEARDOWN"_sv, DW_PROCESSOR_TYPE_CPU));
103 };
104
105 dwSensorType getSensorType() const
106 {
107 return DW_SENSOR_CAMERA;
108 }
109
110 static std::unique_ptr<dwCameraChannelNode> create(ParameterProvider& provider);
111
112 static constexpr auto describeParameters()
113 {
115 describeConstructorArgument<dwCameraChannelNodeParams>(
117 const char*,
119 "cameraIndex"_sv,
122 dwImageProperties,
124 "cameraIndex"_sv,
127 cudaStream_t,
128 "streamIndex"_sv,
131 bool,
132 "useEEPROMIntrinsics"_sv,
135 dwConstRigHandle_t,
138 dwSALHandle_t,
140 describeConstructorArgument<dwContextHandle_t>(
142 dwContextHandle_t)));
143 }
144
146 const dwContextHandle_t ctx);
147};
148}
149}
150#endif // DW_FRAMEWORK_CAMERA_NODE_HPP_
#define DW_DESCRIBE_INDEX_PARAMETER_WITH_SEMANTIC(TYPE_NAME, SEMANTIC_TYPE_NAME, args...)
#define DW_DESCRIBE_INDEX_PARAMETER(TYPE_NAME, args...)
#define DW_DESCRIBE_UNNAMED_PARAMETER(TYPE_NAME, args...)
#define DW_DESCRIBE_PARAMETER(TYPE_NAME, args...)
#define DW_DESCRIBE_PORT(TYPE_NAME, NAME, args...)
The interface to access parameter values identified by name and/or (semantic) type.
static constexpr auto describeInputPorts()
dwCameraChannelNode(dwCameraChannelNodeParams const &params, const dwContextHandle_t ctx)
static std::unique_ptr< dwCameraChannelNode > create(ParameterProvider &provider)
static constexpr auto describeOutputPorts()
static constexpr auto describeParameters()
constexpr std::tuple describeConstructorArguments()
constexpr PassDescriptorT< 0 > describePass(dw::core::StringView &&name, dwProcessorType processorType)
constexpr auto describePassCollection(const Args &&... args) -> std::tuple< Args... >
constexpr auto describePortCollection(Args &&... args) -> dw::core::Tuple< Args... >
Definition: Buffer.hpp:40