Can't open camera with OpenCV

cancel
Showing results for 
Search instead for 
Did you mean: 

Can't open camera with OpenCV

84 Views
Contributor II

I tried some basic example code to get a picture from my camera with OpenCV, but all I get is the following error:

VIDEOIO ERROR: libv4l unable to ioctl S_FMT
VIDEOIO ERROR: libv4l unable to ioctl VIDIOCSPICT

why?

camera:ov5640 or mipi ov5640

Development board:imx6q

0 Kudos
1 Reply

9 Views
NXP TechSupport
NXP TechSupport

Hello song,

Error may be caused by i2c errors, one can debug it with oscilloscope in ov5640 I2C probe function ov5640_probe() or similar if other sensor was used

ov5640.c\capture\mxc\platform\media\drivers - linux-imx - i.MX Linux kernel 

You can debug it using AN4553 Using Open Source Debugging

Tools for Linux on i.MX Processors
https://www.nxp.com/docs/en/application-note/AN4553.pdf

0 Kudos