• <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
    dwFeatureDetectorNode.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_DETECTOR_NODE_H_
    32#define DW_FRAMEWORK_FEATURE_DETECTOR_NODE_H_
    33
    34#include <dwcgf/node/Node.hpp>
    38#include <dwcgf/port/Port.hpp>
    40
    41#include <dw/imageprocessing/featuredetector/FeatureDetector_processpipeline.h>
    42#include <dw/imageprocessing/features/FeatureList.h>
    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. */
    46
    47namespace dw
    48{
    49namespace framework
    50{
    51
    53{
    54 //mask to ignore
    55 uint8_t* d_mask;
    57 uint32_t maskWidth;
    58 uint32_t maskHeight;
    59 cudaStream_t cudaStream;
    60};
    61
    63{
    64 bool initForCamera;
    65 dwCameraModelHandle_t intrinsic;
    66 dwTransformation3f extrinsic;
    67 cupvaStream_t cupvastream;
    68 dwFeature2DDetectorConfig dwDetectorParams;
    69};
    70
    72{
    73public:
    74 static constexpr auto describeInputPorts()
    75 {
    77 DW_DESCRIBE_PORT(dwPyramidImage, "PYRAMID"_sv, PortBinding::REQUIRED),
    78 DW_DESCRIBE_PORT(dwFeatureHistoryArray, "PREDICTED_FEATURE"_sv, PortBinding::REQUIRED),
    80 };
    81 static constexpr auto describeOutputPorts()
    82 {
    84 DW_DESCRIBE_PORT(dwFeatureArray, "FEATURE_ARRAY_GPU"_sv, PortBinding::REQUIRED));
    85 };
    86
    88};
    89
    91{
    92
    93public:
    94 static constexpr char LOG_TAG[] = "dwFeatureDetectorNode";
    95
    96 static constexpr auto describePasses()
    97 {
    99 describePass("SETUP"_sv, DW_PROCESSOR_TYPE_CPU),
    100 describePass("DETECT_NEW_FEATURE"_sv, DW_PROCESSOR_TYPE_GPU),
    101 describePass("TEARDOWN"_sv, DW_PROCESSOR_TYPE_CPU));
    102 };
    103
    104 static std::unique_ptr<dwFeatureDetectorNode> create(ParameterProvider& provider);
    105
    106 static constexpr auto describeParameters()
    107 {
    108 return describeConstructorArguments<dwFeatureDetectorNodeParams, dwFeatureDetectorNodeRuntimeParams, dwContextHandle_t>(
    111 bool,
    112 "initForCamera"_sv,
    113 &dwFeatureDetectorNodeParams::initForCamera),
    115 dwCameraModelHandle_t,
    117 "cameraIndex"_sv,
    120 dwTransformation3f,
    122 "cameraIndex"_sv,
    125 dwFeature2DDetectorType,
    126 "featureDetectorType"_sv,
    127 &dwFeatureDetectorNodeParams::dwDetectorParams, &dwFeature2DDetectorConfig::type),
    129 uint32_t,
    131 "cameraIndex"_sv,
    132 &dwFeatureDetectorNodeParams::dwDetectorParams, &dwFeature2DDetectorConfig::imageWidth),
    134 uint32_t,
    136 "cameraIndex"_sv,
    137 &dwFeatureDetectorNodeParams::dwDetectorParams, &dwFeature2DDetectorConfig::imageHeight),
    139 uint32_t,
    140 "maxFeatureCount"_sv,
    141 &dwFeatureDetectorNodeParams::dwDetectorParams, &dwFeature2DDetectorConfig::maxFeatureCount)),
    144 cudaStream_t,
    145 "streamIndex"_sv,
    149 dwContextHandle_t)));
    150 }
    151
    153 const dwFeatureDetectorNodeRuntimeParams& runtimeParams,
    154 const dwContextHandle_t ctx);
    155
    157};
    158} // namespace framework
    159} // namespace dw
    160
    161#endif //DW_FRAMEWORK_FEATURE_DETECTOR_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...)
    ExceptionSafeProcessNode(std::unique_ptr< Node > impl)
    The interface to access parameter values identified by name and/or (semantic) type.
    static std::unique_ptr< dwFeatureDetectorNode > create(ParameterProvider &provider)
    dwFeatureDetectorNode(const dwFeatureDetectorNodeParams &params, const dwFeatureDetectorNodeRuntimeParams &runtimeParams, const dwContextHandle_t ctx)
    dwStatus setRuntimeParams(const dwFeatureDetectorNodeRuntimeParams &runtimeParams)
    cupvaStream_t cupvastream
    Data Type of pyramid.
    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)
    dwFeatureDetectorNodeParams { bool initForCamera dwFeatureDetectorNodeParams
    constexpr auto describePassCollection(const Args &&... args)
    cudaStream_t cudaStream
    Definition: dwIcpNode.hpp:60
    dwFeature2DDetectorConfig dwDetectorParams
    dwCameraModelHandle_t intrinsic
    dwFeatureDetectorNodeRuntimeParams { uint8_t *d_mask dwFeatureDetectorNodeRuntimeParams
    Definition: Exception.hpp:47
    人人超碰97caoporen国产