summaryrefslogtreecommitdiff
path: root/macros/imfindcircles.sci
diff options
context:
space:
mode:
authorshamikam2017-01-16 02:56:17 +0530
committershamikam2017-01-16 02:56:17 +0530
commita6df67e8bcd5159cde27556f4f6a315f8dc2215f (patch)
treee806e966b06a53388fb300d89534354b222c2cad /macros/imfindcircles.sci
downloadFOSSEE_Image_Processing_Toolbox-master.tar.gz
FOSSEE_Image_Processing_Toolbox-master.tar.bz2
FOSSEE_Image_Processing_Toolbox-master.zip
First CommitHEADmaster
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