Class TensorShapeInfoImagePlanar

Inheritance Relationships

Base Type

Class Documentation

class TensorShapeInfoImagePlanar : public nvcv::TensorShapeInfoImage

This class provides information about the shape of a planar image tensor.

It inherits from TensorShapeInfoImage and is specialized for planar image tensors. The class provides functions to check the compatibility of a given tensor shape and to retrieve the number of planes in the tensor.

Public Functions

inline int32_t numPlanes() const

Returns the number of planes in the tensor. (i.e nCwh)

Returns:

The number of planes.

Public Static Functions

static inline bool IsCompatible(const TensorShape &tshape)

Checks if the provided tensor shape is compatible with this class. A tensor shape is considered compatible if it matches certain criteria related to the layout of the tensor.

Parameters:

tshape – The tensor shape to check.

Returns:

True if the tensor shape is compatible, false otherwise.

static inline Optional<TensorShapeInfoImagePlanar> Create(const TensorShape &tshape)

Creates a TensorShapeInfoImagePlanar object for the provided tensor shape if it is compatible.

Parameters:

tshape – The tensor shape to create the TensorShapeInfoImagePlanar for.

Returns:

A TensorShapeInfoImagePlanar object for the provided tensor shape if it is compatible, NullOpt otherwise.