Ask Your Question

kislo's profile - activity

2015-06-02 00:00:06 -0600 received badge  Supporter (source)
2014-12-04 22:40:59 -0600 asked a question Using HOGDescriptor's setSVMDetector functionality with an input array

I am having some trouble with the HOGDescriptor.setSVMDetector functionality in OpenCV4Android.

Android requires a passed Mat() for the HOGDescriptor.setSVMDetector() method. Note that this differs from the C++ specification, where the function is declared as setSVMDetector(const vector<float>& detector). The question is how to input a linear SVM model in - that is, how do you turn an array of floating point values into an OpenCV4Android Mat such that a HOGDescriptor object will accept it as input to the setSVMDetector method?

I have tried analyzing the output of HOGDescriptor.getDefaultPeopleDetector(). This gives a Mat with 3781 rows, 1 column, and type CV_32F. When recreating this, and for that matter when trying any variation (e.g. transposition, 1x1 Mat with a single array entry, etc), the output is:

error: checkDetectorSize() in function virtual void cv::HOGDescriptor::setSVMDetector(cv::InputArray)

Any advice on how to set up an SVM detector this way in Android would be hugely appreciated!

2014-12-04 19:48:28 -0600 asked a question Using HOGDescriptor's setSVMDetector functionality with an input array

I am having some trouble with the HOGDescriptor.setSVMDetector functionality in OpenCV4Android.

Android requires a passed Mat() for the HOGDescriptor.setSVMDetector() method. Note that this differs from the C++ specification, where the function is declared as setSVMDetector(const vector<float>& detector). The question is how to input a linear SVM model in - that is, how do you turn an array of floating point values into an OpenCV4Android Mat such that a HOGDescriptor object will accept it as input to the setSVMDetector method?

I have tried analyzing the output of HOGDescriptor.getDefaultPeopleDetector(). This gives a Mat with 3781 rows, 1 column, and type CV_32F. When recreating this, and for that matter when trying any variation (e.g. transposition, 1x1 Mat with a single array entry, etc), the output is:

error: checkDetectorSize() in function virtual void cv::HOGDescriptor::setSVMDetector(cv::InputArray)

Any advice on how to set up an SVM detector this way in Android would be hugely appreciated!

2013-08-07 18:05:44 -0600 received badge  Student (source)
2013-08-07 00:38:47 -0600 asked a question LibSVM support vector model with OpenCV CvSVM::predict

I have successfully configured CvSVM prediction at a required point in my application. However, I have a high volume of prior SVM models that were created using LibSVM. Is it possible to use these models in the CvSVM::predict function? And if so, are there any particularities with CvType (e.g. CV_32FC1 versus CV_8UC1)?

Thanks a lot!

2013-06-26 10:19:17 -0600 asked a question OpenCV4Android resource /bin missing

I have been following http://docs.opencv.org/doc/tutorials/introduction/android_binary_package/O4A_SDK.html to get OpenCV for android up and running. At step 2, the instructions say to import OpenCV to Eclipse. After importing the sdk subfolder, Eclipse recognizes the new OpenCV Library - 2.4.5 project, but I get build errors reading "Resource '/OpenCV Library - 2.4.5/bin' does not exist." and "Problems occurred when invoking code from plug-in: "org.eclipse.core.resources"." Is the answer to add external JARs from another OpenCV version to the build path?

My android development environment is almost certainly configured correctly; I had JavaCV running properly on it a week ago and have been developing for Android for years with this machine. Have spent fruitless hours and days searching the forums and can't find any answer to this topic - any help would be greatly appreciated.