Ask Your Question

lqj1990's profile - activity

2017-03-14 06:45:50 -0600 received badge  Self-Learner (source)
2017-03-13 21:20:41 -0600 answered a question program will stuck when using detectMultiScale

Already solved. Disable OpenCl when compiling OpenCv.

2017-02-19 04:00:35 -0600 commented question program will stuck when using detectMultiScale
  1. If I use the xml file in old format, the classifier trained by myself will generate a huge number of candidate. I suspect it is probably caused by some wrong settings in training process. But I don't know what should I do. I trained the classifier using 673 positive samples and 1044 negative samples.The setting is opencv_haartraining.exe -data data -vec cars.vec -bg list.txt -npos 605 -nneg 1044 -nstages 11 -w 20 -h 20. Detection code is cascade.detectMultiScale(frame_gray, cars, 1.01, 3, 0, Size(30,30));

  2. When using xml file in new format, the problem is caused by Mat(1, (int)(v.size()*sizeof(v[0])), CV_8U, (void*)&v[0]).copyTo(um); in function copyVectorToUMat in cascadedetect.cpp. It does not return a result, so the program stuck. I don't know why.

2017-02-18 00:12:21 -0600 commented question program will stuck when using detectMultiScale
  1. I only use -info
  2. I downloaded the latest source code and complied by myself. I try to train cascade classifier using opencv3.2 and opencv2.4.10.I use the http://cogcomp.cs.illinois.edu/Data/Car/ (dataset) provided by UIUC. The dataset contains 550 positive samples and 500 negative samples.

When I use haartraining, the trained 5-stage classifier works well but very slow.

In this case, what can I do to improve the detection speed? Do I need to use more positive and negative samples to train the classifier?

However, when I use cascade training (both 2.4.10 and 3.2), the problem still exists. The test image size is 210*115. It's hard to judge whether it is too slow or stuck.

In this case, what can I do? Do I need to do more experiment or provide more information?

2017-02-16 09:43:35 -0600 commented question program will stuck when using detectMultiScale

I'm sorry I misunderstood your words.

I create samples using opencv_createsamples -info road\road.txt -image road -vec road.vec -num 374 -w 32 -h 32

I train the classifier using opencv_traincascade -data classifier -vec road.vec -bg list.txt -numStages 10 -numPos 374 -numNeg 560 -w 32 -h 32 -featureType LBP

The test image is https://raw.githubusercontent.com/lqj1990/TestCascade/master/test/test.jpg (image)

I try the sample code facedetect.cpp, it also does not work on my computer with the same problem.

2017-02-16 09:01:38 -0600 commented question program will stuck when using detectMultiScale

I use OPenCV 3.1.The test image is not very large. When I change the xml file, for example https://github.com/andrewssobral/vehicle_detection_haarcascades/blob/master/cars.xml, my program works well. The format of this file is different with the one trained by myself. I don't know whether the problem is related to the format of xml file.

2017-02-16 00:52:15 -0600 asked a question program will stuck when using detectMultiScale

I trained a cascade classifier to detect cars. I have 415 positive samples and 544 negative samples. After I trained the classifier, I got cascade.xml. When I use it in my program, the program will stuck when execute detectMultiScale function. But if I used trained classifier by others, there is no problem. I compare the xml file, there are some difference. I don't know whether the problem is caused by the version of xml file.

Dose any one have some idea?