how to run deep learning project with raspberry pi 4 modelB

19 次查看(过去 30 天)
but i don't know how to solve this error.
and when i saw this website i can actually understand how should i do.
: https://kr.mathworks.com/help/coder/ug/prerequisites-for-deep-learning-with-matlab-coder.html
this is my installed add-ons.
<< error code>>
Deploying code. This may take a few minutes.
------------------------------------------------------------------------
Error executing command "touch -c /home/jhch/MATLAB_ws/R2023a/C/matlap-lab/programs/RaspPi_19aCam/codegen/exe/targetFunction/*.*;make -j$(($(nproc)+1)) -Otarget -f targetFunction_rtw.mk all MATLAB_WORKSPACE="/home/jhch/MATLAB_ws/R2023a" LINUX_TARGET_LIBS_MACRO="" -C /home/jhch/MATLAB_ws/R2023a/C/matlap-lab/programs/RaspPi_19aCam/codegen/exe/targetFunction LC_ALL=C". Details:
STDERR: /home/jhch/MATLAB_ws/R2023a/C/matlap-lab/programs/RaspPi_19aCam/main_nutsDet_arm.cpp:15:10: fatal error: opencv2/opencv.hpp: No such file or directory
15 | #include "opencv2/opencv.hpp"
| ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [targetFunction_rtw.mk:509: main_nutsDet_arm.cpp.o] Error 1
make: *** Waiting for unfinished jobs....
STDOUT: make: Entering directory '/home/jhch/MATLAB_ws/R2023a/C/matlap-lab/programs/RaspPi_19aCam/codegen/exe/targetFunction'
g++ -c -MMD -MP -MF"MWInputLayer.cpp.dep" -MT"MWInputLayer.cpp.o" -fpermissive -O2 -std=c++11 -mfpu=neon -fopenmp -fopenmp -DUSE_20_02_1_LIBRARY -D__MW_TARGET_USE_HARDWARE_RESOURCES_H__ -D__linux__ -DARM_PROJECT -D_USE_TARGET_UDP_ -D_RUNONTARGETHARDWARE_BUILD_ -DSTACK_SIZE=200000 -DMODEL=targetFunction -I/home/jhch/MATLAB_ws/R2023a/C/matlap-lab/programs/RaspPi_19aCam/codegen/exe/targetFunction -I/home/jhch/MATLAB_ws/R2023a/C/matlap-lab/programs/RaspPi_19aCam -I/opt/ComputeLibrary -I/opt/ComputeLibrary/include -I/home/jhch/MATLAB_ws/R2023a/C/Program_Files/MATLAB/R2023a/toolbox/vision/builtins/src/vision/include -I/home/jhch/MATLAB_ws/R2023a/C/Program_Files/MATLAB/R2023a/toolbox/vision/builtins/src/vision/export/include/vision -I/home/jhch/MATLAB_ws/R2023a/C/ProgramData/MATLAB/SupportPackages/R2023a/toolbox/realtime/targets/raspi/include -I/home/jhch/MATLAB_ws/R2023a/C/Program_Files/MATLAB/R2023a/toolbox/coder/rtiostream/src/utils -I/home/jhch/MATLAB_ws/R2023a/C/Program_Files/MATLAB/R2023a/extern/include -o "MWInputLayer.cpp.o" "/home/jhch/MATLAB_ws/R2023a/C/matlap-lab/programs/RaspPi_19aCam/codegen/exe/targetFunction/MWInputLayer.cpp"
make: Leaving directory '/home/jhch/MATLAB_ws/R2023a/C/matlap-lab/programs/RaspPi_19aCam/codegen/exe/targetFunction'
make: Entering directory '/home/jhch/MATLAB_ws/R2023a/C/matlap-lab/programs/RaspPi_19aCam/codegen/exe/targetFunction'
g++ -c -MMD -MP -MF"MWMaxPoolingLayer.cpp.dep" -MT"MWMaxPoolingLayer.cpp.o" -fpermissive -O2 -std=c++11 -mfpu=neon -fopenmp -fopenmp -DUSE_20_02_1_LIBRARY -D__MW_TARGET_USE_HARDWARE_RESOURCES_H__ -D__linux__ -DARM_PROJECT -D_USE_TARGET_UDP_ -D_RUNONTARGETHARDWARE_BUILD_ -DSTACK_SIZE=200000 -DMODEL=targetFunction -I/home/jhch/MATLAB_ws/R2023a/C/matlap-lab/programs/RaspPi_19aCam/codegen/exe/targetFunction -I/home/jhch/MATLAB_ws/R2023a/C/matlap-lab/programs/RaspPi_19aCam -I/opt/ComputeLibrary -I/opt/ComputeLibrary/include -I/home/jhch/MATLAB_ws/R2023a/C/Program_Files/MATLAB/R2023a/toolbox/vision/builtins/src/vision/include -I/home/jhch/MATLAB_ws/R2023a/C/Program_Files/MATLAB/R2023a/toolbox/vision/builtins/src/vision/export/include/vision -I/home/jhch/MATLAB_ws/R2023a/C/ProgramData/MATLAB/SupportPackages/R2023a/toolbox/realtime/targets/raspi/include -I/home/jhch/MATLAB_ws/R2023a/C/Program_Files/MATLAB/R2023a/toolbox/coder/rtiostream/src/utils -I/home/jhch/MATLAB_ws/R2023a/C/Program_Files/MATLAB/R2023a/extern/include -o "MWMaxPoolingLayer.cpp.o" "/home/jhch/MATLAB_ws/R2023a/C/matlap-lab/programs/RaspPi_19aCam/codegen/exe/targetFunction/MWMaxPoolingLayer.cpp"
make: Leaving directory '/home/jhch/MATLAB_ws/R2023a/C/matlap-lab/programs/RaspPi_19aCam/codegen/exe/targetFunction'
g++ -c -MMD -MP -MF"insertShapeUtilsCore.cpp.dep" -MT"insertShapeUtilsCore.cpp.o" -fpermissive -O2 -std=c++11 -mfpu=neon -fopenmp -fopenmp -DUSE_20_02_1_LIBRARY -D__MW_TARGET_USE_HARDWARE_RESOURCES_H__ -D__linux__ -DARM_PROJECT -D_USE_TARGET_UDP_ -D_RUNONTARGETHARDWARE_BUILD_ -DSTACK_SIZE=200000 -DMODEL=targetFunction -I/home/jhch/MATLAB_ws/R2023a/C/matlap-lab/programs/RaspPi_19aCam/codegen/exe/targetFunction -I/home/jhch/MATLAB_ws/R2023a/C/matlap-lab/programs/RaspPi_19aCam -I/opt/ComputeLibrary -I/opt/ComputeLibrary/include -I/home/jhch/MATLAB_ws/R2023a/C/Program_Files/MATLAB/R2023a/toolbox/vision/builtins/src/vision/include -I/home/jhch/MATLAB_ws/R2023a/C/Program_Files/MATLAB/R2023a/toolbox/vision/builtins/src/vision/export/include/vision -I/home/jhch/MATLAB_ws/R2023a/C/ProgramData/MATLAB/SupportPackages/R2023a/toolbox/realtime/targets/raspi/include -I/home/jhch/MATLAB_ws/R2023a/C/Program_Files/MATLAB/R2023a/toolbox/coder/rtiostream/src/utils -I/home/jhch/MATLAB_ws/R2023a/C/Program_Files/MATLAB/R2023a/extern/include -o "insertShapeUtilsCore.cpp.o" "/home/jhch/MATLAB_ws/R2023a/C/Program_Files/MATLAB/R2023a/toolbox/vision/builtins/src/vision/insertShapeUtilsCore.cpp"
make: Leaving directory '/home/jhch/MATLAB_ws/R2023a/C/matlap-lab/programs/RaspPi_19aCam/codegen/exe/targetFunction'
------------------------------------------------------------------------
Build error: C++ compiler produced
errors. See the Build Log for further
details.
Code generation failed: View Error Report

回答(1 个)

MathWorks MATLAB Hardware Team
编辑:MathWorks MATLAB Hardware Team 2023-8-22
Hi,
It appears that OpenCV and ARM Compute libraries are not installed on your hardware. To resolve this, you can follow these steps using the hardware setup screen.
  • Go to Home tab -> click on Add-Ons dropdown
  • Select Manage Add-Ons
  • Search for MATLAB Support Package for Raspberry Pi Hardware
  • Click on the gear icon at then end
  • Follow the screens
  • Select "Yes" from Install ARM Compute Library screen
  • Select "Yes" from Install OpenCV Library screen
Refer to the following link to know more,
Thanks,
MATLAB Hardware Team
MathWorks
  1 个评论
호찬
호찬 2023-8-23
hi thank you for your answer!!
but after i followed steps you suggested, i can't still run these code.
is there i have to do about " environment variables"??

请先登录,再进行评论。

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by