How to use cascade.xml for object recognition in openCV

孤街醉人 提交于 2020-01-17 03:54:27

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!