Image preprocessor — validates, resizes, and normalizes images.
More...
#include <entropic/inference/image_preprocessor.h>
Image preprocessor — validates, resizes, and normalizes images.
Concrete class (not a base class — no expected variants). Handles the pipeline: load -> validate -> resize -> output.
- Version
- 1.9.11
Definition at line 59 of file image_preprocessor.h.
◆ ImagePreprocessor()
Construct preprocessor with config.
- Parameters
-
| config | Preprocessing configuration. |
- Version
- 1.9.11
Definition at line 134 of file image_preprocessor.cpp.
◆ preprocess_buffer()
| PreprocessedImage entropic::ImagePreprocessor::preprocess_buffer |
( |
const uint8_t * |
data, |
|
|
size_t |
len, |
|
|
const std::string & |
source_label |
|
) |
| |
Preprocess an image from memory buffer.
- Parameters
-
| data | Raw image data (JPEG, PNG, BMP, GIF). |
| len | Data length in bytes. |
| source_label | Label for logging (e.g., "data_uri"). |
- Returns
- Preprocessed image.
- Exceptions
-
| std::runtime_error | on invalid format or decode error. |
- Version
- 1.9.11
- Parameters
-
| data | Raw image data (JPEG, PNG, BMP, GIF). |
| len | Data length in bytes. |
| source_label | Label for logging (e.g., "data_uri"). |
- Returns
- Preprocessed image.
- Exceptions
-
| std::runtime_error | on invalid format or decode error. |
Definition at line 202 of file image_preprocessor.cpp.
◆ preprocess_file()
| PreprocessedImage entropic::ImagePreprocessor::preprocess_file |
( |
const std::filesystem::path & |
path | ) |
|
Preprocess an image from file path.
- Parameters
-
- Returns
- Preprocessed image ready for vision encoder.
- Exceptions
-
| std::runtime_error | on invalid format, oversized file, or read error. |
- Version
- 1.9.11
- Parameters
-
- Returns
- Preprocessed image ready for vision encoder.
- Exceptions
-
| std::runtime_error | on invalid format, oversized, or read error. |
Definition at line 179 of file image_preprocessor.cpp.
The documentation for this class was generated from the following files: