Tutorial of malichaarsampling
(to generate eye.xml)
# you should have forrow directories
$ ls -F
det-img/ img/ eye_bgimage/
#start
# face parts sampling by your hand
$ malicsampling
(set your face parts data and save faceparts.xml)
# face parts sampling by tracking (sampling 100~1000 images)
$ malichaarsampling -j faceparts.xml -f faceparts.xml
(save your face parts tracked data and image to ./img/ and vertlabel.xml)
# generate positive info file of eye
$ xmltocvhaardata.py -f ./img/vertdata.xml -i ./img \
-p "left_eye_l_edge left_eye_r_edge right_eye_l_edge right_eye_r_edge" \
-w 25 -h 25 > eyeinfo.dat
# generate negative images to ./eye_bgimg and generate info file
$ xmltocvhaardata.py -f ./img/vertdata.xml -i ./img \
-p "left_eye_l_edge left_eye_r_edge right_eye_l_edge right_eye_r_edge" \
-b -r -d ./eye_bgimg -w 50 -h 50 -n 3 > eye_bg_info.dat
# generate vec file (eyevec) by opencv-createsamples
$ opencv-createsamples -info eyeinfo.dat -vec eyevec -num num_of_positives -bg e
ye_bg_info.dat -show
# training samples by opencv-haartraining
$ opencv-haartraining -vec eyevec -bg eye_bg_info.dat -npos num_of_positives -nneg n
um_of_negatives -data eye_class
#...(waiting few or more hour (or day))
# performance check (checked image in det-img)
$ opencv-performance -data eye_class -info lefteye_info.dat
# generate xml file (haarconv getting from yahoo opencv comunity)
$ haarconv eye_class eye.xml 25 25
# test as intaractive
#(haarcascade_frontalface_alt.xml exists in opencv or /usr/local/malic/share/malic/data/ )
$ malicpartsdetect -f haarcascade_frontalface_alt.xml -p eye.xml