How can I use imfindcircles in real time video?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I have written below code which gives photo from camera and mark circles on them
vid = videoinput('winvideo', 1, 'RGB24_640x480');
set(vid, 'FramesPerTrigger', Inf);
set(vid, 'ReturnedColorspace', 'rgb')
vid.FrameGrabInterval = 5;
data = getsnapshot(vid);
[center,radii] = imfindcircles(data,[20 60],'ObjectPolarity','dark','Sensitivity',0.9,'Method','twostage');
imshow(data)
h=viscircles(center,radii);
how can I make this working in real time?
0 Kommentare
Antworten (3)
Image Analyst
am 13 Mär. 2013
You may not be able to. How long does it take to call imfindcircles()? Wrap it in tic and toc to find out. It may take longer than 1/30th of a second or whatever your definition of "real time" is.
0 Kommentare
kurczak
am 14 Mär. 2013
1 Kommentar
Image Analyst
am 14 Mär. 2013
Well it was just a suggestion. You're free to work on a faster method. And no, I don't have one ready to hand over to you, or even know of one. Plus I don't use Simulink.
Spandan Tiwari
am 20 Mär. 2013
Two ways to get IMFINDCIRCLES run faster in your code are:
1) Sending in the image at a lower resolution.
2) Use smaller radius range, if possible.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Image Preview and Device Configuration finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!