PvaOperatorTypes.h#

Fully qualified name: public/src/operator/include/PvaOperatorTypes.h

File members: public/src/operator/include/PvaOperatorTypes.h

/*
 * SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
 * SPDX-License-Identifier: LicenseRef-NvidiaProprietary
 *
 * NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
 * property and proprietary rights in and to this material, related
 * documentation and any modifications thereto. Any use, reproduction,
 * disclosure or distribution of this material and related documentation
 * without an express license agreement from NVIDIA CORPORATION or
 * its affiliates is strictly prohibited.
 */

#ifndef PVA_OPERATOR_TYPES_H
#define PVA_OPERATOR_TYPES_H

#ifdef __cplusplus
extern "C" {
#endif

#include <stdint.h>

typedef enum
{
    PVA_ERODE = 0,
    PVA_DILATE = 1,
} PvaMorphologyType;

typedef enum
{
    SPLIT_RGBA8_TO_U8 = 0,

    MERGE_U8_TO_RGBA8 = 1
} PVAMixChannelsCode;

typedef enum
{
    IMAGE_RESIZE_NN = 0,
    IMAGE_RESIZE_LINEAR
} PVAImageResizeMethodType;

typedef enum
{
    DIST_L1 = 0,
    DIST_L2,
    DIST_HAMMING
} PVADistanceType;

typedef enum
{
    WARP_INTERPOLATION_NN = 0,
    WARP_INTERPOLATION_LINEAR
} PVAWarpInterpolationType;

typedef enum
{
    WARP_TRANSFORMATION_PERSPECTIVE = 0,
    WARP_TRANSFORMATION_AFFINE = 1,
} PVAWarpTransformationType;

#define MAX_BF_MATCHES_PER_DESCRIPTOR (3)

#define MAX_BF_DESCRIPTOR_COUNT (1024)

#define BRIEF_DESCRIPTOR_ARRAY_LENGTH (32)

typedef struct
{
    uint8_t data[BRIEF_DESCRIPTOR_ARRAY_LENGTH];
} PvaBriefDescriptor;

typedef struct PvaBFMatchesTypeRec
{
    int32_t refIndex[MAX_BF_MATCHES_PER_DESCRIPTOR];

    float distance[MAX_BF_MATCHES_PER_DESCRIPTOR];
} PvaBFMatchesType;

typedef enum
{
    IMAGE_STAT_FLAG_PIXEL_COUNT = (1u << 0),
    IMAGE_STAT_FLAG_SUM = (1u << 1),
    IMAGE_STAT_FLAG_MEAN = ((1u << 2) | IMAGE_STAT_FLAG_SUM | IMAGE_STAT_FLAG_PIXEL_COUNT),
    IMAGE_STAT_FLAG_VARIANCE = ((1u << 3) | IMAGE_STAT_FLAG_MEAN),
    IMAGE_STAT_FLAG_COVARIANCE = ((1u << 4) | IMAGE_STAT_FLAG_VARIANCE)
} PVAImageStatFlag;

typedef struct
{
    int pixelCount;
    float sum[4];
    float mean[4];
    float covariance[4][4];
} PVAImageStatOutput;

typedef enum
{
    GMM_DATA_TYPE_FP32,
    GMM_DATA_TYPE_FP16
} PVAGMMDataType;

#ifdef __cplusplus
}
#endif

#endif /* PVA_OPERATOR_TYPES_H */