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

7 visualizaciones (últimos 30 días)
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 comentario
Anish Mitra
Anish Mitra el 23 de Feb. de 2016
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.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre MATLAB Coder en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by