Implementing code from MatLab into Android Studio?

18 次查看(过去 30 天)
I created an image segmentation algorithm over the past summer in MatLab. However, this algorithm only allows it to be run on my laptop. I want to implement this code into an app on Android Studio. I have already set up the app design/layout and code on Android Studio and plan on just incorporating the algorithm and then running the entire thing on a virtual device in Android Studio. I'm just having trouble trying to figure out how to implement the code from MatLab into something like Android Studio which is a platform for Kotlin and Java. Can someone give me a detailed explanation on how to do this?
I was initially thinking of using MATLAB Compiler to convert the code to Java packages so I could use them in Android Studio, but I'm not exactly sure if that's how it works. Please help if you can!
Thanks!

回答(1 个)

Sruthi Yenugula
Sruthi Yenugula 2020-2-18
Hi Tiffany,
1) You can use Simulink Support Package for Android Devices to convert a Simulink Model to Android Application. You can embed your MATLAB code in MATLAB function block and use this with other Android Blocks and create Android Applications with one Click. You use Camera and Video Display blocks of Android Support Pacakage.
2) If any of the functions are not codegen supported, then you can use external mode to communicate between Simulink and Android device.
Following are the some of the examples which uses MATLAB function block

类别

Help CenterFile Exchange 中查找有关 Modeling 的更多信息

产品


版本

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by