问题
I trained the cascade classifier to detect letters, this is the code I'm using.
When I start the program, it opens my web cam but doesn't show the image (frames) and the detection but just a single blank window.
I noticed this line causes the problem:
faces_cascade.detectMultiScale(frame_gray, faces, 1.1, 2, 0 | CASCADE_SCALE_IMAGE, Size(30, 30));
This is the xml file.
What should I do to make it show the captured frames and start detecting?
Thank you.
回答1:
I finally got it, I had to train my cascade with the parameters of: -w 24 -h 24 to specify a rectangular image which I have used. Now the code runs normally.
来源:https://stackoverflow.com/questions/37943723/opencv-object-detect-algorithm-freezes-after-training-cascade