问题
I've generated cascade xml in openCV using haar training module.. Now how can I use it for Object recognition.?
Please help.!! _/_
回答1:
Following opencv doc on Object Detection, you have to create the cascade detector object and ::load the cascade you want to apply (the xml file you have generated).
::detectMultiScale is used to fill a std::vector<cv::Rect> of detected object from current frame by sliding windows of different scales and sizes and merging high confident close samples.
Code here!
回答2:
If you use haartraining you can use "opencv_performance.exe". You can find it in "opencv\bin...\" But if you have cascade.xml it's mean you used traincascade. There are no already build bin to check your cascade. You can find example in "opencv\samples\cpp\tutorial_code\objectDetection".
来源:https://stackoverflow.com/questions/16099272/how-to-use-cascade-xml-for-object-recognition-in-opencv