• <xmp id="om0om">
  • <table id="om0om"><noscript id="om0om"></noscript></table>
  • Compute Graph Framework SDK Reference  5.14
    All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
    dwCameraNode.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 DWFRAMEWORK_DWNODES_SENSORS_DWCAMERANODE_DWCAMERANODE_HPP_
    32#define DWFRAMEWORK_DWNODES_SENSORS_DWCAMERANODE_DWCAMERANODE_HPP_
    33
    34#include <dw/sensors/Sensors.h>
    35#include <dw/sensors/camera/Camera.h>
    36#include <dwcgf/node/Node.hpp>
    39#include <dwcgf/pass/Pass.hpp>
    41#include <dwcgf/port/Port.hpp>
    43#include <dwframework/dwnodes/common/channelpackets/Image.hpp>
    44#include <dwframework/dwnodes/common/channelpackets/SelfCalibrationTypes.hpp>
    45#include <dwframework/dwnodes/common/channelpackets/SensorCommonTypes.hpp>
    46#include <dwframework/dwnodes/common/channelpackets/Sensors.hpp>
    47
    48namespace dw
    49{
    50namespace framework
    51{
    52
    53class dwCameraNodeImpl;
    54
    59{
    60 char8_t const* sensorName;
    61 cudaStream_t cudaStream;
    63 dwConstRigHandle_t rig;
    64 dwSALHandle_t sal;
    65 FixedString<32> frameSkipMask;
    66};
    67
    72{
    73public:
    74 // TODO(csketch): FP -- This is used when the logger is called and not just at assignment.
    75 // coverity[autosar_cpp14_a0_1_1_violation] FP: nvbugs/2980283
    76 // coverity[autosar_cpp14_m0_1_4_violation] FP: nvbugs/2980283
    77 static constexpr char8_t LOG_TAG[]{"dwCameraNode"};
    78
    79 // coverity[autosar_cpp14_a7_1_5_violation] RFD Accepted: TID-1984
    80 static constexpr auto describeInputPorts()
    81 {
    82 // TODO(csketch): RFD -- user defined literal being interpreted as c style cast.
    83 // coverity[autosar_cpp14_a5_2_2_violation] RFD Pending: TID-1983
    85 DW_DESCRIBE_PORT(dwCalibratedExtrinsics, "SENSOR_EXTRINSICS"_sv),
    86 DW_DESCRIBE_PORT(dwTime_t, "VIRTUAL_SYNC_TIME"_sv));
    87 };
    88 // coverity[autosar_cpp14_a7_1_5_violation] RFD Accepted: TID-1984
    89 static constexpr auto describeOutputPorts()
    90 {
    91 // TODO(csketch): RFD -- user defined literal being interpreted as c style cast.
    92 // coverity[autosar_cpp14_a5_2_2_violation] RFD Pending: TID-1983
    94 DW_DESCRIBE_PORT(dwSensorNodeProperties, "SENSOR_PROPERTIES"_sv),
    95 DW_DESCRIBE_PORT(dwCameraIntrinsics, "INTRINSICS"_sv),
    96 DW_DESCRIBE_PORT(dwImageHandle_t, "IMAGE_NATIVE_RAW"_sv),
    97 DW_DESCRIBE_PORT(dwImageHandle_t, "IMAGE_NATIVE_PROCESSED"_sv),
    98 DW_DESCRIBE_PORT(dwImageHandle_t, "IMAGE_PROCESSED_RGBA"_sv),
    99 DW_DESCRIBE_PORT(dwTime_t, "IMAGE_TIMESTAMP"_sv),
    100 DW_DESCRIBE_PORT(dwTime_t, "NEXT_IMAGE_TIMESTAMP"_sv),
    101 DW_DESCRIBE_PORT(dwSensorTsAndID, "IMAGE_TIMESTAMP_AND_ID"_sv));
    102 };
    103
    104 // coverity[autosar_cpp14_a7_1_5_violation] RFD Accepted: TID-1984
    105 static constexpr auto describePasses()
    106 {
    108 describePass(StringView{"SETUP"}, DW_PROCESSOR_TYPE_CPU),
    109 describePass(StringView{"RAW_OUTPUT"}, DW_PROCESSOR_TYPE_GPU),
    110 describePass(StringView{"PROCESSED_OUTPUT"}, DW_PROCESSOR_TYPE_GPU),
    111 describePass(StringView{"PROCESSED_RGBA_OUTPUT"}, DW_PROCESSOR_TYPE_GPU),
    112 describePass(StringView{"TEARDOWN"}, DW_PROCESSOR_TYPE_CPU));
    113 };
    114
    115 dwSensorType getSensorType() const
    116 {
    117 return DW_SENSOR_CAMERA;
    118 }
    119
    120 dwStatus getImageProperties(dwImageProperties* prop, dwCameraOutputType type);
    121 dwStatus getCameraProperties(dwCameraProperties* prop);
    122
    123 static std::unique_ptr<dwCameraNode> create(ParameterProvider& provider);
    124
    125 // coverity[autosar_cpp14_a7_1_5_violation] RFD Accepted: TID-1984
    126 static constexpr auto describeParameters()
    127 {
    128 // TODO(csketch): RFD -- user defined literal being interpreted as c style cast.
    129 // coverity[autosar_cpp14_a5_2_2_violation] RFD Pending: TID-1983
    130 return describeConstructorArguments<dwCameraNodeParams, dwContextHandle_t>(
    133 const char*,
    135 "cameraIndex"_sv,
    138 cudaStream_t,
    139 "streamIndex"_sv,
    142 bool,
    143 "useEEPROMIntrinsics"_sv,
    146 dwConstRigHandle_t,
    149 dwSALHandle_t,
    152 dw::core::FixedString<32>,
    153 "frameSkipMask"_sv,
    157 dwContextHandle_t)));
    158 }
    159
    161 const dwContextHandle_t ctx);
    162
    163 // constructors with dwSensorParams
    164 dwCameraNode(const dwSensorParams& params,
    165 cudaStream_t cudaStream,
    166 dwSALHandle_t sal,
    167 dwContextHandle_t ctx);
    168 dwCameraNode(const char* sensorName,
    169 dwConstRigHandle_t rigHandle,
    170 dwSALHandle_t sal,
    171 dwContextHandle_t ctx,
    172 const FixedString<32>& frameSkipMask);
    173 dwCameraNode(const dwSensorParams& params,
    174 dwSALHandle_t sal,
    175 dwContextHandle_t ctx);
    176};
    177}
    178}
    179#endif // DWFRAMEWORK_DWNODES_SENSORS_DWCAMERANODE_DWCAMERANODE_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, args...)
    The interface to access parameter values identified by name and/or (semantic) type.
    static constexpr auto describeInputPorts()
    static constexpr auto describeOutputPorts()
    static constexpr auto describePasses()
    dwStatus getImageProperties(dwImageProperties *prop, dwCameraOutputType type)
    static constexpr char8_t LOG_TAG[]
    dwSensorType getSensorType() const
    dwCameraNode(const dwSensorParams &params, cudaStream_t cudaStream, dwSALHandle_t sal, dwContextHandle_t ctx)
    dwCameraNode(const char *sensorName, dwConstRigHandle_t rigHandle, dwSALHandle_t sal, dwContextHandle_t ctx, const FixedString< 32 > &frameSkipMask)
    dwCameraNode(dwCameraNodeParams const &params, const dwContextHandle_t ctx)
    static constexpr auto describeParameters()
    dwCameraNode(const dwSensorParams &params, dwSALHandle_t sal, dwContextHandle_t ctx)
    static std::unique_ptr< dwCameraNode > create(ParameterProvider &provider)
    dwStatus getCameraProperties(dwCameraProperties *prop)
    constexpr auto describeConstructorArgument(const Args &&... args) -> dw::core::Tuple< Args... >
    constexpr auto describePassCollection(const Args &&... args) -> std::tuple< Args... >
    constexpr auto describePortCollection(Args &&... args) -> dw::core::Tuple< Args... >
    dwRigHandle_t rigHandle
    Definition: dwRigNode.hpp:56
    constexpr PassDescriptorT< 0 > describePass(dw::core::StringView const &&name, dwProcessorType processorType)
    Construction parameters for dwCameraNode.
    Definition: Buffer.hpp:40
    人人超碰97caoporen国产