In MATLAB two cameras are installed with PC. How to choose the desired one from them?

Status
Not open for further replies.

nikhildascl

Full Member level 3
Joined
Apr 15, 2012
Messages
150
Helped
15
Reputation
30
Reaction score
14
Trophy points
1,318
Location
Kerala, India
Activity points
2,115
Code:
  camera_info = imaqhwinfo('winvideo')
camera_info =

       AdaptorDllName: [1x80 char]
    AdaptorDllVersion: '3.2 (R2008b)'
          AdaptorName: 'winvideo'
            DeviceIDs: {[1]  [2]}
           DeviceInfo: [1x2 struct]
I have two cameras installed on PC. But i cannot select one from the. When there was only one PC, I used to get the input from the same by using this code

Code:
   camera_id = camera_info.DeviceInfo.DeviceID(end)
Now it is returning an error as shown below

??? Error using ==> end
Incorrect cell or structure reference involving "end".
Most likely cause is a reference to multiple elements of a cell or
structure followed by additional subscript or structure references.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…