Circle Detection From Live Feed via Basler Camera but It Detects Wrong Circles and Slow?
2 views (last 30 days)
Show older comments
Hello everyone,
I am trying to detect circles from live feed via Basler camera but generally it is working wrong and so slow. I am using Hough Circle Detection after create object of my camera with gentl-1 adaptor.
Also my circles has 8cm diameter but this code detects bigger or smaller circles, too.
There is my code;
vid = videoinput('gentl', 1);
set(vid, 'FramesPerTrigger', Inf);
set(vid, 'ReturnedColorspace', 'rgb')
vid.FrameGrabInterval = 25;
start(vid)
while true
e=getsnapshot(vid);
e=imresize(e,[768,1024]);
ks=rgb2gray(e);
[centers, radii]=imfindcircles(ks,[20,60],'ObjectPolarity','dark','Sensitivity',0.9);
imshow(e);
hold on;
viscircles(centers,radii,'EdgeColor','b');
end
What can I add or do to the code I wrote to make the system work more accurately and quickly?
1 Comment
Image Analyst
on 15 Sep 2021
You forgot to attach an image. So . . . buy a faster computer? Or use a different algorithm (which we can't suggest because you forgot to attach the image).
Answers (0)
See Also
Categories
Find more on MATLAB Support Package for IP Cameras in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!