You can't have a function defined down below your script. I didn't see a function line for the first chunk of your code, which you need. You need something like this as the first line:
function redObjectTrack()
When I do that it runs the getCameraInfo() function fine. All I did was to remove the semicolons so that I could see the outputs, and I renamed format to format1 so as to not overwrite a built-in MATLAB function and it printed out this:
camera_name =
winvideo
camera_info =
AdaptorDllName: 'C:\Program Files\MATLAB\R2011b\toolbox\imaq\imaqadaptors\win64\mwwinvideoimaq.dll'
AdaptorDllVersion: '4.2 (R2011b)'
AdaptorName: 'winvideo'
DeviceIDs: {[1]}
DeviceInfo: [1x1 struct]
camera_id =
1
resolution =
RGB24_960x720
Best Answer