I am trying to use a camera calibration script from the following github repository. I am struggling to adapt this script to use IP cameras. I have no problem running multiple cameras with
cams{i} = ipcam(camURLs{i});
Where I am stuck is how to connect these ipcams to video input so I can run the rest of the script.
for kk = 1:numcams
if hires ==1
vid{kk} = videoinput('pointgrey', kk); %, 'F7_YUV422_1328x1048_Mode0');
else
vid{kk} = videoinput('pointgrey', kk); %, 'F7_YUV422_656x524_Mode4');
end
src = getselectedsource(vid{kk});
vid{kk}.FramesPerTrigger = 1;
vid{kk}.TriggerRepeat = 1000;
triggerconfig(vid{kk}, 'manual')
vid{kk}.ReturnedColorspace = 'rgb';
set(vid{kk}, 'LoggingMode', 'Disk&Memory');
logfile_names{kk} = strcat(parentpath,filesep,logfile_tag,num2str(kk),'.avi');
logfile{kk} = VideoWriter(logfile_names{kk});
vid{kk}.DiskLogger = logfile{kk};
start(vid{kk})
end
My feeble attempt at a solution
>> vidobj = videoinput("winvideo",1);
>> cam1 = ipcam('http://172.16.135.98:8080/video')
cam1 =
ipcam with properties:
URL: 'http://172.16.135.98:8080/video'
Username: ''
Password: ''
Timeout: 10
>> vidobj.SelectedSourceName = 'cam1'
Error using indexing (line 33)
There is no enumerated value named 'cam1' for the 'SelectedSourceName' property
Type 'imaqhelp' for information.