codegen: use -package option error?

4 ビュー (過去 30 日間)
cui,xingxing
cui,xingxing 2022 年 10 月 26 日
編集済み: cui,xingxing 2023 年 7 月 25 日
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 件のコメント
Ujwal Durgam
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.
For this case you need to manually run packNGo with packType='hierarchical'.
cui,xingxing
cui,xingxing 2023 年 7 月 25 日
編集済み: cui,xingxing 2023 年 7 月 25 日
Thank your for your reply, I know what you mean, now I'm having a different problem, may I ask if you clicked on the link above?
The large number of dependent header and source files is indeed a tricky issue

サインインしてコメントする。

採用された回答

cui,xingxing
cui,xingxing 2022 年 10 月 28 日
編集済み: cui,xingxing 2022 年 10 月 28 日
The correct approach is for the codegen command to not use the -package option.Then,this bug is easily fixed by manually copying the separate C code.
Also, detectORBFeatures does call a third-party OPENCV library, which is not clearly stated in the official documentation function on the C/C++ generated support description(Extended Capabilities section(bottom page)).Which, in terms of the generated code, is simply a wrapping of the ORB feature detection to fit the C code generation.

その他の回答 (0 件)

タグ

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by