NVIDIA DeepStream SDK API Reference

6.4 Release
cvcore Namespace Reference

Namespaces

 bodypose2d
 
 detail
 
 emotions
 
 faciallandmarks
 
 gazenet
 
 gestures
 
 headpose
 
 heartrate
 
 vision3d
 

Data Structures

class  Array
 Implementation of Array class. More...
 
class  ArrayBase
 Base implementation of Array. More...
 
class  ArrayN
 Implementation of ArrayN class. More...
 
struct  AxisAngleRotation
 A struct Structure used to store AxisAngle Rotation parameters. More...
 
struct  BBox
 A struct. More...
 
struct  CameraDistortionModel
 Struct type used to store Camera Distortion model type and coefficients. More...
 
struct  CameraExtrinsics
 Struct type used to store Camera Extrinsics. More...
 
struct  CameraIntrinsics
 Struct type used to store Camera Intrinsics. More...
 
struct  CameraModel
 
class  Image
 
class  Image< ImageType::BGR_F16 >
 
class  Image< ImageType::BGR_F32 >
 
class  Image< ImageType::BGR_U16 >
 
class  Image< ImageType::BGR_U8 >
 
class  Image< ImageType::NV12 >
 
class  Image< ImageType::NV24 >
 
class  Image< ImageType::PLANAR_BGR_F16 >
 
class  Image< ImageType::PLANAR_BGR_F32 >
 
class  Image< ImageType::PLANAR_BGR_U16 >
 
class  Image< ImageType::PLANAR_BGR_U8 >
 
class  Image< ImageType::PLANAR_RGB_F16 >
 
class  Image< ImageType::PLANAR_RGB_F32 >
 
class  Image< ImageType::PLANAR_RGB_U16 >
 
class  Image< ImageType::PLANAR_RGB_U8 >
 
class  Image< ImageType::PLANAR_RGBA_F16 >
 
class  Image< ImageType::PLANAR_RGBA_F32 >
 
class  Image< ImageType::PLANAR_RGBA_U16 >
 
class  Image< ImageType::PLANAR_RGBA_U8 >
 
class  Image< ImageType::RGB_F16 >
 
class  Image< ImageType::RGB_F32 >
 
class  Image< ImageType::RGB_U16 >
 
class  Image< ImageType::RGB_U8 >
 
class  Image< ImageType::RGBA_F16 >
 
class  Image< ImageType::RGBA_F32 >
 
class  Image< ImageType::RGBA_U16 >
 
class  Image< ImageType::RGBA_U8 >
 
class  Image< ImageType::Y_F16 >
 
class  Image< ImageType::Y_F32 >
 
class  Image< ImageType::Y_S16 >
 
class  Image< ImageType::Y_S8 >
 
class  Image< ImageType::Y_U16 >
 
class  Image< ImageType::Y_U8 >
 
struct  ImagePreProcessingParams
 Struct type for image preprocessing params. More...
 
struct  ImageTraits
 Image traits that map ImageType to TensorLayout, ChannelCount and ChannelType. More...
 
struct  ImageTraits< BGR_F32, 3 >
 
struct  ImageTraits< BGR_F32, 4 >
 
struct  ImageTraits< BGR_U16, 3 >
 
struct  ImageTraits< BGR_U16, 4 >
 
struct  ImageTraits< BGR_U8, 3 >
 
struct  ImageTraits< BGR_U8, 4 >
 
struct  ImageTraits< PLANAR_BGR_F32, 3 >
 
struct  ImageTraits< PLANAR_BGR_F32, 4 >
 
struct  ImageTraits< PLANAR_BGR_U16, 3 >
 
struct  ImageTraits< PLANAR_BGR_U16, 4 >
 
struct  ImageTraits< PLANAR_BGR_U8, 3 >
 
struct  ImageTraits< PLANAR_BGR_U8, 4 >
 
struct  ImageTraits< PLANAR_RGB_F32, 3 >
 
struct  ImageTraits< PLANAR_RGB_F32, 4 >
 
struct  ImageTraits< PLANAR_RGB_U16, 3 >
 
struct  ImageTraits< PLANAR_RGB_U16, 4 >
 
struct  ImageTraits< PLANAR_RGB_U8, 3 >
 
struct  ImageTraits< PLANAR_RGB_U8, 4 >
 
struct  ImageTraits< RGB_F32, 3 >
 
struct  ImageTraits< RGB_F32, 4 >
 
struct  ImageTraits< RGB_U16, 3 >
 
struct  ImageTraits< RGB_U16, 4 >
 
struct  ImageTraits< RGB_U8, 3 >
 
struct  ImageTraits< RGB_U8, 4 >
 
struct  ImageTraits< Y_F32, 3 >
 
struct  ImageTraits< Y_F32, 4 >
 
struct  ImageTraits< Y_S16, 3 >
 
struct  ImageTraits< Y_S16, 4 >
 
struct  ImageTraits< Y_S8, 3 >
 
struct  ImageTraits< Y_S8, 4 >
 
struct  ImageTraits< Y_U16, 3 >
 
struct  ImageTraits< Y_U16, 4 >
 
struct  ImageTraits< Y_U8, 3 >
 
struct  ImageTraits< Y_U8, 4 >
 
struct  IsCompositeImage
 
struct  IsInterleavedImage
 
struct  IsPlanarImage
 
struct  ModelInferenceParams
 Struct to describe the model. More...
 
struct  ModelInputParams
 Struct to describe input type required by the model. More...
 
struct  Pose3
 A struct. More...
 
struct  Quaternion
 A struct. More...
 
class  Tensor
 
class  Tensor< CDHW, CC, CT >
 4D CDHW tensors. More...
 
class  Tensor< CHW, CC, CT >
 3D CHW tensors. More...
 
class  Tensor< CL, CC, CT >
 2D CL tensors. More...
 
class  Tensor< DCHW, CC, CT >
 4D DCHW tensors. More...
 
class  Tensor< DHWC, CC, CT >
 4D DHWC tensors. More...
 
class  Tensor< HWC, CC, CT >
 3D HWC tensors. More...
 
class  Tensor< LC, CC, CT >
 2D LC tensors. More...
 
class  TensorBase
 Implementation of TensorBase class. More...
 
struct  Vector2
 A struct. More...
 
struct  Vector3
 A struct. More...
 

Typedefs

using Matrixf = Tensor< CHW, C1, F32 >
 Matrix types using Tensor backend. More...
 
using Matrixd = Tensor< CHW, C1, F64 >
 
using Vector2i = Vector2< int >
 
using Vector3i = Vector3< int >
 
using Vector2f = Vector2< float >
 
using Vector3f = Vector3< float >
 
using Vector2d = Vector2< double >
 
using Vector3d = Vector3< double >
 
using Pose3d = Pose3< double >
 
using Pose3f = Pose3< float >
 
using half = std::uint16_t
 

Enumerations

enum  TensorLayout {
  LC,
  CL,
  HWC,
  CHW,
  DHWC,
  NHWC = DHWC,
  DCHW,
  NCHW = DCHW,
  CDHW
}
 An enum. More...
 
enum  ChannelCount {
  C1,
  C2,
  C3,
  C4,
  CX
}
 An enum. More...
 
enum  ChannelType {
  U8,
  U16,
  S8,
  S16,
  F16,
  F32,
  F64
}
 An enum. More...
 
enum  TensorDimension {
  TensorDimension::LENGTH,
  TensorDimension::HEIGHT,
  TensorDimension::WIDTH,
  TensorDimension::CHANNEL,
  TensorDimension::DEPTH
}
 An enum. More...
 
enum  ImageType {
  Y_U8,
  Y_U16,
  Y_S8,
  Y_S16,
  Y_F16,
  Y_F32,
  RGB_U8,
  RGB_U16,
  RGB_F16,
  RGB_F32,
  BGR_U8,
  BGR_U16,
  BGR_F16,
  BGR_F32,
  RGBA_U8,
  RGBA_U16,
  RGBA_F16,
  RGBA_F32,
  PLANAR_RGB_U8,
  PLANAR_RGB_U16,
  PLANAR_RGB_F16,
  PLANAR_RGB_F32,
  PLANAR_BGR_U8,
  PLANAR_BGR_U16,
  PLANAR_BGR_F16,
  PLANAR_BGR_F32,
  PLANAR_RGBA_U8,
  PLANAR_RGBA_U16,
  PLANAR_RGBA_F16,
  PLANAR_RGBA_F32,
  NV12,
  NV24
}
 An enum. More...
 
enum  CameraDistortionType : uint8_t {
  CameraDistortionType::UNKNOWN,
  CameraDistortionType::NONE,
  CameraDistortionType::Polynomial,
  CameraDistortionType::FisheyeEquidistant,
  CameraDistortionType::FisheyeEquisolid,
  CameraDistortionType::FisheyeOrthoGraphic,
  CameraDistortionType::FisheyeStereographic
}
 An enum. More...
 

Functions

Vector3d RotationMatrixToRotationVector (const std::vector< double > &rotMatrix)
 Convert rotation matrix to rotation vector. More...
 
AxisAngleRotation RotationMatrixToAxisAngleRotation (const std::vector< double > &rotMatrix)
 Convert rotation matrix to axis angle representation. More...
 
std::vector< double > AxisAngleToRotationMatrix (const AxisAngleRotation &axisangle)
 Convert axis angle representation to rotation matrix. More...
 
Vector3d AxisAngleRotationToRotationVector (const AxisAngleRotation &axisangle)
 Convert axis angle representation to 3d rotation vector. More...
 
AxisAngleRotation RotationVectorToAxisAngleRotation (const Vector3d &rotVector)
 Convert rotation vector to axis angle representation. More...
 
Quaternion AxisAngleRotationToQuaternion (const AxisAngleRotation &axisangle)
 Convert axis angle representation to quaternion. More...
 
AxisAngleRotation QuaternionToAxisAngleRotation (const Quaternion &qrotation)
 Convert quaternion rotation to axis angle rotation. More...
 
std::vector< double > QuaternionToRotationMatrix (const Quaternion &qrotation)
 Convert quaternion rotation to rotation matrix. More...
 
Quaternion RotationMatrixToQuaternion (const std::vector< double > &rotMatrix)
 Convert rotation matrix to Quaternion. More...
 
std::string GetTensorLayoutAsString (TensorLayout TL)
 Function to get name of a TensorLayout value as string. More...
 
std::string GetChannelCountAsString (ChannelCount CC)
 Function to get name of a ChannelCount value as string. More...
 
std::string GetChannelTypeAsString (ChannelType CT)
 Function to get name of a ChannelType value as string. More...
 
std::string GetMemoryTypeAsString (bool isCPU)
 Function to get name of a Memory type used. More...
 
std::size_t GetChannelSize (ChannelType CT)
 Function to get element size (in bytes) of a ChannelType. More...
 
size_t GetImageElementSize (const ImageType type)
 Get the bytes of each element for a specific ImageType. More...
 
size_t GetImageChannelCount (const ImageType type)
 Get the number of channels for a specific ImageType. More...
 
void Copy (Image< NV12 > &dst, const Image< NV12 > &src, cudaStream_t stream=0)
 
void Copy (Image< NV24 > &dst, const Image< NV24 > &src, cudaStream_t stream=0)
 
void TensorBaseCopy (TensorBase &dst, const TensorBase &src, cudaStream_t stream=0)
 Implementation of tensor copy. More...
 
void TensorBaseCopy2D (TensorBase &dst, const TensorBase &src, int dstPitch, int srcPitch, int widthInBytes, int height, cudaStream_t stream=0)
 Implementation of tensor copy for 2D pitch linear tensors. More...
 
template<TensorLayout TL, ChannelCount CC, ChannelType CT, typename std::enable_if< TL !=HWC &&TL !=CHW &&TL !=NHWC &&TL !=NCHW >::type * = nullptr>
void Copy (Tensor< TL, CC, CT > &dst, const Tensor< TL, CC, CT > &src, cudaStream_t stream=0)
 Memory copy function between two non HWC/CHW/NHWC/NCHW Tensors. More...
 

Typedef Documentation

◆ half

using cvcore::half = typedef std::uint16_t

Definition at line 22 of file Tensor.h.

◆ Matrixd

using cvcore::Matrixd = typedef Tensor<CHW, C1, F64>

Definition at line 25 of file MathTypes.h.

◆ Matrixf

using cvcore::Matrixf = typedef Tensor<CHW, C1, F32>

Matrix types using Tensor backend.

Definition at line 24 of file MathTypes.h.

◆ Pose3d

using cvcore::Pose3d = typedef Pose3<double>

Definition at line 222 of file MathTypes.h.

◆ Pose3f

using cvcore::Pose3f = typedef Pose3<float>

Definition at line 223 of file MathTypes.h.

◆ Vector2d

using cvcore::Vector2d = typedef Vector2<double>

Definition at line 92 of file MathTypes.h.

◆ Vector2f

using cvcore::Vector2f = typedef Vector2<float>

Definition at line 89 of file MathTypes.h.

◆ Vector2i

using cvcore::Vector2i = typedef Vector2<int>

Definition at line 86 of file MathTypes.h.

◆ Vector3d

using cvcore::Vector3d = typedef Vector3<double>

Definition at line 93 of file MathTypes.h.

◆ Vector3f

using cvcore::Vector3f = typedef Vector3<float>

Definition at line 90 of file MathTypes.h.

◆ Vector3i

using cvcore::Vector3i = typedef Vector3<int>

Definition at line 87 of file MathTypes.h.

Enumeration Type Documentation

◆ CameraDistortionType

enum cvcore::CameraDistortionType : uint8_t
strong

An enum.

Enum type for Camera Distortion type.

Enumerator
UNKNOWN 

Unknown arbitrary distortion model.

NONE 

No distortion applied.

Polynomial 

Polynomial distortion model.

FisheyeEquidistant 

Equidistant Fisheye distortion model.

FisheyeEquisolid 

Equisolid Fisheye distortion model.

FisheyeOrthoGraphic 

Orthographic Fisheye distortion model.

FisheyeStereographic 

Stereographic Fisheye distortion model.

Definition at line 29 of file CameraModel.h.

◆ ChannelCount

An enum.

Enum type for tensor channel count.

Enumerator
C1 

1 channels.

C2 

2 channels.

C3 

3 channels.

C4 

4 channels.

CX 

varying number of channels.

Definition at line 45 of file Tensor.h.

◆ ChannelType

An enum.

Enum type for channel type.

Enumerator
U8 

uint8_t.

U16 

uint16_t.

S8 

int8_t.

S16 

int16_t.

F16 

cvcore::half.

F32 

float.

F64 

double.

Definition at line 58 of file Tensor.h.

◆ ImageType

An enum.

Enum type for image type.

Enumerator
Y_U8 

8-bit unsigned gray.

Y_U16 

16-bit unsigned gray.

Y_S8 

8-bit signed gray.

Y_S16 

16-bit signed gray.

Y_F16 

half normalized gray.

Y_F32 

float normalized gray.

RGB_U8 

8-bit RGB.

RGB_U16 

16-bit RGB.

RGB_F16 

half RGB.

RGB_F32 

float RGB.

BGR_U8 

8-bit BGR.

BGR_U16 

16-bit BGR.

BGR_F16 

half BGR.

BGR_F32 

float BGR.

RGBA_U8 

8-bit RGBA.

RGBA_U16 

16-bit RGBA.

RGBA_F16 

half RGBA.

RGBA_F32 

float RGBA.

PLANAR_RGB_U8 

8-bit planar RGB.

PLANAR_RGB_U16 

16-bit planar RGB.

PLANAR_RGB_F16 

half planar RGB.

PLANAR_RGB_F32 

float planar RGB.

PLANAR_BGR_U8 

8-bit planar BGR.

PLANAR_BGR_U16 

16-bit planar BGR.

PLANAR_BGR_F16 

half planar BGR.

PLANAR_BGR_F32 

float planar BGR.

PLANAR_RGBA_U8 

8-bit planar RGBA.

PLANAR_RGBA_U16 

16-bit planar RGBA.

PLANAR_RGBA_F16 

half planar RGBA.

PLANAR_RGBA_F32 

float planar RGBA.

NV12 

8-bit planar Y + interleaved and subsampled (1/4 Y samples) UV.

NV24 

8-bit planar Y + interleaved UV.

Definition at line 28 of file Image.h.

◆ TensorDimension

An enum.

Enum type for dimension type.

Enumerator
LENGTH 

length dimension.

HEIGHT 

height dimension.

WIDTH 

width dimension.

CHANNEL 

channel dimension.

DEPTH 

depth dimension.

Definition at line 73 of file Tensor.h.

◆ TensorLayout

An enum.

Enum type for tensor layout type.

Enumerator
LC 

length, channel (channel interleaved).

CL 

channel, length (channel planar).

HWC 

height, width, channel (channel interleaved).

CHW 

channel, height, width (channel planar).

DHWC 

depth, height, width, channel (channel interleaved).

NHWC 

alias for DHWC.

DCHW 

depth, channel, height, width (channel planar).

NCHW 

alias for DCHW.

CDHW 

channel, depth, height, width (channel planar).

Definition at line 28 of file Tensor.h.

Function Documentation

◆ AxisAngleRotationToQuaternion()

Quaternion cvcore::AxisAngleRotationToQuaternion ( const AxisAngleRotation axisangle)

Convert axis angle representation to quaternion.

Parameters
axisangleAxis angle representation.
Returns
Quaternion rotation.

◆ AxisAngleRotationToRotationVector()

Vector3d cvcore::AxisAngleRotationToRotationVector ( const AxisAngleRotation axisangle)

Convert axis angle representation to 3d rotation vector.

Rotation vector is {theta * xaxis, theta * yaxis, theta * zaxis} where theta is the angle of rotation in radians.

Parameters
axisangleAxis angle rotation.
Returns
3D Rotation Vector

◆ AxisAngleToRotationMatrix()

std::vector<double> cvcore::AxisAngleToRotationMatrix ( const AxisAngleRotation axisangle)

Convert axis angle representation to rotation matrix.

Parameters
axisangleAxis angle rotation.
Returns
Rotation matrix of 3x3 values.

◆ Copy() [1/3]

void cvcore::Copy ( Image< NV12 > &  dst,
const Image< NV12 > &  src,
cudaStream_t  stream = 0 
)
inline

Definition at line 872 of file Image.h.

Referenced by Copy().

◆ Copy() [2/3]

void cvcore::Copy ( Image< NV24 > &  dst,
const Image< NV24 > &  src,
cudaStream_t  stream = 0 
)
inline

Definition at line 878 of file Image.h.

References Copy().

◆ Copy() [3/3]

template<TensorLayout TL, ChannelCount CC, ChannelType CT, typename std::enable_if< TL !=HWC &&TL !=CHW &&TL !=NHWC &&TL !=NCHW >::type * = nullptr>
void cvcore::Copy ( Tensor< TL, CC, CT > &  dst,
const Tensor< TL, CC, CT > &  src,
cudaStream_t  stream = 0 
)

Memory copy function between two non HWC/CHW/NHWC/NCHW Tensors.

Memory copy function between two NCHW Tensors.

Memory copy function between two CHW Tensors.

Memory copy function between two NHWC Tensors.

Memory copy function between two HWC Tensors.

Template Parameters
TLTensorLayout type.
CCChannel Count.
CTChannelType.
Parameters
dstdestination Tensor.
srcsource Tensor which copy from.
streamcuda stream.

Definition at line 52 of file Memory.h.

References TensorBaseCopy().

◆ GetChannelCountAsString()

std::string cvcore::GetChannelCountAsString ( ChannelCount  CC)

Function to get name of a ChannelCount value as string.

Parameters
CCthe ChannelCount value.
Returns
string name of CC.

◆ GetChannelSize()

std::size_t cvcore::GetChannelSize ( ChannelType  CT)

Function to get element size (in bytes) of a ChannelType.

Parameters
CTthe ChannelType value.
Returns
size in bytes.

Referenced by cvcore::Tensor< HWC, CC, CT >::Tensor(), cvcore::Tensor< CHW, CC, CT >::Tensor(), cvcore::Tensor< DHWC, CC, CT >::Tensor(), and cvcore::Tensor< DCHW, CC, CT >::Tensor().

◆ GetChannelTypeAsString()

std::string cvcore::GetChannelTypeAsString ( ChannelType  CT)

Function to get name of a ChannelType value as string.

Parameters
CTthe ChannelType value.
Returns
string name of CT.

◆ GetImageChannelCount()

size_t cvcore::GetImageChannelCount ( const ImageType  type)
inline

◆ GetImageElementSize()

size_t cvcore::GetImageElementSize ( const ImageType  type)
inline

◆ GetMemoryTypeAsString()

std::string cvcore::GetMemoryTypeAsString ( bool  isCPU)

Function to get name of a Memory type used.

Parameters
boolisCPU of Tensor as input
Returns
string name of Memory type.

◆ GetTensorLayoutAsString()

std::string cvcore::GetTensorLayoutAsString ( TensorLayout  TL)

Function to get name of a TensorLayout value as string.

Parameters
TLthe TensorLayout value.
Returns
string name of TL.

◆ QuaternionToAxisAngleRotation()

AxisAngleRotation cvcore::QuaternionToAxisAngleRotation ( const Quaternion qrotation)

Convert quaternion rotation to axis angle rotation.

Parameters
qrotationQuaternion rotation representation.
Returns
Axis angle rotation.

◆ QuaternionToRotationMatrix()

std::vector<double> cvcore::QuaternionToRotationMatrix ( const Quaternion qrotation)

Convert quaternion rotation to rotation matrix.

Parameters
qrotationQuaternion rotation representation.
Returns
Rotation matrix.

◆ RotationMatrixToAxisAngleRotation()

AxisAngleRotation cvcore::RotationMatrixToAxisAngleRotation ( const std::vector< double > &  rotMatrix)

Convert rotation matrix to axis angle representation.

Parameters
rotMatrixRotation matrix of 3x3 values.
Returns
Axis angle rotation

◆ RotationMatrixToQuaternion()

Quaternion cvcore::RotationMatrixToQuaternion ( const std::vector< double > &  rotMatrix)

Convert rotation matrix to Quaternion.

Parameters
rotMatrixRotation matrix
Returns
Quaternion rotation.

◆ RotationMatrixToRotationVector()

Vector3d cvcore::RotationMatrixToRotationVector ( const std::vector< double > &  rotMatrix)

Convert rotation matrix to rotation vector.

Parameters
rotMatrixRotation matrix of 3x3 values.
Returns
3D Rotation vector {theta * xaxis, theta * yaxis, theta * zaxis} where theta is the angle of rotation in radians

◆ RotationVectorToAxisAngleRotation()

AxisAngleRotation cvcore::RotationVectorToAxisAngleRotation ( const Vector3d rotVector)

Convert rotation vector to axis angle representation.

Parameters
rotVector3D rotation vector.
Returns
Axis angle rotation.

◆ TensorBaseCopy()

void cvcore::TensorBaseCopy ( TensorBase dst,
const TensorBase src,
cudaStream_t  stream = 0 
)

Implementation of tensor copy.

Parameters
dstdestination TensorBase.
srcsource TensorBase.
streamcuda stream.

Referenced by Copy().

◆ TensorBaseCopy2D()

void cvcore::TensorBaseCopy2D ( TensorBase dst,
const TensorBase src,
int  dstPitch,
int  srcPitch,
int  widthInBytes,
int  height,
cudaStream_t  stream = 0 
)

Implementation of tensor copy for 2D pitch linear tensors.

Parameters
dstdestination TensorBase.
srcsource TensorBase.
dstPitchpitch of destination Tensor in bytes.
srcPitchpitch of source Tensor in bytes.
widthInByteswidth in bytes.
heightheight of tensor.
streamcuda stream.