haar-classifier

Java and haarcascade face and mouth detection - mouth as the nose

匆匆过客 提交于 2019-12-05 12:34:53
问题 Today I begin to test the project which detects a smile in Java and OpenCv. To recognition face and mouth project used haarcascade_frontalface_alt and haarcascade_mcs_mouth But i don't understand why in some reasons project detect nose as a mouth. I have two methods: private ArrayList<Mat> detectMouth(String filename) { int i = 0; ArrayList<Mat> mouths = new ArrayList<Mat>(); // reading image in grayscale from the given path image = Highgui.imread(filename, Highgui.CV_LOAD_IMAGE_GRAYSCALE);

Defining an (initial) set of Haar Like Features

旧时模样 提交于 2019-12-05 02:31:47
问题 When it comes to cascade classifiers (using haar like features) I always read that methods like AdaBoosting are used to select the 'best' features for detection. However this only works if there is some initial set of features to begin boosting. Given a 24x24 pixel image there are 162,336 possible haar features. I might be wrong here, but I don't think libraries like openCV initially test against all of these features. So my question is how are the initial features selected or how are they

OpenCV Haar Classifier result table explanation

試著忘記壹切 提交于 2019-12-04 17:43:25
问题 I am trying to create a Haar classifier to recognise objects however I can't seem to figure out what the results table that is produced at each stage stands for. E.g. 1 ===== TRAINING 1-stage ===== <BEGIN POS count : consumed 700 : 700 NEG count : acceptanceRatio 2500 : 0.452161 Precalculation time: 9 +----+---------+---------+ | N | HR | FA | +----+---------+---------+ | 1| 1| 1| +----+---------+---------+ | 2| 1| 1| +----+---------+---------+ | 3| 1| 1| +----+---------+---------+ | 4| 1| 1|

Hand Detection Opencv

别来无恙 提交于 2019-12-04 08:45:13
问题 I am trying to detect hand using OpenCV and C++. I am able to find the contour of the hand (Positive image) with person hand present in the image. Basically I am finding largest contour and consider it as hand contour. Lets say in the given image the hand is not present then I will take any contour and consider it as the hand. So I started thinking can I use the haar cascade to determine the rectangle of the hand and focus on that area, but I tried searching online for the xml but I think it

OpenCV Haar Classifier result table explanation

∥☆過路亽.° 提交于 2019-12-03 12:38:10
I am trying to create a Haar classifier to recognise objects however I can't seem to figure out what the results table that is produced at each stage stands for. E.g. 1 ===== TRAINING 1-stage ===== <BEGIN POS count : consumed 700 : 700 NEG count : acceptanceRatio 2500 : 0.452161 Precalculation time: 9 +----+---------+---------+ | N | HR | FA | +----+---------+---------+ | 1| 1| 1| +----+---------+---------+ | 2| 1| 1| +----+---------+---------+ | 3| 1| 1| +----+---------+---------+ | 4| 1| 1| +----+---------+---------+ | 5| 1| 0.7432| +----+---------+---------+ | 6| 1| 0.6312| +----+---------+

OpenCV haartraining: Mergevec error: Input file does not exist or not readable

允我心安 提交于 2019-12-02 18:44:38
问题 Following this tutorial, I've created my positive samples but need to merge them now, using mergevec. I downloaded the mergevec.exe binary file provided and got the two required dlls cxcore100.dll and highgui100.dll . However, when I run it like so: mergevec samples.txt samples.vec it gives me the error: ERROR: Input file <filename> does not exist or not readable. What should I do to fix this? My vec files are fine, because I was able to view them using the opencv_createsamples utility. So I

OpenCV for Android: failed to load cascade classifier error

流过昼夜 提交于 2019-11-30 20:11:25
This is the first time I use openCV library. I want to use it to detect the eyes. I have used the FdActivity code available in this tutorial: http://romanhosek.cz/android-eye-detection-updated-for-opencv-2-4-6/ The tutorial uses OpenCV 2.4.6, but I have downloaded version 3.1 in my project. Due to the version differences I have changed the lines that uses putText, rectangle, and circle to be imported from imgproc instead of Core. This is all what I've changed. I have added haarcascade_lefteye_2splits.xml and lbpcascade_frontalface.xml to the raw folder under res folder. When running the app I

OpenCV detectMultiScale() minNeighbors parameter

落花浮王杯 提交于 2019-11-28 03:35:45
I'm currently using Haar classifiers, to detect objects. On my way, I didn't understand what is the minNeighbors parameter, what is it representing? Actually I don't understand what are the neighbors of the detection candidate rectangle. Please can anybody define the neighboring idea? Haar cascade classifier works with a sliding window approach. If you look at the cascade files you can see a size parameter which usually a pretty small value like 20 20. This is the smallest window that cascade can detect. So by applying a sliding window approach, you slide a window through out the picture than

Generating good training data for haar cascades

蹲街弑〆低调 提交于 2019-11-27 16:49:24
问题 I am trying to build haar cascades for doing OCR of a specific font; one classifier per character. I can generate tons of training data just by drawing the font onto images. So, the plan is to generate positive training data for each character, and use the examples of other characters as negative training data. I am wondering how much variation I should put into the training data. Normally I'd just try everything, but I gather these things take days to train (for each character!) so some

OpenCV detectMultiScale() minNeighbors parameter

社会主义新天地 提交于 2019-11-27 05:09:41
问题 I'm currently using Haar classifiers, to detect objects. On my way, I didn't understand what is the minNeighbors parameter, what is it representing? Actually I don't understand what are the neighbors of the detection candidate rectangle. Please can anybody define the neighboring idea? 回答1: Haar cascade classifier works with a sliding window approach. If you look at the cascade files you can see a size parameter which usually a pretty small value like 20 20. This is the smallest window that