Info

This question is closed. Reopen it to edit or answer.

Hello people, i have written this codes for detection circles in a video. But i need a larger radius range. I do not know how to do it. And what do you suggest to make this program more efficient. Cause it works so slow.

1 view (last 30 days)
vid = videoinput('winvideo', 1, 'YUY2_1280x1024');
set(vid, 'FramesPerTrigger', Inf); set(vid, 'ReturnedColorspace', 'rgb') vid.FrameGrabInterval = 5;
start(vid)
while(vid.FramesAcquired<=200)
data = getsnapshot(vid);
[centers, radii, metric] = imfindcircles(data,[15 20], ...
'ObjectPolarity','dark','Sensitivity',0.85,'Method','twostage');
imshow(data);
viscircles(centers, radii);
end

Answers (0)

Community Treasure Hunt

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

Start Hunting!