필터 지우기
필터 지우기

Problems with using mxarrays with the step function in MATLAB Coder

조회 수: 3 (최근 30일)
I'm trying to convert my image processing code on MATLAB into C by using MATLAB coder. using 'imread' needs a coder.entrinsic declaration. However, this means that the output to imread will be an mxArray. This is a problem as I cannot use this with the step function. The error report from code generation is shown below:
Does anyone know a way around this? Help will be very much appreciated!

채택된 답변

Sharan Duggirala
Sharan Duggirala 2015년 4월 20일
편집: Sharan Duggirala 2015년 4월 20일
The answer has been found here for anyone wondering about it.
Thank you for your help!

추가 답변 (1개)

Ketan
Ketan 2015년 4월 19일
You can assign the output of the extrinsically called imread to a variable of known type. For example:
% Assume IMREAD output is real uint8 [480 x 640]
I = zeros([480,640],'uint8');
I = imread(...);
Then it will not be treated as an mxArray which can only be used in a limited set of circumstances. See the following documentation for information on converting mxArrays to known types:
  댓글 수: 1
Sharan Duggirala
Sharan Duggirala 2015년 4월 20일
I have a variable input to this function and it tells me that coder.varsize cannot be used with coder.entrinsic.

댓글을 달려면 로그인하십시오.

카테고리

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