Live Script: Problems with implay following imshow.

11 ビュー (過去 30 日間)
Andres Morales
Andres Morales 2023 年 1 月 23 日
コメント済み: Andres Morales 2023 年 2 月 14 日
Hello, when working on a Live Script I am getting an error (see below) when I try to run implay after running imshow. It works fine if I run implay and then imshow.
Here is the error:
Error using matlabshared.scopes.visual.ColorMap/set.HiddenMap
Dimensions of colormap matrix must be Nx3.
Error in matlabshared.scopes.visual.ColorMap/colorMapExpressionChanged (line 340)
this.HiddenMap = mapValues;
Error in matlabshared.scopes.visual.ColorMap (line 52)
colorMapExpressionChanged( this );
Error in iptscopes.VideoVisual/setup (line 63)
this.ColorMap = matlabshared.scopes.visual.ColorMap(this);
Error in iptscopes.VideoVisual/renderWidgets (line 34)
setup(this, this.Application.Handles.visualizationPanel);
Error in extmgr.ExtensionSet/renderWidgets (line 258)
renderWidgets(hExtension);
Error in extmgr.DynamicSystem/renderWidgets (line 125)
renderWidgets(this.ExtensionSet);
Error in matlabshared.scopes.UnifiedScope/renderWidgets (line 379)
renderWidgets(this.ExtDriver);
Error in matlabshared.scopes.UnifiedScope (line 186)
renderWidgets( this );
Error in uiscopes/new (line 22)
hScope = matlabshared.scopes.UnifiedScope(hScopeCfg, varargin{:});
Error in implay (line 65)
obj = uiscopes.new(hScopeCfg);
  2 件のコメント
Rajeev
Rajeev 2023 年 1 月 25 日
Are you using the 'imshow' on one of the frames of the video that 'implay' is running?
It would be helpful if you can provide the script that is causing the error.
Andres Morales
Andres Morales 2023 年 1 月 25 日
Hello Rajeev.
Sorry for the delay. My original code had a lot of other irrelevant stuff so I condensed it to this sample script where I still get the error. As you can notice, I will run the implay twice. The first time it will work, while on the second time it fails.
Now with some extra testing I can see that line 37 is the one that causes the issue. Still don't know why.

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

採用された回答

Vinay
Vinay 2023 年 2 月 9 日
Try changing the variable that is called gray to something else. It is being confused with the built in function gray that happens to be the default colormap.
  1 件のコメント
Andres Morales
Andres Morales 2023 年 2 月 14 日
Thank you. This solved the issue.

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

その他の回答 (0 件)

カテゴリ

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

タグ

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by