【问题标题】:Converting from matlab code to c++从 matlab 代码转换为 c++
【发布时间】:2014-03-15 16:01:37
【问题描述】:

我想将此 MATLAB 代码转换为 c++

function [ c ] = main() 
%#codegen
coder.inline('never'); 

c = imread('focus.jpg');

但它给了我这个error : The function 'imread' is not supported for standalone code generation. See the documentation for coder.extrinsic ??!!

【问题讨论】:

  • 你读过coder.extrinsic吗?它解释了如何在安装了 matlab 的目标系统上解决它。
  • 我把这个声明:coder.extrinsic('imread');它只是给了我另一个错误
  • 未能消除对 MATLAB 函数“imread”的使用。对于非仿真构建,如果不影响函数输出,则不使用不受支持的 MATLAB 函数。

标签: c++ matlab matlab-deployment matlab-coder


【解决方案1】:

matlab coder 中不支持函数“imread”,但 matlab 编译器通过在 matlab 的命令窗口中使用关键字deploytool 来支持它。

【讨论】:

    猜你喜欢
    • 2023-03-27
    • 2014-05-21
    • 1970-01-01
    • 2014-12-30
    • 2017-10-06
    • 2013-01-18
    • 2019-05-05
    • 2011-03-27
    • 2017-08-13
    相关资源
    最近更新 更多