how to resolve error in code generation when syntex is correct?
显示 更早的评论
i'm using matlab coder to convert my code to C. i'm facing problem in converting some built in function of matlab as imfill, regioprops etc. following is the line of code:
outer_blob = imfill(bin,'holes');
and error is:
Expected input number 2, CONN, to be one of these types: double, logical
3 个评论
Walter Roberson
2018-7-20
What is class(bin) ?
Which MATLAB release are you using?
Hira Abid
2018-7-20
Walter Roberson
2018-7-20
What is class(bin) ? Telling me that it is a binary image does not tell me whether bin is logical, or is double that uses values 0.0 and 1.0, or is uint8 that uses values uint8(0) and uint8(1), or is uint8 that uses values uint8(0) and uint8(255)
回答(2 个)
jose
2023-5-8
0 个投票
Did you figure out? I have the same issue.
1 个评论
Walter Roberson
2023-5-10
Which MATLAB release are you using?
Note that according to the documentation, when you compile,
- Input argument 'holes' is not supported, if the input is a binary image.
类别
在 帮助中心 和 File Exchange 中查找有关 MATLAB Coder 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!