Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running the classifer #17

Open
snehalvartak opened this issue Apr 5, 2017 · 1 comment
Open

Running the classifer #17

snehalvartak opened this issue Apr 5, 2017 · 1 comment

Comments

@snehalvartak
Copy link

How do I test the classifier once it has been compiled as per the steps mentioned in the tutorial?

@chrisHuxi
Copy link

How do I test the classifier once it has been compiled as per the steps mentioned in the tutorial?

after training you can get "cvHOGClassifier.yaml" in the genfile.
the you can load it with : hog.load("cvHOGClassifier.yaml")
here is an example:

cv::Mat gray_image;
cv::cvtColor(res_image, gray_image, cv::COLOR_BGR2GRAY);
cv::HOGDescriptor hog;  
hog.load("cvHOGClassifier.yaml");
std::vector<cv::Rect> found, found_filtered;
hog.detectMultiScale(gray_image, found, 1.3, cv::Size(2,2), cv::Size(4,4), 1.05, 10);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants