|
STM32N6 NPU Deployment — Politecnico di Milano
1.0
Documentation for Neural Network Deployment on STM32N6 NPU - Politecnico di Milano 2024-2025
|
Defines how the camera image is resized/cropped to match the NN input. More...
Macros | |
| #define | ASPECT_RATIO_CROP (1) |
| Crop mode — both camera pipes are cropped to the NN input aspect ratio. More... | |
| #define | ASPECT_RATIO_FIT (2) |
| Fit mode — both pipes are resized to the NN input aspect ratio. More... | |
| #define | ASPECT_RATIO_FULLSCREEN (3) |
| Fullscreen mode — camera image is resized to fill the entire LCD. More... | |
Defines how the camera image is resized/cropped to match the NN input.
| #define ASPECT_RATIO_CROP (1) |
Crop mode — both camera pipes are cropped to the NN input aspect ratio.
The camera captures at its native resolution (e.g., 640×480). The DCMIPP pipe crops a centered square region matching the NN input aspect ratio. The original aspect ratio of the scene is preserved — no stretching occurs. This is the mode used in this project for MoveNet (192×192 square input).
Visual effect on the LCD:
Definition at line 110 of file app_config.h.
| #define ASPECT_RATIO_FIT (2) |
Fit mode — both pipes are resized to the NN input aspect ratio.
The camera image is resized (with stretching if needed) to fill the NN input dimensions. Original aspect ratio is NOT preserved. Use when the NN input is not square and scene coverage is more important than geometric accuracy.
Definition at line 120 of file app_config.h.
| #define ASPECT_RATIO_FULLSCREEN (3) |
Fullscreen mode — camera image is resized to fill the entire LCD.
The NN input image fills the LCD display completely. Useful for demonstration purposes but may distort the displayed image if the camera and LCD aspect ratios differ.
Definition at line 129 of file app_config.h.