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

조회 수: 5 (최근 30일)
Troy Cumbo
Troy Cumbo 2016년 2월 18일
댓글: Anish Mitra 2016년 2월 23일
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