How can I plot histogram matlab to uiaxes APP designer?

8 ビュー (過去 30 日間)
Jenifer NG
Jenifer NG 2022 年 8 月 15 日
コメント済み: Cris LaPierre 2025 年 5 月 16 日
Hi Everyone,
Could some one know how to plot histogram of an image to uiaxes ?
This is my code:
v = videoinput("winvideo", 2, "YUY2_640x480"); % capure image from webcam
v.ReturnedColorspace = "grayscale"; % convert to gray
v.ROIPosition = [133 114 410 300]; % crop image
snapshot1 = getsnapshot(v); % capture image
imhist(snapshot1,app.UIAxes) % Plot historam
Thanks all!
Han

採用された回答

Cris LaPierre
Cris LaPierre 2022 年 8 月 15 日
imhist is not supported in App Designer yet (as best I can tell). However, you may be interested in this example, which uses histogram instead to show the red, green and blue content of an image.
Or open directly in MATLAB with the following command
openExample('matlab/AppdImageHistogramsExample')
  3 件のコメント
Will Reeves
Will Reeves 2025 年 5 月 16 日
Hi, just wondering if you know if imhist will ever be supported in App Designer? Seems like every plot type should be supported really?
Cris LaPierre
Cris LaPierre 2025 年 5 月 16 日
I've attached a simple example. Here's what the results look like using this example.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDevelop Apps Using App Designer についてさらに検索

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by