Can you get the maximal intensity of an frame in preview

2 ビュー (過去 30 日間)
Happy PhD
Happy PhD 2022 年 4 月 12 日
回答済み: Happy PhD 2022 年 4 月 13 日
I am using preview for having an live feed of the camera. I would like to also display the maximal intensity of each frame with the streaming video. The maximal intensity is to be sent to app.MaxIntensityStream.Value.
My code for dispalying preview:
[app.img, app.ts] = snapshot(app.g);
app.imHandle = imagesc(app.UIAxes, app.img);
axis(app.UIAxes,'image')
app.hdata = preview(app.g, app.imHandle); % app.hdata.CData
app.MaxIntensityStream.Value = double(max(max(max(app.imHandle.CData))));
But its not showing any intensity change during the video feed or when i change the exposure time of camera handle app.g, only shows the intensity in the first frame (as it seems).
What am I doing wrong?
Thanks!
  2 件のコメント
Kevin Holly
Kevin Holly 2022 年 4 月 12 日
If you stop it, does it update? If so, you may need to add
drawnow
after updating frames.
Happy PhD
Happy PhD 2022 年 4 月 13 日
I tried that but it doesn't work. I don't stop the preview. How can You make that work?

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

採用された回答

Happy PhD
Happy PhD 2022 年 4 月 13 日
Problem was solved by taking snapshot and find the maximal value in the frame.

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by