-
Notifications
You must be signed in to change notification settings - Fork 744
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
HOGDescriptor #109
Comments
Have you tried to do the same thing as shown in this OpenCV sample? |
My understanding of this sample is that it`s for detecting people with pre-trained SVM classificator: hog.setSVMDetector( HOGDescriptor::getDaimlerPeopleDetector() ); I`m trying to create simple OCR where HOG descriptor would provide me gradients of the different parts of an image and svm would be trained based on these descriptors. |
Ok, so would you have some code in C++ that is known to be working? And if you cannot find anything, please ask the authors of |
Sure, thanks. |
I've tried this here and it returns something else than zeros: Mat image = imread("/home/saudet/projects/bytedeco/javacv/samples/pic1.png");
HOGDescriptor hog = new HOGDescriptor();
FloatPointer descriptors = new FloatPointer();
hog.compute(image, descriptors); But |
I see, thanks a lot. |
I tried it with "FloatPointer" instead of float[]. The size is just the same however FloatPointer is populated with number after calling hogDescriptor.comput while float[] is empty (all zeros). Anyway, FloatPointer works - thanks for the hind. |
@pefi9 Yes, it seems there's a problem there... I'll have to look into that. |
Hi @saudet, |
What do they do in the C++ samples for that?
|
void CvStatModel::load(const char* filename, const char* name=0 ) Taken from: Example: CvSVM *SVM = new CvSVM;
SVM->load("SVM.xml");
SVM->predict(DataRow); http://answers.opencv.org/question/13418/machine-learning-saveload-problem/ |
That's for OpenCV 2.4. Any examples for OpenCV 3.0? |
… when used as arguments with adapters (issue bytedeco/javacpp-presets#109) * Remove confusing and now unnecessary empty constructors
I see, they've moved the |
there is still no function load() in SVM, so what should I do if I want to load a classifier file from a path. please give a hand |
there is no opencv_ml.java in *javacv-1.1-bin.zip (140 MB), *which means |
Please follow the build instructions here, if you have some free time: |
This has all been fixed and included in the just released version 1.2. Thanks for reporting all this guys! |
Hi,
I can't get HOG descriptors, respectively it's all zeros.
The text was updated successfully, but these errors were encountered: