c++,opencv,image-processing,haar-classifier
You've run out of memory. You have several options: Use a 64-bit computer with more memory Use smaller-size positive training images. 24x24 or 32x32 is typical. 64x64 is considered large. Use LBP or HOG features instead of Haar. Haar features take orders of magnitude more memory than the others. By...
i guess, you won't get good results from haar (or hog) cascade classifiers here. your 'needle' does not have enough features/corners (it's just 2 crosses and a line) cascade classifiers are quite sensitive to rotation. it seems your object can take any arbitrary rotation here. if you train a classifier...
matlab,opencv,matlab-cvst,haar-classifier,cascade-classifier
Yes, you can. If you look at the resulting xml file, you should see a comment at the top telling you which version of OpenCV it is compatible with.
computer-vision,classification,object-recognition,haar-classifier
Based on your description of your problem, I see several drawbacks of a Haar or LBP-based detector. First, these features do not use color, which seems to be important here. Second, a classifier using Haar or LBP features is sensitive to in-plane and out-of-plane rotation. If your objects can be...
Short answer: Yes Long Answer: Probably: You have to think about it like this, the classifier is going to build up a set of features for the positive images and then use these to determine whether your detection image is the same or not. If you are drastically moving the...
c++,opencv,segmentation-fault,haar-classifier
Reinstalling the whole OpenCV and binaries solved the problem.
machine-learning,computer-vision,haar-classifier,cascade-classifier
I presume, you're familiar with Viola/Jones original paper on this topic ( http://en.m.wikipedia.org/wiki/Viola–Jones_object_detection_framework ). You start by manually choosing a feature type (e.g. Rectangle A). This gives you a mask with which you can train your weak classifiers. In order to avoid moving the mask pixel by pixel and retraining...
opencv,machine-learning,svm,haar-classifier
SVM and Boosting (AdaBoost, GentleBoost, etc) are feature classification strategies/algorithms. Support Vector Machines solve a complex optimization problem, often using kernel functions which allows us to separate samples by working in a much higher dimension feature space. On the other hand, boosting is a strategy based on combining lots...
The error does not seem to be a result of large number of positive or negative samples. People do train very large data sets! From the parameters described above, it can be noticed that the dimension of the positive samples that form the samples.vec is 24x24, which is denoted by...
Try this. It worked for me. http://www.tectute.com/2011/06/opencv-haartraining.html This video kind of explains the same procedure but it's much more clear. https://www.youtube.com/watch?v=KFC6jxBKtBQ P.S I'm not the author of any of these resources....
opencv,face-detection,haar-classifier
internally, the CascadeClassifier does several detections, and groups those. minNeighbours (in the detectMultiScale call) is the amount of detections in about the same place nessecary to count as a valid detection, so increase that from your current 2 to maybe 5 or so, until you start to miss positives....
opencv,counting,haar-classifier
I would say it depends on how your haartraining goes. Are you wanting to train a classifier specifically to detect faces, and then detect the # of faces in the image and count them up? It's possible that your model will do one or more of these things: a. Count...
machine-learning,computer-vision,haar-classifier,haar-wavelet,feature-descriptor
A weak descriptor would be something which is not too refined or tuned (eg: haar features, edge maps etc). A strong descriptor(SIFT/SURF/MSER) would be something which is accurate, has high repeatability under blur, viewpoint/illumination change, JPEG compression. A boosting method would perform better for weak descriptors and SVM would be...
c++,opencv,haar-classifier,cascade-classifier,lbph-algorithm
Uninstalling and rebuilding OpenCV solved the problem.
"I'm trying to create my own cascade classifiers to detect facial expressions" that probably won't work. you'd have to train one cascade per expression, and they are just not different enough for this. instead, try to train a FisherFaceRecognizer on your expressions in a similar manner to this...
It turns out the .vec file is not simply the positive.txt file, it must be generated using opencv_createsamples. So first I created the training_24-24.vec file (which is not just a text file) using the following command: /usr/bin/opencv_createsamples -vec training_24-24.vec -info positive.txt -bg negative.txt -w 24 -h 24 -num 100 which...