cascade-classifier

OpenCV Cascade Classifier load error iOS

佐手、 提交于 2019-12-12 01:48:53
问题 Currently I am trying to using an OpenCV Cascade Classifier to detect faces in my iOS app. The problem is that when I go to load the classifier, it fails because the pathname to the "haarcascade_frontalface_alt.xml" isn't correct. Here is my code: cv::String face_cascade_name = "haarcascade_frontalface_alt.xml"; void detectFaces(cv::Mat frame){ cv::CascadeClassifier face_cascade; if (face_cascade.load(face_cascade_name)){ printf("Load complete"); }else{ printf("Load error"); } std::vector<cv:

What is the meaning of values in stage.xml and cascade.xml for opencv cascade classifier

那年仲夏 提交于 2019-12-09 01:29:52
问题 I have tried to detect something from a tutorial. When training have finished, stage files and cascade file is created. I have knowledge about the algorithm but I don't know meaning of information inside these file. <internalNodes> 0 -1 13569 2.8149113059043884e-003</internalNodes> <leafValues> 9.8837211728096008e-002 -8.5897433757781982e-001</leafValues></_> and <rects> <_> 0 0 3 1 -1.</_> <_> 1 0 1 1 3.</_></rects> <tilted>0</tilted></_> What are the meanings of these values? 回答1: Let's

Negative sample image dimensions for training cascaded classifier in OpenCV?

狂风中的少年 提交于 2019-12-06 12:21:43
问题 So following up from here, I now need to collect negative samples, for cascaded classification using OpenCV. With positive samples, I know that all samples should have the same aspect ratio. What about negative samples? Should they all be larger than positive samples (since OpenCV is going to paste positives on top of negatives to create the test images). Should all be the same size? Can they be arbitrary sizes? Should they too have the same aspect ratio among themselves? 回答1: From OpenCV doc

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

Negative sample image dimensions for training cascaded classifier in OpenCV?

≯℡__Kan透↙ 提交于 2019-12-04 20:03:19
So following up from here , I now need to collect negative samples, for cascaded classification using OpenCV. With positive samples, I know that all samples should have the same aspect ratio. What about negative samples? Should they all be larger than positive samples (since OpenCV is going to paste positives on top of negatives to create the test images). Should all be the same size? Can they be arbitrary sizes? Should they too have the same aspect ratio among themselves? From OpenCV doc on Cascade Classifier Training : Negative samples are taken from arbitrary images. These images must not

OpenCV: Improving the speed of Cascades detection

独自空忆成欢 提交于 2019-12-03 04:01:53
I need to detect people in real time using OpenCV Cascades. Currently I am using the trained cascade files which comes with OpenCV but later I will train my own LBP Cascades to achieve more speed. I do have a question. what are the ways to speed up the detection of cascades? For an example, have a look at this video . It is really fast, uses Haar cascades and nice. what kind of things I can do to achieve this speed, specially for a real time application? any tricks and hacks? I'm not sure what you mean by "speed" in your video example since it's hard to make out what "speed" the detections are

LBP Local Binary Pattern for mouth detection in front face

喜你入骨 提交于 2019-12-02 16:07:47
问题 There is someone who can direct me to find a lbp cascade classifier for mouth detection? I looked for but i didn't found anything. I found only haar files, i want to know if someone have a lbp classifier. Haar classifiers are so slow, decrease of 10 fps in my app using haar. Thank you guys. 回答1: Hi @Sandeep sorry i changed my S.O. profile so i haven't seen your question. Anyway yes! I managed with classifiers in last times. I can give you a good address. I worked with haar cascade-classifiers

What is the meaning of values in stage.xml and cascade.xml for opencv cascade classifier

浪子不回头ぞ 提交于 2019-11-30 23:29:45
I have tried to detect something from a tutorial. When training have finished, stage files and cascade file is created. I have knowledge about the algorithm but I don't know meaning of information inside these file. <internalNodes> 0 -1 13569 2.8149113059043884e-003</internalNodes> <leafValues> 9.8837211728096008e-002 -8.5897433757781982e-001</leafValues></_> and <rects> <_> 0 0 3 1 -1.</_> <_> 1 0 1 1 3.</_></rects> <tilted>0</tilted></_> What are the meanings of these values? Let's start with first block: <internalNodes> 0 -1 13569 2.8149113059043884e-003</internalNodes> <leafValues> 9

Recommended values for OpenCV detectMultiScale() parameters

微笑、不失礼 提交于 2019-11-27 10:11:34
What are the recommended parameters for CascadeClassifier::detectMultiScale() and depending on which factors I should change default parameters? void CascadeClassifier::detectMultiScale( const Mat& image, vector<Rect>& objects, double scaleFactor=1.1, int minNeighbors=3, int flags=0, Size minSize=Size(), Size maxSize=Size() ) herohuyongtao Amongst these parameters, you need to pay more attention to four of them: scaleFactor – Parameter specifying how much the image size is reduced at each image scale. Basically the scale factor is used to create your scale pyramid. More explanation can be