How to pass image file from matlab to python?

2 ビュー (過去 30 日間)
Nitharshini Sivakumar
Nitharshini Sivakumar 2017 年 10 月 16 日
コメント済み: Yaroslav Kyrylenko 2020 年 10 月 29 日
I have a simulink block diagram that takes input from a webcam and gives it to a matlab m-file. In the m-file, I run a function to call a python program to run a few image processing techniques on the incoming real-time video. My m-file is as follows:
function final=fcn(frame)
coder.extrinsic('py.importlib.import_module');
G = py.importlib.import_module('video_3',frame);
final = coder.nullcopy(zeros(size(frame)));
final = G;
end
When I run the simulation, I get the following error:
"Conversion of MATLAB 'single' to Python is only supported for 1-N vectors."
My simulink block diagram is as follows :
Any suggestions?
  1 件のコメント
Yaroslav Kyrylenko
Yaroslav Kyrylenko 2020 年 10 月 29 日
Hi, Have you found a solution?

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeCall Python from MATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by