openpilot is an open source driver assistance system. openpilot performs the functions of Automated Lane Centering and Adaptive Cruise Control for over 200 supported car makes and models.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

36 lines
686 B

#pragma once
#include <stdbool.h>
#ifdef __APPLE__
#include <OpenCL/cl.h>
#else
#include <CL/cl.h>
#endif
#include "camera_common.h"
#define FRAME_BUF_COUNT 16
typedef struct CameraState {
CameraInfo ci;
int fps;
float digital_gain;
mat3 transform;
CameraBuf buf;
} CameraState;
typedef struct MultiCameraState {
CameraState rear;
CameraState front;
SubMaster *sm;
PubMaster *pm;
} MultiCameraState;
void cameras_init(MultiCameraState *s, cl_device_id device_id, cl_context ctx);
void cameras_open(MultiCameraState *s);
void cameras_run(MultiCameraState *s);
void cameras_close(MultiCameraState *s);
void camera_autoexposure(CameraState *s, float grey_frac);