<alp/camera.h> — Image Capture
Camera capture from MIPI CSI-2 (V2N, AEN, i.MX 93) or parallel CPI (fallback).
Header
#include <alp/camera.h>
Capture a frame
alp_camera_t *cam = alp_camera_open(&(alp_camera_config_t){
.sensor = ALP_CAMERA_SENSOR_OV5640,
.resolution = ALP_CAMERA_RES_VGA,
.pixel_format = ALP_CAMERA_FMT_RGB565,
});
alp_camera_frame_t frame;
alp_camera_capture(cam, &frame);
// frame.data / frame.width / frame.height / frame.pitch
process_frame(&frame);
alp_camera_release_frame(cam, &frame);
alp_camera_close(cam);
ISP toggles (v0.5)
alp_camera_configure_isp exposes the Mali-C55 ISP toggles on the AEN family (auto-exposure, auto-white-balance, gamma, sharpening).
V2N camera-mux
The E1M-X EVK uses a cam_mux chip to multiplex between an on-board OV5640 and an external MIPI CSI input. Select with the carrier chip driver before opening the camera:
cam_mux_t mux;
cam_mux_init(&mux, brd_i2c, 0x35);
cam_mux_select(&mux, CAM_MUX_INPUT_EXTERNAL);
See also
<alp/inference.h>— feed frames into a model- Examples: edgeai-vision-aen
Questions about this page? Discuss in Community Forum