After testing, I found the sample code has two lines which have to be modified to run properly. The first one seems to be a typo.
The patch file:
@@ -22,9 +22,8 @@ sys.exit(-1) src_gray = cvCreateImage(cvSize(src_img.width, src_img.height), IPL_DEPTH_8U, 1) - storage1 = cvCreateMemStorage(0) ## (2)ブーストされた分類器のカスケードを読み込む - cascade_name = "haarcascade_frontalface_default.xml" + cascade_name = "/usr/share/opencv/haarcascades/haarcascade_frontalface_default.xml" cascade = cvLoadHaarClassifierCascade(cascade_name, cvSize(1,1)) ## (3)メモリを確保し,読み込んだ画像のグレースケール化,ヒストグラムの均一化を行う
Here I tested the sample code with some of my drawings, which can be viewed on my another blog. The results are interesting (at least for me).
---
[*] I have just begun to learn things about computer vision, so I might use some terms wrong.
No comments:
Post a Comment