summaryrefslogtreecommitdiff
path: root/macros/CascadeObjectDetector.sci
diff options
context:
space:
mode:
Diffstat (limited to 'macros/CascadeObjectDetector.sci')
-rw-r--r--macros/CascadeObjectDetector.sci31
1 files changed, 31 insertions, 0 deletions
diff --git a/macros/CascadeObjectDetector.sci b/macros/CascadeObjectDetector.sci
new file mode 100644
index 0000000..c1c4a7f
--- /dev/null
+++ b/macros/CascadeObjectDetector.sci
@@ -0,0 +1,31 @@
+function [out]=insertObjectAnnotation(input_image,object)
+// Detect human body parts like face ,nose,eye and ear.
+//
+// Calling Sequence
+// output_image = insertObjectAnnotation(input_image,object);
+//
+// Parameters
+//
+// input_image : image matrix on which Cascadeobject detection has to be performed
+// object : An input string which specify the name of the object which has to be detect
+// output_image : an output image in which object are bounded by rectangle.
+//
+// Description
+// This function uses the Viola-Jones algorithm to detect the object from given input image.The function first finds the target object on the image then makes a rectangle on detected part of the image.To detect the object it uses already trained data which are stored in .xml file.User can use own trained data for better object detection.
+//
+// Examples
+// a = imread('lena.jpeg');
+// b = insertObjectAnnotation(a,'face');
+// imshow(b)
+//
+// Authors.
+//
+//Diwakar Bhardwaj
+ input_image1=mattolist(input_image);
+ a=opencv_CascadeObjectDetector(input_image,object);
+ dimension=size(a)
+ for i = 1:dimension
+ out(:,:,i)=a(i);
+ end
+
+endfunction;