|
STM32N6 NPU Deployment — Politecnico di Milano
1.0
Documentation for Neural Network Deployment on STM32N6 NPU - Politecnico di Milano 2024-2025
|
#include <assert.h>#include "cmw_camera.h"#include "app_camerapipeline.h"#include "app_config.h"#include "crop_img.h"Go to the source code of this file.
Macros | |
| #define | CAMERA_WIDTH 0 |
| #define | CAMERA_HEIGHT 0 |
| #define | CAMERA_FPS 30 |
Functions | |
| static void | DCMIPP_PipeInitDisplay (CMW_CameraInit_t *camConf, uint32_t *bg_width, uint32_t *bg_height) |
| static void | DCMIPP_PipeInitNn (uint32_t *pitch) |
| void | CameraPipeline_Init (uint32_t *lcd_bg_width, uint32_t *lcd_bg_height, uint32_t *pitch_nn) |
| Init the camera and the 2 DCMIPP pipes. More... | |
| void | CameraPipeline_DeInit (void) |
| void | CameraPipeline_DisplayPipe_Start (uint8_t *display_pipe_dst, uint32_t cam_mode) |
| void | CameraPipeline_NNPipe_Start (uint8_t *nn_pipe_dst, uint32_t cam_mode) |
| void | CameraPipeline_DisplayPipe_Stop () |
| void | CameraPipeline_IspUpdate (void) |
| int | CMW_CAMERA_PIPE_FrameEventCallback (uint32_t pipe) |
| Frame event callback. More... | |
Variables | |
| int32_t | cameraFrameReceived |
| Camera frame ready flag. More... | |
Copyright (c) 2023 STMicroelectronics. All rights reserved.
This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.
Definition in file app_camerapipeline.c.
| #define CAMERA_FPS 30 |
Definition at line 36 of file app_camerapipeline.c.
| #define CAMERA_HEIGHT 0 |
Definition at line 35 of file app_camerapipeline.c.
| #define CAMERA_WIDTH 0 |
Definition at line 34 of file app_camerapipeline.c.
| void CameraPipeline_DeInit | ( | void | ) |
Definition at line 139 of file app_camerapipeline.c.
| void CameraPipeline_DisplayPipe_Start | ( | uint8_t * | display_pipe_dst, |
| uint32_t | cam_mode | ||
| ) |
Definition at line 146 of file app_camerapipeline.c.
Referenced by __attribute__().
| void CameraPipeline_DisplayPipe_Stop | ( | void | ) |
Definition at line 161 of file app_camerapipeline.c.
| void CameraPipeline_Init | ( | uint32_t * | lcd_bg_width, |
| uint32_t * | lcd_bg_height, | ||
| uint32_t * | pitch_nn | ||
| ) |
Init the camera and the 2 DCMIPP pipes.
| lcd_bg_width | display width |
| lcd_bg_height | display height |
| pitch_nn | output pitch computed by the CMW |
Definition at line 121 of file app_camerapipeline.c.
References CAMERA_FLIP, CAMERA_FPS, CAMERA_HEIGHT, CAMERA_WIDTH, DCMIPP_PipeInitDisplay(), and DCMIPP_PipeInitNn().
Referenced by __attribute__().
| void CameraPipeline_IspUpdate | ( | void | ) |
Definition at line 168 of file app_camerapipeline.c.
Referenced by __attribute__().
| void CameraPipeline_NNPipe_Start | ( | uint8_t * | nn_pipe_dst, |
| uint32_t | cam_mode | ||
| ) |
Definition at line 153 of file app_camerapipeline.c.
Referenced by __attribute__().
| int CMW_CAMERA_PIPE_FrameEventCallback | ( | uint32_t | pipe | ) |
Frame event callback.
| hdcmipp | pointer to the DCMIPP handle |
| None |
Definition at line 180 of file app_camerapipeline.c.
References cameraFrameReceived.
|
static |
Definition at line 40 of file app_camerapipeline.c.
References ASPECT_RATIO_CROP, ASPECT_RATIO_FIT, ASPECT_RATIO_FULLSCREEN, ASPECT_RATIO_MODE, and SCREEN_HEIGHT.
Referenced by CameraPipeline_Init().
|
static |
Definition at line 85 of file app_camerapipeline.c.
References ASPECT_RATIO_CROP, ASPECT_RATIO_FIT, ASPECT_RATIO_FULLSCREEN, ASPECT_RATIO_MODE, COLOR_MODE, NN_BPP, NN_HEIGHT, and NN_WIDTH.
Referenced by CameraPipeline_Init().
|
extern |
Camera frame ready flag.
Set to 1 by the DCMIPP interrupt handler when a new NN pipe frame has been captured in AXISRAM. The main loop polls this flag. Declared volatile to prevent compiler optimization of the polling loop.
Definition at line 179 of file main.c.
Referenced by __attribute__(), and CMW_CAMERA_PIPE_FrameEventCallback().