Error - Function 'imsegkmeans' not supported for code generation.

3 ビュー (過去 30 日間)
sooyong Lee
sooyong Lee 2020 年 10 月 30 日
回答済み: Sutanu Maiti 2020 年 11 月 3 日
I have used the imsegkmeans function without problem in matlab. But when I use this function in screipt of simulink for android device, error occur.
this is error message -> Function 'imsegkmeans' not supported for code generation.
I want to use this function in simulink. Is there a solution?

回答 (2 件)

Walter Roberson
Walter Roberson 2020 年 10 月 31 日
What you can do in Simulink is to either turn all Acceleration off, or else set Acceleration to the lowest level beyond off, and use coder.extrinsic to declare a reference to the function.
However if you are going to need to deploy the function to a device, then you will not be able to do that.
  2 件のコメント
sooyong Lee
sooyong Lee 2020 年 10 月 31 日
I see... thank you for your answer. I need to find another way.
Walter Roberson
Walter Roberson 2020 年 10 月 31 日
I suggest you
edit images.internal.algkmeans
and look at the algorithm.
Most of it is just reshaping the image into (rows*columns) x channels, running kmeans on that, getting a label matrix out, and reshaping that label matrix to rows x columns .

サインインしてコメントする。


Sutanu Maiti
Sutanu Maiti 2020 年 11 月 3 日
You can pass the camera feed to a MATLAB Function block which may use coder.extrinsic functions that do not do codegen. Processed video can also be displayed back to device.
For this to work, Sample time needs to be set high (0.5 or 1 sec).

カテゴリ

Help Center および File ExchangeAndroid Devices についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by