imread Nvidia Jetson Nano not working

조회 수: 2 (최근 30일)
Moritz Schneider
Moritz Schneider 2022년 6월 24일
댓글: Ramakrishna Mandalapu 2023년 1월 17일
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
Moritz Schneider
Moritz Schneider 2022년 6월 30일
I kind of fixed the error. I just use the whole readResizedImage-Code and added:
hwobj = jetson;
d = imageDisplay(hwobj);
image(d,rgbImage);
The Code compiles & builds, then i run it on the Jetson via: runApplication, but nothing happening. No Window showing the Image pops up. I get the following in the Command Window
Code generation successful: View report
### Launching the executable on the target...
Executable launched successfully with process ID 15729.
Displaying the simple runtime log for the executable...
Note: For the complete log, run the following command in the MATLAB command window:
system(hwobj,'cat /home/flexybot/Matlabtest/MATLAB_ws/R2022a/C/Users/Moritz/Documents/Flexybot/Code/Matlab_Test/imreadOpenCV.log')
I Tried the liveCapture Example to see if there are any problems with the sdl-lib. It runs perfectly.
So, what did i do wrong? I again don't understand it...i attached the function in case that might help.
Would appreciate some help :)
Ramakrishna Mandalapu
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 CenterFile 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!

Translated by