summaryrefslogtreecommitdiff
path: root/macros/puttext.sci
diff options
context:
space:
mode:
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