summaryrefslogtreecommitdiff
path: root/macros/puttext.sci
diff options
context:
space:
mode:
authorshamikam2017-01-16 02:56:17 +0530
committershamikam2017-01-16 02:56:17 +0530
commita6df67e8bcd5159cde27556f4f6a315f8dc2215f (patch)
treee806e966b06a53388fb300d89534354b222c2cad /macros/puttext.sci
downloadFOSSEE_Image_Processing_Toolbox-a6df67e8bcd5159cde27556f4f6a315f8dc2215f.tar.gz
FOSSEE_Image_Processing_Toolbox-a6df67e8bcd5159cde27556f4f6a315f8dc2215f.tar.bz2
FOSSEE_Image_Processing_Toolbox-a6df67e8bcd5159cde27556f4f6a315f8dc2215f.zip
First CommitHEADmaster
Diffstat (limited to 'macros/puttext.sci')
-rw-r--r--macros/puttext.sci31
1 files changed, 31 insertions, 0 deletions
diff --git a/macros/puttext.sci b/macros/puttext.sci
new file mode 100644
index 0000000..06a0c2b
--- /dev/null
+++ b/macros/puttext.sci
@@ -0,0 +1,31 @@
+function new_image = puttext(image, x1, y1, fontscale, r_value, g_value, b_value, text, fontface, varargin)
+
+ /// varargin(1) = thickness = 1,
+ /// varargin(2) = linetype = 8,
+ /// varargin(3) = bottomleft = false
+
+ [ lhs, rhs ] = argn(0)
+
+ image_list = mattolist(image)
+
+ select rhs
+ case 9 then
+ out = opencv_puttext(image_list, x1, y1, fontscale, r_value, g_value, b_value, text, fontface)
+
+ case 10 then
+ out = opencv_puttext(image_list, x1, y1, fontscale, r_value, g_value, b_value, text, fontface, varargin(1))
+
+ case 11 then
+ out = opencv_puttext(image_list, x1, y1, fontscale, r_value, g_value, b_value, text, fontface, varargin(1), varargin(2))
+
+ case 12 then
+ out = opencv_puttext(image_list, x1, y1, fontscale, r_value, g_value, b_value, text, fontface, varargin(1), varargin(2), varargin(3))
+ end
+
+ sz = size(out)
+
+ for i = 1 : sz
+ new_image(:, :, i) = out(i)
+ end
+
+endfunction