I have been digging into the support for CSI cameras, in particular the pi camera v2 with the yocto image. So far I have managed to get the camera connected and capturing images, albeit in a format I am new too.
To connect the pi camera v2 to the BeagleV-Ahead I am using a pi zero Raspberry Pi Zero Camera Cable which goes from 15 pins on the camera, to 22 pins on the board. You must be careful to ensure pin 1 on both ends is correctly matched. I used references on the web for the camera pin outs, “J1” is clearly marked on the board, and the schematic published for the BeagleV-Ahead board.
To capture images I am using the examples in
/usr/share/csi_hal by running.
./cam_demo_simple 0 0 1 0 640 480 1
This outputs a bunch of files with no suffix, these are actually yuv files which you can convert using ffmpeg, I copy these over to my desktop at the moment and convert them as follows:
mv demo_save_img_IMX219_ch0_0_0 demo_save_img_IMX219_ch0_0_0.yuv ffmpeg -s 640x480 -pix_fmt yuv420p -i demo_save_img_IMX219_ch0_0_0.yuv demo_save_img_IMX219_ch0_0_0.png
These are just some notes from my experiments, still figuring out the image settings and code based on https://github.com/thead-yocto-mirror/csi_hal/blob/7f90ed1091007f48f73cf84f42c6d6c9e3211188/examples/camera/cam_demo_simple.c arguments aren’t very intuitive…
Hopefully that helps anyone else hacking away.
If I have done anything incorrect, or you have some suggestions please post them!