Haar Cascade xml

by: derickloo, 7 years ago


Hi, I'm new in Python programming for deep learning.  I follow the tutorial "Creating your own Haar Cascade OpenCV Python Tutorial", the cascade xml file create is a image classifier?  Is it we train the cascade xml file?  I have read a book "Deep learning for computer vision with Python" from Dr. Adrian Rosebrock, I'm confuse with the image classification.  The book mention we need to train our own image classification but i confuse on this.  The example provide is k-NN image classification algorithm.  We need to train the algorithm.  Is this two same?  I'm confuse.  Please help.



You must be logged in to post. Please login or register an account.



You should probably confer with Adrian Rosebrock, I don't have the book.

If your question is purely: "Is a KNN classifier the same as a Haar Cascade," then the answer is no, they are different.

-Harrison 7 years ago

You must be logged in to post. Please login or register an account.


Hi Harrison, thanks for the reply.  I have some question regarding the tutorial "Creating your own Haar Cascade OpenCV Python Tutorial".  How I can train the haar cascade to recognize different type of watches?  In the tutorial, only one watch was recognize and the script to build the positive samples was "opencv_createsamples -img watch5050.jpg -bg bg.txt -info info/info.lst -pngoutput info -maxxangle 0.5 -maxyangle 0.5 -maxzangle 0.5 -num 1950".  How I can build the sample contains multiple different watches?  I have 2000 positive dataset and 1000 neagative dataset.  Thank you very much.

-derickloo 7 years ago

You must be logged in to post. Please login or register an account.


I read a doc from OpenCV site.  It mention Haar feature-based cascade classifiers is a machine learning based approach where cascade function is trained by a lot of positive and negative images.  Is it means we train our own cascade xml file then use it to train the cascade algorithm?  The more images use to trained the xml file, the more accurate the haar cascade detect the object?

-derickloo 7 years ago

You must be logged in to post. Please login or register an account.