Hi,
I am developing an android application on my Samsung A70 using OpenCV and FastCV in android studio. For testing purpose, I used functions for converting RGB image to grayscale. Both libraries run successfully and display appropriate output. However, FastCV runs really slow.
for 1000x iteration, OpenCV completes the task in 2 seconds, while fastcv in 5.3 seconds. I have used all 4 modes (Low power, performance,... ), but the result stays the same.
Here is the logcat output:
2022-07-25 15:19:11.159 27632-27632/com.example.android.opencvcpp E/libc: Access denied finding property "vendor.runtime.fastcv.log"
2022-07-25 15:19:11.159 27632-27632/com.example.android.opencvcpp E/com.example.android.opencvcpp: vendor/qcom/proprietary/commonsys-intf/adsprpc/src/fastrpc_apps_user.c:2397: Error 0xd: open_shell failed for domain 3 search paths used are /dsp/, /vendor/dsp/, /vendor/dsp/xdsp/ (errno Permission denied)2022-07-25 15:19:11.159 27632-27632/com.example.android.opencvcpp E/com.example.android.opencvcpp: vendor/qcom/proprietary/commonsys-intf/adsprpc/src/apps_std_imp.c:596:Error 0xffffffff: apps_std getenv failed: ADSP_LIBRARY_PATH Unknown error -12022-07-25 15:19:11.159 27632-27632/com.example.android.opencvcpp E/com.example.android.opencvcpp: vendor/qcom/proprietary/commonsys-intf/adsprpc/src/apps_std_imp.c:596:Error 0xffffffff: apps_std getenv failed: ADSP_LIBRARY_PATH Unknown error -12022-07-25 15:19:11.160 27632-27632/com.example.android.opencvcpp E/com.example.android.opencvcpp: vendor/qcom/proprietary/commonsys-intf/adsprpc/src/apps_std_imp.c:921:Error 0x2: fileExists failed for path /vendor/lib/rfsa/adsp/com.example.android.opencvcpp.debugconfig, errno is No such file or directory2022-07-25 15:19:11.160 27632-27632/com.example.android.opencvcpp E/com.example.android.opencvcpp: vendor/qcom/proprietary/commonsys-intf/adsprpc/src/fastrpc_config.c:57::error: 2: AEE_SUCCESS == (nErr = apps_std_fileExists(path, &fileExists))2022-07-25 15:19:11.186 27632-27632/com.example.android.opencvcpp E/com.example.android.opencvcpp: vendor/qcom/proprietary/commonsys-intf/adsprpc/src/apps_std_imp.c:596:Error 0xffffffff: apps_std getenv failed: ADSP_LIBRARY_PATH Unknown error -12022-07-25 15:19:11.186 27632-27632/com.example.android.opencvcpp E/com.example.android.opencvcpp: vendor/qcom/proprietary/commonsys-intf/adsprpc/src/apps_std_imp.c:596:Error 0xffffffff: apps_std getenv failed: ADSP_LIBRARY_PATH Unknown error -12022-07-25 15:19:11.186 27632-1348/com.example.android.opencvcpp E/com.example.android.opencvcpp: vendor/qcom/proprietary/commonsys-intf/adsprpc/src/apps_std_imp.c:921:Error 0x2: fileExists failed for path /vendor/lib/rfsa/adsp/com.example.android.opencvcpp.farf, errno is No such file or directory2022-07-25 15:19:11.186 27632-1348/com.example.android.opencvcpp E/com.example.android.opencvcpp: vendor/qcom/proprietary/commonsys-intf/adsprpc/src/log_config.c:174::error: 2: AEE_SUCCESS == (nErr = apps_std_fileExists(path,&fileExists))2022-07-25 15:19:11.186 27632-1348/com.example.android.opencvcpp E/com.example.android.opencvcpp: vendor/qcom/proprietary/commonsys-intf/adsprpc/src/log_config.c:268:Error 2: fopen failed for /vendor/lib/rfsa/adsp/com.example.android.opencvcpp.farf. (No such file or directory)2022-07-25 15:19:11.187 27632-1347/com.example.android.opencvcpp E/com.example.android.opencvcpp: vendor/qcom/proprietary/commonsys-intf/adsprpc/src/apps_std_imp.c:596:Error 0xffffffff: apps_std getenv failed: ADSP_LIBRARY_PATH Unknown error -12022-07-25 15:19:11.188 27632-1347/com.example.android.opencvcpp E/com.example.android.opencvcpp: vendor/qcom/proprietary/commonsys-intf/adsprpc/src/apps_std_imp.c:190:Error 0x9: apps_std_FILE_get failed for fd 0x464, errno Bad file descriptor2022-07-25 15:19:11.188 27632-1347/com.example.android.opencvcpp E/com.example.android.opencvcpp: vendor/qcom/proprietary/commonsys-intf/adsprpc/src/apps_std_imp.c:446::error: 9: 0 == (nErr = apps_std_FILE_get(sin, &sinfo))2022-07-25 15:19:11.188 27632-1347/com.example.android.opencvcpp E/com.example.android.opencvcpp: vendor/qcom/proprietary/commonsys-intf/adsprpc/src/apps_std_imp.c:471:Error 0x9: fseek failed for 464, errno is Bad file descriptor2022-07-25 15:19:11.188 27632-1347/com.example.android.opencvcpp E/com.example.android.opencvcpp: vendor/qcom/proprietary/commonsys-intf/adsprpc/src/apps_std_imp.c:190:Error 0x9: apps_std_FILE_get failed for fd 0x464, errno Bad file descriptor2022-07-25 15:19:11.188 27632-1347/com.example.android.opencvcpp E/com.example.android.opencvcpp: vendor/qcom/proprietary/commonsys-intf/adsprpc/src/apps_std_imp.c:299::error: 9: 0 == (nErr = apps_std_FILE_get(sin, &sinfo))2022-07-25 15:19:11.189 27632-1347/com.example.android.opencvcpp E/com.example.android.opencvcpp: vendor/qcom/proprietary/commonsys-intf/adsprpc/src/apps_std_imp.c:190:Error 0x9: apps_std_FILE_get failed for fd 0x464, errno Bad file descriptor2022-07-25 15:19:11.189 27632-1347/com.example.android.opencvcpp E/com.example.android.opencvcpp: vendor/qcom/proprietary/commonsys-intf/adsprpc/src/apps_std_imp.c:446::error: 9: 0 == (nErr = apps_std_FILE_get(sin, &sinfo))2022-07-25 15:19:11.189 27632-1347/com.example.android.opencvcpp E/com.example.android.opencvcpp: vendor/qcom/proprietary/commonsys-intf/adsprpc/src/apps_std_imp.c:471:Error 0x9: fseek failed for 464, errno is Bad file descriptor2022-07-25 15:19:11.189 27632-1347/com.example.android.opencvcpp E/com.example.android.opencvcpp: vendor/qcom/proprietary/commonsys-intf/adsprpc/src/apps_std_imp.c:190:Error 0x9: apps_std_FILE_get failed for fd 0x464, errno Bad file descriptor2022-07-25 15:19:11.189 27632-1347/com.example.android.opencvcpp E/com.example.android.opencvcpp: vendor/qcom/proprietary/commonsys-intf/adsprpc/src/apps_std_imp.c:446::error: 9: 0 == (nErr = apps_std_FILE_get(sin, &sinfo)).
.
.
2022-07-25 15:19:11.279 27632-1347/com.example.android.opencvcpp E/com.example.android.opencvcpp: vendor/qcom/proprietary/commonsys-intf/adsprpc/src/apps_std_imp.c:287:Error 0x9: freopen for 464 failed. errno: Bad file descriptor2022-07-25 15:19:11.291 27632-27632/com.example.android.opencvcpp E/fastcv_lib_log: Begin of fcvQ6SessionInit_internal dsp_handle=12970367439795843856 22620 vendor/qcom/proprietary/cv-noship/fastcv/src/qdsp_rpc/multi_domains/qcvaq6rpc_clnt_abstractionLayer.c2022-07-25 15:19:11.292 27632-27632/com.example.android.opencvcpp E/fastcv_lib_log: Checking for fcvVersion 22627 vendor/qcom/proprietary/cv-noship/fastcv/src/qdsp_rpc/multi_domains/qcvaq6rpc_clnt_abstractionLayer.c2022-07-25 15:19:11.310 27632-27632/com.example.android.opencvcpp E/libc: Access denied finding property "vendor.runtime.fastcv.log"2022-07-25 15:19:11.310 27632-27632/com.example.android.opencvcpp E/libc: Access denied finding property "vendor.runtime.fastcv.log"2022-07-25 15:19:11.318 27632-27632/com.example.android.opencvcpp E/libc: Access denied finding property "vendor.runtime.fastcv.log"2022-07-25 15:19:11.326 27632-27632/com.example.android.opencvcpp E/libc: Access denied finding property "vendor.runtime.fastcv.log"2022-07-25 15:19:16.689 27632-1347/com.example.android.opencvcpp E/com.example.android.opencvcpp: vendor/qcom/proprietary/commonsys-intf/adsprpc/src/fastrpc_apps_user.c:1085: Error 0x4e: remote_handle_invoke failed for handle 0x3, method 4 on domain 3 (sc 0x4020200) (errno Operation not permitted)2022-07-25 15:19:16.689 27632-1347/com.example.android.opencvcpp E/com.example.android.opencvcpp: vendor/qcom/proprietary/commonsys-intf/adsprpc/src/fastrpc_apps_user.c:1085: Error 0x8000040d: remote_handle_invoke failed for handle 0x3, method 4 on domain 3 (sc 0x4020200) (errno Success)2022-07-25 15:19:16.689 27632-1347/com.example.android.opencvcpp E/com.example.android.opencvcpp: vendor/qcom/proprietary/commonsys-intf/adsprpc/src/listener_android.c:143:Error 0x8000040d: listener response with result 0x0 for ctx 0x190dc, handle 0xcc6ac9f8, sc 0xffffffff failed2022-07-25 15:19:16.689 27632-1347/com.example.android.opencvcpp E/com.example.android.opencvcpp: vendor/qcom/proprietary/commonsys-intf/adsprpc/src/listener_android.c:229:Error 0x8000040d: listener thread exited (errno Success)2022-07-25 15:19:16.689 27632-1347/com.example.android.opencvcpp E/com.example.android.opencvcpp: vendor/qcom/proprietary/commonsys-intf/adsprpc/src/fastrpc_apps_user.c:1105: Error 0x8000040d: remote_handle64_invoke failed for handle 0x6f52f310, method 3 on domain 3 (sc 0x3000000) (errno Success)
It seems that the operations run sequentially on CPU with no multithreading or running on DSP.
If anyone has experience with FastCV, I would appriciate any help.
Thank you in advance.
Peyman
Hi,
Please set following environment variables in shell before running:
Hi,
Thank you for your response. I have set the environment variables, but the errors stay the same.
I also tried to set the variables inside the app. the error
is gone, but the other errors are still there.Here are the errors: