89 const std::string& source_label);
103 const uint8_t* data,
size_t len,
104 const std::string& source);
Image preprocessor — validates, resizes, and normalizes images.
PreprocessedImage preprocess_file(const std::filesystem::path &path)
Preprocess an image from file path.
PreprocessedImage preprocess_buffer(const uint8_t *data, size_t len, const std::string &source_label)
Preprocess an image from memory buffer.
Activate model on GPU (WARM → ACTIVE).
Image preprocessing configuration.
bool preserve_aspect
Preserve aspect ratio when resizing.
int max_width
Maximum image width (resized if exceeded)
int max_height
Maximum image height (resized if exceeded)
size_t max_file_size
Maximum file size in bytes (20MB)
Preprocessed image ready for vision encoder.
std::string source_path
Original source path (for logging)
int height
Image height in pixels.
std::vector< uint8_t > pixel_data
RGB pixel data (row-major)
int width
Image width in pixels.
int channels
Color channels (always 3 = RGB)