- 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 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Moritz Schneider
el 24 de Jun. de 2022
Comentada: Ramakrishna Mandalapu
el 17 de En. de 2023
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 comentarios
Ramakrishna Mandalapu
el 17 de En. de 2023
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
Respuestas (0)
Ver también
Categorías
Más información sobre Get Started with GPU Coder en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!