29 case jevois::CameraSensor::any:
34 case jevois::CameraSensor::imx290:
53 case V4L2_PIX_FMT_SBGGR16:
54 case V4L2_PIX_FMT_RGB32:
55 case V4L2_PIX_FMT_RGB24:
56 case V4L2_PIX_FMT_YUYV:
57 case V4L2_PIX_FMT_GREY:
63 default:
return false;
69 if (m.
cw <= 1920 && m.
ch <= 1080 && m.
cfps <= 120.0)
return true;
74 case jevois::CameraSensor::os08a10:
93 case V4L2_PIX_FMT_SBGGR16:
94 case V4L2_PIX_FMT_RGB32:
95 case V4L2_PIX_FMT_RGB24:
96 case V4L2_PIX_FMT_YUYV:
97 case V4L2_PIX_FMT_GREY:
103 default:
return false;
109 if (m.
cw <= 3840 && m.
ch <= 2160 && m.
cfps <= 60.0)
return true;
114 case jevois::CameraSensor::ar0234:
133 case V4L2_PIX_FMT_SGRBG16:
134 case V4L2_PIX_FMT_RGB32:
135 case V4L2_PIX_FMT_RGB24:
136 case V4L2_PIX_FMT_YUYV:
137 case V4L2_PIX_FMT_GREY:
143 default:
return false;
149 if (m.
cw <= 1920 && m.
ch <= 1200 && m.
cfps <= 120.0)
return true;
155 case jevois::CameraSensor::ov9650:
157 if (m.
wdr != jevois::WDRtype::Linear)
return false;
158 if (m.
crop == jevois::CropType::CropScale)
return false;
169 if (m.
cfmt != V4L2_PIX_FMT_YUYV && m.
cfmt != V4L2_PIX_FMT_SRGGB8 && m.
cfmt != V4L2_PIX_FMT_RGB565)
return false;
171 if (m.
cw == 1280 && m.
ch == 1024) {
if (m.
cfps <= 15.0F)
return true;
else return false; }
172 if (m.
cw == 640 && m.
ch == 480) {
if (m.
cfps <= 30.0F)
return true;
else return false; }
173 if (m.
cw == 352 && m.
ch == 288) {
if (m.
cfps <= 60.0F)
return true;
else return false; }
174 if (m.
cw == 320 && m.
ch == 240) {
if (m.
cfps <= 60.0F)
return true;
else return false; }
175 if (m.
cw == 176 && m.
ch == 144) {
if (m.
cfps <= 120.0F)
return true;
else return false; }
176 if (m.
cw == 160 && m.
ch == 120) {
if (m.
cfps <= 60.0F)
return true;
else return false; }
177 if (m.
cw == 88 && m.
ch == 72) {
if (m.
cfps <= 120.0F)
return true;
else return false; }
182 case jevois::CameraSensor::ov2640:
184 if (m.
wdr != jevois::WDRtype::Linear)
return false;
185 if (m.
crop == jevois::CropType::CropScale)
return false;
200 if (m.
cfmt != V4L2_PIX_FMT_YUYV && m.
cfmt != V4L2_PIX_FMT_SRGGB8 && m.
cfmt != V4L2_PIX_FMT_RGB565)
return false;
202 if (m.
cw == 1600 && m.
ch == 1200) {
if (m.
cfps <= 15.0F)
return true;
else return false; }
203 if (m.
cw == 1280 && m.
ch == 1024) {
if (m.
cfps <= 15.0F)
return true;
else return false; }
204 if (m.
cw == 1280 && m.
ch == 720) {
if (m.
cfps <= 15.0F)
return true;
else return false; }
205 if (m.
cw == 1024 && m.
ch == 768) {
if (m.
cfps <= 15.0F)
return true;
else return false; }
206 if (m.
cw == 800 && m.
ch == 600) {
if (m.
cfps <= 40.0F)
return true;
else return false; }
207 if (m.
cw == 640 && m.
ch == 480) {
if (m.
cfps <= 40.0F)
return true;
else return false; }
208 if (m.
cw == 352 && m.
ch == 288) {
if (m.
cfps <= 60.0F)
return true;
else return false; }
209 if (m.
cw == 320 && m.
ch == 240) {
if (m.
cfps <= 60.0F)
return true;
else return false; }
210 if (m.
cw == 176 && m.
ch == 144) {
if (m.
cfps <= 60.0F)
return true;
else return false; }
211 if (m.
cw == 160 && m.
ch == 120) {
if (m.
cfps <= 60.0F)
return true;
else return false; }
212 if (m.
cw == 88 && m.
ch == 72) {
if (m.
cfps <= 60.0F)
return true;
else return false; }
217 case jevois::CameraSensor::ov7725:
219 if (m.
wdr != jevois::WDRtype::Linear)
return false;
220 if (m.
crop == jevois::CropType::CropScale)
return false;
230 if (m.
cfmt != V4L2_PIX_FMT_YUYV && m.
cfmt != V4L2_PIX_FMT_SRGGB8 && m.
cfmt != V4L2_PIX_FMT_RGB565)
return false;
232 if (m.
cw == 640 && m.
ch == 480) {
if (m.
cfps <= 60.0F)
return true;
else return false; }
233 if (m.
cw == 352 && m.
ch == 288) {
if (m.
cfps <= 60.0F)
return true;
else return false; }
234 if (m.
cw == 320 && m.
ch == 240) {
if (m.
cfps <= 60.0F)
return true;
else return false; }
235 if (m.
cw == 176 && m.
ch == 144) {
if (m.
cfps <= 60.0F)
return true;
else return false; }
236 if (m.
cw == 160 && m.
ch == 120) {
if (m.
cfps <= 60.0F)
return true;
else return false; }
237 if (m.
cw == 88 && m.
ch == 72) {
if (m.
cfps <= 60.0F)
return true;
else return false; }
242 case jevois::CameraSensor::ar0135:
244 if (m.
wdr != jevois::WDRtype::Linear)
return false;
245 if (m.
crop == jevois::CropType::CropScale)
return false;
258 if (m.
cfmt != V4L2_PIX_FMT_SRGGB8 && m.
cfmt != V4L2_PIX_FMT_GREY && m.
cfmt != V4L2_PIX_FMT_YUYV)
return false;
260 if (m.
cw == 1280 && m.
ch == 960) {
if (m.
cfps <= 54.0F)
return true;
else return false; }
261 if (m.
cw == 1280 && m.
ch == 720) {
if (m.
cfps <= 60.0F)
return true;
else return false; }
263 if (m.
cw == 640 && m.
ch == 480) {
if (m.
cfps <= 54.0F)
return true;
else return false; }
264 if (m.
cw == 640 && m.
ch == 360) {
if (m.
cfps <= 60.0F)
return true;
else return false; }
266 if (m.
cw == 320 && m.
ch == 240) {
if (m.
cfps <= 60.0F)
return true;
else return false; }
267 if (m.
cw == 320 && m.
ch == 180) {
if (m.
cfps <= 60.0F)
return true;
else return false; }
269 if (m.
cw == 160 && m.
ch == 120) {
if (m.
cfps <= 60.0F)
return true;
else return false; }
270 if (m.
cw == 160 && m.
ch == 90) {
if (m.
cfps <= 60.0F)
return true;
else return false; }
285 case jevois::CameraSensor::imx290:
286 case jevois::CameraSensor::os08a10:
287 case jevois::CameraSensor::ar0234:
289 case jevois::CameraSensor::ar0135:
301 unsigned int & capw,
unsigned int & caph,
int & preset)
309 case jevois::CameraSensor::imx290:
314 capw = 1920; caph = 1080;
315 if (m.
cfps > 60.0F) preset = 2;
316 else if (m.
cfps > 30.0F) preset = 1;
321 case jevois::CameraSensor::os08a10:
328 if (m.
cw > 1920 || m.
ch > 1080)
330 capw = 3840; caph = 2160;
331 if (m.
cfps > 30.0F) preset = 1;
336 capw = 1920; caph = 1080;
337 if (m.
cfps > 30.0F) preset = 3;
338 else if (m.
wdr != jevois::WDRtype::Linear) preset = 4;
343 case jevois::CameraSensor::ar0234:
353 capw = 1920; caph = 1200;
354 if (m.
cfps > 60.0F) preset = 5;
355 else if (m.
cfps > 30.0F) preset = 4;
360 capw = 1920; caph = 1080;
361 if (m.
cfps > 60.0F) preset = 2;
362 else if (m.
cfps > 30.0F) preset = 1;
371 capw = m.
cw; caph = m.
ch; preset = -1;
void sensorPrepareSetFormat(CameraSensor s, VideoMapping const &m, unsigned int &capw, unsigned int &caph, int &preset)
Load a sensor preset (JeVois-Pro only) and return native sensor grab dims (when cropping and/or scali...
bool sensorHasIMU(CameraSensor s)
Check whether sensor has an IMU (inertial measurement unit)
bool sensorSupportsFormat(CameraSensor s, VideoMapping const &m)
Check whether a given resolution and frame rate is supported by a sensor.
Simple struct to hold video mapping definitions for the processing Engine.
WDRtype wdr
Type of wide-dynamic-range (WDR) to use, if sensor supports it.
unsigned int cfmt
camera pixel format
CropType crop
Type of crop/scale to apply if camera size does not match sensor native.
float cfps
camera frame rate in frames/sec
unsigned int cw
camera width
unsigned int ch
camera height