Effacer les filtres
Effacer les filtres

C-Code for bwlabel

1 vue (au cours des 30 derniers jours)
Philipp Lenz
Philipp Lenz le 23 Juil 2019
Commenté : Yogesh Khurana le 30 Juil 2019
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 commentaire
Yogesh Khurana
Yogesh Khurana le 30 Juil 2019
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:

Connectez-vous pour commenter.

Réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by