Hi everyone,
I have been trying to get the pipeline scaling as mentioned here working with an OV5640 camera without much luck.
So far the best I have managed is to use the camera at a higher resolution of 1280x720 and rescale the image in software using OpenCV, but this has a large performance impact.
The working commands for setting this up are:
sudo media-ctl -d /dev/media1 -l '"msm_csiphy0":1->"msm_csid0":0[1],"msm_csid0":1->"msm_ispif0":0[1],"msm_ispif0":1->"msm_vfe0_rdi0":0[1]'
sudo media-ctl -d /dev/media1 -V '"ov5640 1-0078":0[fmt:UYVY8_2X8/1280x720 field:none],"msm_csiphy0":0[fmt:UYVY8_2X8/1280x720 field:none],"msm_csid0":0[fmt:UYVY8_2X8/1280x720 field:none],"msm_ispif0":0[fmt:UYVY8_2X8/1280x720 field:none],"msm_vfe0_rdi0":0[fmt:UYVY8_2X8/1280x720 field:none]'
This allows me to grab the camera images and shrink them myself.
What I am trying to get working is using the pipeline to scale the image down much smaller, such as 480x270, to reduce the CPU workload for processing the images.
My current commands look like this:
sudo media-ctl -d /dev/media1 -l '"msm_csiphy0":1->"msm_csid0":0[1],"msm_csid0":1->"msm_ispif0":0[1],"msm_ispif0":1->"msm_vfe0_pix":0[1]'
sudo media-ctl -d /dev/media1 -V '"ov5640 1-0078":0[fmt:UYVY8_2X8/1920x1080 field:none],"msm_csiphy0":0[fmt:UYVY8_2X8/1920x1080 field:none],"msm_csid0":0[fmt:UYVY8_2X8/1920x1080 field:none],"msm_ispif0":0[fmt:UYVY8_2X8/1920x1080 field:none],"msm_vfe0_pix":0[fmt:UYVY8_2X8/1920x1080 field:none compose:(0,0)/480x270],"msm_vfe0_pix":1[fmt:UYVY8_2X8/480x270 field:none]'
This fails with the error Unable to setup formats: Inappropriate ioctl for device (25)
, so I presume I have made a mistake somewhere.
I am currently running the Release v1.1.1 Linux Kernel from the D3Engineering GitHub, full version Linux linaro-alip 4.9-camera-lt-qcom #1 SMP PREEMPT Fri Jun 30 16:14:43 UTC 2017 aarch64 GNU/Linux
I have also tried the latest standard Linaro Debian build, dragonboard410c_sdcard_install_debian-252.zip
, but it does not show /dev/media1
at all so I presume the necessary driver(s) for the camera are missing.
Any help pointing me in the right direction would be appreciated as I am rather stuck at this stage. In particular it would be helpful to know if this is likely to be a mistake with the commands or a problem with the software setup / drivers.
Thanks,
Arron.