独立代码生成不支持功能"edge" [英] The function 'edge' is not supported for standalone code generation

查看:147
本文介绍了独立代码生成不支持功能"edge"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Simulink(MATLAB 2013a)的Matlab功能块内使用edge(I,'sobel')方法.尝试编译时,出现错误独立代码生成不支持功能'edge'". 我知道有一个边缘检测器块,但是我想在Matlab功能块中调用该函数.如何解决这个问题.

I am trying to use the edge(I,'sobel') method inside a Matlab function block in Simulink(MATLAB 2013a). When I try to compile, I get the error "The function 'edge' is not supported for standalone code generation". I know there is an edge detector block , but I want to call the function with in the Matlab function block. How to get around this.

推荐答案

如果具有计算机视觉系统工具箱,则可以使用vision.EdgeDetector系统对象.如果您有边缘检测器模块,那么您已经有了此工具箱.该对象支持代码生成.它使用的默认边缘检测器方法是"Sobel".为该对象生成代码时,请记住使用构造函数参数设置所有属性.生成代码后,您可能无法在构造后更改属性.

If you have Computer Vision System toolbox you can use vision.EdgeDetector System object. If you have edge detector block then you already have this toolbox. This object supports code generation. The default edge detector method it uses is 'Sobel'. When you generate code for this object remember to set all properties using constructor arguments. You may not be able to change properties after construction when generating code.

edgeObj = vision.EdgeDetector;
edges = step(edgeObj, inputImage);

这篇关于独立代码生成不支持功能"edge"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆