Store a videoinput in a Data Store Memory block in Simulink

3 ビュー (過去 30 日間)
Timo
Timo 2011 年 4 月 15 日
Hello,
I'm trying to store a videoinput in a DataStoreMemory, so I can access it out of a Embedded MATLAB Function (fcn) block. I set the type to an expression (videoinput). But I got an error:
Error evaluating parameter 'OutDataTypeStr' in 'DataStoreImage/VideoInputDataStore': ADAPTORNAME and DEVICEID must be specified.
Can you help me? If I missed necessary information, please tell me.
Thanks Timo

採用された回答

Kaustubha Govind
Kaustubha Govind 2011 年 4 月 15 日
I believe Data Store Memory only supports numeric types (see Section "Data type" on the documentation page).
Why not use the From Video Device block directly in your model?

その他の回答 (3 件)

Shankar Subramanian
Shankar Subramanian 2011 年 4 月 22 日
Hi Timo,
Writing your own MATLAB function (using videoinput and getdata) and bringing into SIMULINK will not necessarily help you with the rate. You should actually run the script suggested here to calculate the frame rate in MATLAB.
The From Video Device block does not add any performance overhead and performs at par with the rate achievable within MATLAB using the hardware.
Thanks
Shankar

Timo
Timo 2011 年 4 月 15 日
Hallo Kaustubha.
Thank you for your reply.
1. Ok! Thats bad. Do you know how I can store an object between the fcn block calls?
2. I have framerate Problems with this block. Try to solve this, by my own block. I don't know if this will help me, but I will try. Also I want to have more control over the image aqcuisation.
Thanks Timo
  1 件のコメント
Kaustubha Govind
Kaustubha Govind 2011 年 4 月 20 日
Are you using the MATLAB Fcn block? You could try using persistent variables.

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


Timo
Timo 2011 年 4 月 26 日
Hallo Shankar,
Ok thanks! I thought I perhaps could write a more specialized function. I replyed also in the other Thread.
Thanks again, Timo

カテゴリ

Find more on Image Acquisition in Simulink in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by