Why does imtophat fail code generation when not using dynamic memory allocation?

1 次查看(过去 30 天)
Using MATLAB Coder in 2015b, the following line:
A = imtophat(R, strel('disk',3));
Where R is a grayscale image in a 1200 x 1200 matrix
Leads to a failure that MATLAB Coder is unable to effectively describe (the error at that line is simply, "Function call failed").
Within MATLAB code, in morphop it complains "varargin and varargout are not supported here."
Further in "NeighborhoodProcessor", it complains "Logical indexing requires support of variable-sized arrays, which is currently disabled."
According to the MATLAB documentation I have satisfied the Coder requirements for imtophat, that the image is 3D or less and the structuring element is a compile time constant.
Turning on dynamic memory allocation allows code generation to proceed, but for obvious reasons I'd like to avoid that if possible.
So why is Coder having difficulty here?
  1 个评论
Anish Mitra
Anish Mitra 2016-2-23
Hi,
I am able to reproduce the error with a simple example. You could consider contacting MathWorks Technical Support in your region with a simple reproduction model.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 MATLAB Coder 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by