codegen: use -package option error?
古いコメントを表示
When I use the codegen command line for code generation, I get the following error unexpectedly, which I guess is that the matlab built-in function detectORBFeatures calls the OpenCV source code???
inputsArgs = {'-config','cfg',...
'myEntryFcn','-args',{in1,in2},...
'-package','src.zip',...
'-report'};
codegen(inputsArgs{:});
report following bug:
The following files have the same file name which cannot be packaged together in a flat hierarchy:
C:\Program Files\MATLAB\R2022b\toolbox\vision\builtins\src\ocvcg\opencv\include\opencv2\stitching\detail\warpers.hpp
C:\Program Files\MATLAB\R2022b\toolbox\vision\builtins\src\ocvcg\opencv\include\\opencv2\stitching\warpers.hpp
Use help codegen for more information on using this command.
Error using codegen
Run in R2022b.
12 件のコメント
Mukund Sankaran
2022 年 10 月 26 日
Hi @cui, would you be able to share a minimal example that reproduces this issue ? How does your myEntryFcn look like, and what are the arguments and configuration being passed in the codegen command ?
Also, just out of curiosity, does the packaging work if you use packNGo, with the packType option set to 'hierarchical', instead of using the -package option with the codegen command ? Alternatively, you can also try this from within the code generation report, by clicking the 'Package Code' button in the report.
xingxingcui
2022 年 10 月 27 日
xingxingcui
2022 年 10 月 28 日
編集済み: xingxingcui
2022 年 10 月 28 日
Ujwal Durgam
2022 年 10 月 28 日
Yes, the detectORBFeatures calls the OpenCV library.
When the user sets the platform to a Non-Matlab host target (in this case, "TI->C6000"), the generated code does not include the OpenCV libs, but expects to have OpenCV installed on the target(TI->C6000) and link the installed libraries when compiling the code on the target.
xingxingcui
2022 年 10 月 28 日
Ujwal Durgam
2022 年 11 月 1 日
@cui Thanks for the feedback, we will take this into consideration.
xingxingcui
2022 年 11 月 2 日
編集済み: xingxingcui
2022 年 11 月 2 日
xingxingcui
2022 年 11 月 3 日
xingxingcui
2023 年 3 月 4 日
xingxingcui
2023 年 7 月 25 日
Ujwal Durgam
2023 年 7 月 25 日
-package runs packNGo on the generated code to package all files in a flat hierarchy. In this case, the opencv headers cannot be packed in flat hierarchy as clearly mentioned in the error message.
xingxingcui
2023 年 7 月 25 日
編集済み: xingxingcui
2023 年 7 月 25 日
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Code Generation, GPU, and Third-Party Support についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!