summaryrefslogtreecommitdiff
path: root/macros/imfindcircles.sci
diff options
context:
space:
mode:
Diffstat (limited to 'macros/imfindcircles.sci')
-rw-r--r--macros/imfindcircles.sci25
1 files changed, 25 insertions, 0 deletions
diff --git a/macros/imfindcircles.sci b/macros/imfindcircles.sci
new file mode 100644
index 0000000..c8f7491
--- /dev/null
+++ b/macros/imfindcircles.sci
@@ -0,0 +1,25 @@
+function [points, varargout] = imfindcircles(image, Rmin, Rmax)
+
+ [lhs, rhs] = argn(0)
+
+ image_list = mattolist(image)
+
+ select lhs
+ case 1 then
+ out_centres = opencv_imfindcircles(image_list, Rmin, Rmax)
+
+ case 2 then
+ [out_centres radii] = opencv_imfindcircles(image_list, Rmin, Rmax)
+
+ varargout(1) = radii
+ end
+
+ total_points = size(out_centres(1),'c')
+
+
+ for i=1:total_points
+ points(i, 1) = out_centres(1)(1, i)
+ points(i, 2) = out_centres(2)(1, i)
+ end
+
+endfunction