Using imresize function for matlab coder

2 次查看(过去 30 天)
Hello, I am trying to use MATLAB coder to generate C code for imresize function as follows:
% code
function P = test_resize(I)
%#codegen
coder.varsize('I',[]);
coder.varsize('P',[]);
P = imresize(I,'scale',0.5,'Method','bilinear');
end
However, the code generation readiness fails as shown in the following image:
any suggestions?

采纳的回答

Ryan Livingston
Ryan Livingston 2015-12-31
编辑:Ryan Livingston 2015-12-31
Code generation support was added for imresize in MATLAB R2015b:
What release of MATLAB are you using (the ver command will show you)?
You can search for imresize here:
to see any codegen specific considerations.
  1 个评论
Mostafa El-Hashash
Mostafa El-Hashash 2015-12-31
Hello Ryan, Thanks for your reply. The version was 2014a and I realized what you said that the support for imresize is added in the latest version 2015b which I am using now after updating. I can now generate the C code with no problems but when I am converting it to fixed-point operations I get an error readrding the imresize function that it cannot be converted to fixed-point operation. I thought that this conversion operation will overcome this issue. Is there is a solution for this as I am building this code for a fixed-point processor on an embedded platform.
Best regards

请先登录,再进行评论。

更多回答(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