Simulink: Sending Android Camera Data To Workspace

1 回表示 (過去 30 日間)
Ian Liu
Ian Liu 2017 年 7 月 27 日
コメント済み: Saurabh Gupta 2017 年 8 月 2 日
Hello,
I'm trying to take a video with my Android camera and send it to the workspace where I can analyze it. In Simulink, I've connected the Android Camera block to the Video to Workspace Block (see image) and have tried deploying the app to the hardware and running Simulink on external mode. Both methods send a variable to the workspace that is a zero array, like the video is not being transferred correctly. I've run both the "Communicating with Android" and the " Getting Started with Android" examples and both are communicating correctly with my phone. I've checked out the documentation for both these block and everything seems like it should work. Is there something that I'm overlooking?
Thanks, Ian

採用された回答

Saurabh Gupta
Saurabh Gupta 2017 年 7 月 31 日
Both external mode simulation and deployment are based on code generation. It seems that the ' Video to Workspace' block is ignored during code generation, which would explain the output full of zeros. You can verify this using the Simulink menu option "Help > Simulink > Block Data Types & Code Generation Support > All Tables".
As an alternative, you may want to try writing the video to a file ( binary file or multimedia file ) and post-processing that file for analysis.
Hope this helps!
  4 件のコメント
Ian Liu
Ian Liu 2017 年 8 月 2 日
I'll give it a shot. I need to figure out how to convert the RGB Android camera output to Y Cr Cb first. If there are any easy ways of doing this, give me hint!
Thanks!
Saurabh Gupta
Saurabh Gupta 2017 年 8 月 2 日
Color Space Conversion block might come in handy here.

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

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by