- Use coder.cinclude in your .m file to establish dependency on OpenCV headers.
- Use coder.ceval in your .m file to make calls to the OpenCV apis to read the image.
imread Nvidia Jetson Nano not working
조회 수: 2 (최근 30일)
이전 댓글 표시
i'm trying to get my Jetson Nano to work with the MATLAB Coder Support Package for NVIDIA Jetson Package.
I installed all the prerequisites and succesfully connected with the Jetson Nano. I put an JPG-image(with putFile) into a folder and wrote following function:
function showPics(string1)
img1 = (imread(string1));
d = imageDisplay(hwJetson);
image(d,img1);
end
then i tried to compile that and build it on the jetson with these commands:
cfg = coder.config('exe');
cfg.TargetLang = 'C++';
cfg.Hardware = coder.hardware('NVIDIA Jetson');
cfg.Hardware.BuildDir = '~/Matlabtest';
cfg.CustomSource = fullfile('main.cpp');
codegen('-config',"cfg","showPics","-args",{"~/Matlabtest/left1.jpg"});
all i'm getting is the following error:
??? The function imread uses a precompiled shared library which is not supported on
the chosen target.
i took a look on the documentation (https://de.mathworks.com/help/matlab/ref/imread.html?searchHighlight=imread&s_tid=srchtitle_imread_1) and it says:
GPU Code Generation
Generate CUDA® code for NVIDIA® GPUs using GPU Coder™.
Usage notes and limitations:
- Supports reading of 8-bit JPEG images only. The input argument filename must be a valid absolute path or relative path.
- This function generates code that uses a precompiled, platform-specific shared library (Image Processing Toolbox).
there it must be possible to use imread with the Jetson... can't find anything on google. The application will use the attached webcams, but for now it's easier to develop with images already taken.
i tried the coder.CheckGpuInstall command, which passes all test. i get the following result:
Compatible GPU : PASSED (Warning: Support for GPU devices with Compute Capability 5.2 will be removed in a future MATLAB release. For more information on GPU support, see GPU Support by Release.)
CUDA Environment : PASSED
Runtime : PASSED
cuFFT : PASSED
cuSOLVER : PASSED
cuBLAS : PASSED
cuDNN
Environment : PASSED (Warning: Deep learning code generation has been tested with cuDNN v8.1. The provided cuDNN library v8.4 may not be fully compatible.)
Basic Code Generation : PASSED
Basic Code Execution : PASSED
ans =
struct with fields:
gpu: 1
cuda: 1
cudnn: 1
tensorrt: 0
basiccodegen: 1
basiccodeexec: 1
deepcodegen: 0
deepcodeexec: 0
tensorrtdatatype: 0
profiling: 0
I'm stuck for now and really appreciate all the help i can get :)
댓글 수: 6
Ramakrishna Mandalapu
2023년 1월 17일
Hi Moritz,
Did you manually run the application on the target? If not please run it manually, we will get to know if there are any compalints while running. You can also get the runtime log using the command shown in the above text
system(hwobj,'cat /home/flexybot/Matlabtest/MATLAB_ws/R2022a/C/Users/Moritz/Documents/Flexybot/Code/Matlab_Test/imreadOpenCV.log').
This will show if there are any issues while running the executable on the target.
Thanks,
Ramakrishna
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Get Started with GPU Coder에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!