C-Code for bwlabel

조회 수: 4 (최근 30일)
Philipp Lenz
Philipp Lenz 2019년 7월 23일
댓글: Yogesh Khurana 2019년 7월 30일
Hello,
i have a Problem with the C-Code Generation for the bwlabel function.
My input is a binary 200x200 matrix. The Error:
Computed maximum size of output1 of function 'intermediateLabelRuns' is not bounded. Static memory allocation requieres all sizes to be bounded. The computet size is [:? x1]. Function 'bwlabel.m' "startRow".
I get the same Error for "endRow" "startCol" and "labelForEachRun"
For this problem i tried to set an coder.varsize in the copied bwlabel function with an upper bound for the specific variables. In this case i get another Error:
The function 'indexInt' is not supported for standalone code generation. See the documentation for coder.extrinsic to learn how you can use this function in simulation. "coder.internal.indexInt(startRow(k)"
The documentation says that the function is supported for c-code Generation. Do you now how i can handle this ?
Best regards
Philipp Lenz
  댓글 수: 1
Yogesh Khurana
Yogesh Khurana 2019년 7월 30일
I tried reproducing the error using the following code:
img = coder.typeof(logical(0), [inf, inf], [0, 0]);
cfg = coder.config;
codegen -config cfg -args {img} bwlabel -o bwlabelObj
z = bwlabelObj(rand(100) > 0.5);
It seems to be working.
You can also refer to the documentation of coder.typeof for more information on bounded or unbounded inputs:

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 String에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by