• <xmp id="om0om">
  • <table id="om0om"><noscript id="om0om"></noscript></table>
  • Compute Graph Framework SDK Reference  5.8
    All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
    dwFeatureTrackerNode.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) 2019-2022 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_FEATURE_TRACKER_NODE_H_
    32#define DW_FRAMEWORK_FEATURE_TRACKER_NODE_H_
    33
    34#include <dwcgf/node/Node.hpp>
    38#include <dwcgf/port/Port.hpp>
    40/* Need to include the appropriate ChannelPacketTypes.hpp since port initialization requires
    41 the parameter_trait overrides. Otherwise, it will be considered as a packet of generic type. */
    43
    44#include <dw/imageprocessing/featuredetector/FeatureDetector.h>
    45#include <dw/imageprocessing/features/FeatureList.h>
    46#include <dw/imageprocessing/tracking/FeatureTracker_processpipeline.h>
    47
    48namespace dw
    49{
    50namespace framework
    51{
    52
    54{
    55 bool initForCamera;
    56 dwCameraModelHandle_t intrinsic;
    57 dwTransformation3f extrinsic;
    58
    59 dwFeature2DTrackerConfig dwTrackerParams;
    60
    61 cudaStream_t cudaStream;
    62};
    63
    68{
    69public:
    70 static constexpr char LOG_TAG[] = "dwFeatureTrackerNode";
    71
    72 static constexpr auto describeInputPorts()
    73 {
    75 DW_DESCRIBE_PORT(dwPyramidImage, "CURRENT_PYRAMID"_sv, PortBinding::REQUIRED),
    76 DW_DESCRIBE_PORT(dwFeatureArray, "DETECTED_FEATURES"_sv, PortBinding::REQUIRED));
    77 };
    78 static constexpr auto describeOutputPorts()
    79 {
    81 DW_DESCRIBE_PORT(dwFeatureHistoryArray, "FEATURE_HISTORY_CPU"_sv, PortBinding::REQUIRED),
    82 DW_DESCRIBE_PORT(dwFeatureHistoryArray, "FEATURE_HISTORY_GPU"_sv, PortBinding::REQUIRED),
    84 DW_DESCRIBE_PORT(void*, "MODULE_HANDLE"_sv, PortBinding::REQUIRED));
    85 };
    86
    87 static constexpr auto describePasses()
    88 {
    90 describePass("SETUP"_sv, DW_PROCESSOR_TYPE_CPU),
    91 describePass("TRACK_FEATURE"_sv, DW_PROCESSOR_TYPE_GPU),
    92 describePass("COMPACT_FEATURE"_sv, DW_PROCESSOR_TYPE_GPU),
    93 describePass("COPY"_sv, DW_PROCESSOR_TYPE_GPU),
    94 describePass("WAIT_EVENT"_sv, DW_PROCESSOR_TYPE_CPU),
    95 describePass("TEARDOWN"_sv, DW_PROCESSOR_TYPE_CPU));
    96 };
    97
    98 static std::unique_ptr<dwFeatureTrackerNode> create(ParameterProvider& provider);
    99
    100 static constexpr auto describeParameters()
    101 {
    102 return describeConstructorArguments<dwFeatureTrackerNodeParams, dwContextHandle_t>(
    105 bool,
    106 "initForCamera"_sv,
    107 &dwFeatureTrackerNodeParams::initForCamera),
    109 dwCameraModelHandle_t,
    111 "cameraIndex"_sv,
    114 dwTransformation3f,
    116 "cameraIndex"_sv,
    119 dwFeature2DTrackerAlgorithm,
    120 "featureTrackerAlgorithm"_sv,
    121 &dwFeatureTrackerNodeParams::dwTrackerParams, &dwFeature2DTrackerConfig::algorithm),
    123 dwFeature2DDetectorType,
    124 "featureDetectorType"_sv,
    125 &dwFeatureTrackerNodeParams::dwTrackerParams, &dwFeature2DTrackerConfig::detectorType),
    127 uint32_t,
    128 "maxFeatureCount"_sv,
    129 &dwFeatureTrackerNodeParams::dwTrackerParams, &dwFeature2DTrackerConfig::maxFeatureCount),
    131 uint32_t,
    132 "pyramidLevelCount"_sv,
    133 &dwFeatureTrackerNodeParams::dwTrackerParams, &dwFeature2DTrackerConfig::pyramidLevelCount),
    135 uint32_t,
    137 "cameraIndex"_sv,
    138 &dwFeatureTrackerNodeParams::dwTrackerParams, &dwFeature2DTrackerConfig::imageWidth),
    140 uint32_t,
    142 "cameraIndex"_sv,
    143 &dwFeatureTrackerNodeParams::dwTrackerParams, &dwFeature2DTrackerConfig::imageHeight),
    145 cudaStream_t,
    146 "streamIndex"_sv,
    150 dwContextHandle_t)));
    151 }
    152
    154 const dwContextHandle_t ctx);
    155};
    156} // namespace framework
    157} // namespace dw
    158
    159#endif //DW_FRAMEWORK_FEATURE_TRACKER_NODE_H_
    #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 std::unique_ptr< dwFeatureTrackerNode > create(ParameterProvider &provider)
    dwFeatureTrackerNode(const dwFeatureTrackerNodeParams &params, const dwContextHandle_t ctx)
    dwFeature2DTrackerConfig dwTrackerParams
    dwTransformation3f extrinsic
    constexpr auto describePortCollection(Args &&... args)
    constexpr std::tuple< dw::core::StringView, dwProcessorType > describePass(dw::core::StringView const &&name, dwProcessorType processorType)
    constexpr auto describeConstructorArgument(const Args &&... args)
    dwFeatureTrackerNodeParams { bool initForCamera dwFeatureTrackerNodeParams
    constexpr auto describePassCollection(const Args &&... args)
    cudaStream_t cudaStream
    Definition: dwIcpNode.hpp:60
    dwCameraModelHandle_t intrinsic
    Definition: Exception.hpp:47
    人人超碰97caoporen国产