Directly read Bayer10 data from imx219 CSI-2

Hello,

I would like to directly read CSI-2 data from the IMX219 sensor.
I’d like to do some quick/simple processing of the data in chunks using the CPU and hand off the results to the GPU for further/parallel processing.

I don’t want to wait until the image has been fully read before I start processing it. Ain’t nobody got time for that.

What API should I use to do this?
Some ‘hello world’ code would be nice :-)

Thanks!

You can get the raw data via the video-4-linux API but you will still get the whole frame, not “chunks”. There is no way to somehow process the CSI-2 stream by yourself.

I note the raspiraw github repo shows how to capture at 655fps (640x128 resolution - so a snippet of the image).

Will the v4l2 API let me capture high frame rate snippets of the image like this?

Thanks!

You can modify the imx219 device tree and driver to add a 640x128 resolution. This way you should get the same frame rate.