Prerequisites
- Set up your infrastructure as described in the Qualcomm Linux Build Guide
- Flash the latest software release to the development board.
- Set up SSH connection: Enable SSH in Permissive mode by performing the steps mentioned in Use SSH
-
Confirm that the
libopencv_fastcvlibrary is present/usr/libon the target. Occasionally, downloading thefastcv_linux_aarch64_2025_07_09.tgzfails, resulting in thelibopencv_fastcvlibraries not being generated. If the library is missing, download the latest bitbake file (opencv_4.13.0.bb) and recompile the build. After flashing the build, confirm that thelibopencv_fastcvlibrary is present in/usr/lib.
NoteBy default, test apps are enabled in builds due to https://github.com/qualcomm-linux/meta-qcom/blob/master/dynamic-layers/openembedded-layer/recipes-support/opencv/opencv_%25.bbappend
Enable the OpenCV library and test package
- To retain test bins, include the following code in the
<WORKSPACE>/dynamic-layers/openembedded-layer/recipes-support/opencv/opencv_%.bbappendrecipe file: - When the build is already compiled, OpenCV must be cleaned before compilation. To clean OpenCV, run the following command:
During compilation no code is modified, so a direct compilation doesn’t generate the corresponding bins.
- To compile OpenCV, run the following command:
tmp-glibc\sysroots-components\armv8-2a\opencv\usr\lib.
The path to the bins is tmp-glibc\work\armv8-2a-qcom-linux\opencv\4.13.0\build\bin.
Run the existing test application
To invoke the OpenCV API, native OpenCV test examples can reference sample applications. Use the following procedure to invoke applications on the Snapdragon target. Compile the full build image to ensure that all libraries are part of the application images.-
Flash the images on the device as described in the Qualcomm Linux Build Guide.
OpenCV libraries are on the device at
/usr/lib. -
For test data, clone the projects at https://github.com/opencv/opencv_extra/tree/4.13.0.
-
To avoid read only errors while trying to push test data and bins to the device, use the device IP address to log in to an SSH terminal and run the following command to remount the device.
-
Use the
scpcommand to push the test data to a preferred host location. For example:scp -r {[file]} root@{[IP-ADDR]}:/tmp -
Use the
scpcommand to push the required test bin to/usr/bin. For example:scp -r {[test]} root@{[IP-ADDR]}:/usr/bin/ -
Sign in to an SSH terminal and run the following commands.
Results are stored in
/tmp/results.json. To change the results filename, modify the--gtest_output=json:/tmp/{results.json}argument.

