How to named camera preview?

1 回表示 (過去 30 日間)
Naseeb Gill
Naseeb Gill 2018 年 3 月 19 日
コメント済み: Naseeb Gill 2018 年 3 月 19 日
Hello,
I have two cameras named 'Logitech Webcam Pro 9000' and I used both cameras simultaneously using code:
cam1 = webcam(1);
preview(cam1);
cam2 = webcam(2);
preview(cam2);
But on both previews, the same name is coming i.e. 'Logitech Webcam Pro 9000' so I can't differentiate between cam1 and cam2. I need to write the name cam 1 and cam 2 on the preview. I used
cam1.Name = 'left cam',
but it shows the error that Name is read-only property and can't change.
So what should I do to named both previews separately?
Thanks.
  2 件のコメント
Stephen23
Stephen23 2018 年 3 月 19 日
I guess there are two basic options here:
  • create a wrapper class which lets you change the name, or
  • alter the name after the fact: get the figure handle and change its name.
Naseeb Gill
Naseeb Gill 2018 年 3 月 19 日
Sir can you please provide me the sample code for the 2nd option?

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

回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by