I have adapted an object detector in Matlab that I plan on implementing on the BlueROV2 live video stream. The code I currently have to access a webcam is below but I am wondering how to access the on board camera and send the feed to Matlab.
"camera = webcam(‘HP Wide Vision FHD Camera’);
net = detector;
h=figure;
while ishandle(h)
im = snapshot(camera);
image(im);
[bboxes,scores,labels] = detect(net,im,‘Threshold’,.2);
if(isempty(labels) == 0)
for k = 1:size(bboxes,1)
rectangle(‘position’,bboxes(k,:),‘Edgecolor’,‘b’);
title({char(labels),num2str(scores)});
drawnow
end
else
drawnow
end
end"