device: camera: add libcamera cam commandline tool
This brings in the "cam" commandline utility, which can be used in userdebug (using adb root) to capture some frames from the ov5640 CSI camera.
This is a debugging tool, hence it's only available in userdebug builds.
To use the camera, make sure to:
- Plug it in, hardware wise
- Select dtbo_index 2 in U-boot shell with:
=> env set dtbo_index 2
=> saveenv
=> reset
Then, a capture can be taken with:
adb root && adb shell
am62x:/ # mkdir /data/vendor/hardware/camera
am62x:/ # cam -c1 -C1 -s pixelformat=YUYV,width=1024,height=768 --file=/data/vendor/hardware/camera/
To view the picture, it can be converted with ffmpeg:
adb pull /data/vendor/hardware/camera/
ffmpeg -f rawvideo -s 1024x768 -pix_fmt yuyv422 -i camera/frame-cam0-stream0-000000.bin picture.png
Signed-off-by: Guillaume La Roque glaroque@baylibre.com Signed-off-by: Mattijs Korpershoek mkorpershoek@baylibre.com
Bug: TIAU-117
Series:
Edited by Mattijs Korpershoek