Image Utils#
-
namespace trt_edgellm
-
namespace rt
-
namespace imageUtils
Enums
-
class ImageData#
- #include <imageUtils.h>
Image data container (image or video frame stack)
Wraps a uint8 RGB tensor with the unified 4D layout
[frames, height, width, channels]. Single still images are represented asframes == 1; video frame stacks haveframes > 1. Channels must be 3.Public Functions
-
ImageData(rt::Tensor &&data)#
Construct image data.
- Parameters:
data – Image tensor with shape [T, H, W, C]. Single-frame still images use T=1.
- Throws:
std::runtime_error – if tensor content not UINT8, tensor shape not 4D, or number of channels not 3
-
unsigned char *data() const noexcept#
Get raw image data pointer.
- Returns:
Pointer to image data
-
inline int64_t bytesPerFrame() const noexcept#
Bytes occupied by a single frame (height * width * channels), assuming UINT8 storage.
- Returns:
Byte count per frame.
Public Members
-
int64_t width = {0}#
Image width.
-
int64_t height = {0}#
Image height.
-
int64_t channels = {0}#
Number of channels (e.g., 3 for RGB)
-
int64_t frames = {1}#
Number of frames (T). 1 for static images, >1 for video.
-
double fps = {1.0}#
Video sample fps (used to compute MRoPE timestamps); ignored when frames == 1.
-
ImageData(rt::Tensor &&data)#
-
class ImageData#
-
namespace imageUtils
-
namespace rt