Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

HOG compute jni error

I use java version of opencv and I want to compute HOG by using hog.compute. The problem is that I get: java.lang.Exception: Unknown exception in JNI code {objdetect::compute_10()} at org.opencv.objdetect.HOGDescriptor.compute_0(Native Method)

I would be grateful if someone could help.

click to hide/show revision 2
retagged

updated 2013-11-12 17:18:28 -0600

berak gravatar image

HOG compute jni error

I use java version of opencv and I want to compute HOG by using hog.compute. The problem is that I get: java.lang.Exception: Unknown exception in JNI code {objdetect::compute_10()} at org.opencv.objdetect.HOGDescriptor.compute_0(Native Method)

I would be grateful if someone could help.

HOG compute jni error

I use java version of opencv and I want to compute HOG by using hog.compute. The problem is that I get: java.lang.Exception: Unknown exception in JNI code {objdetect::compute_10()} at org.opencv.objdetect.HOGDescriptor.compute_0(Native Method)

I would be grateful if someone could help.

The code:

protected void computeFeature(Mat imgSample,
        HashMap<String, Double> features, Mat mask) {

    HOGDescriptor hog = new HOGDescriptor(new Size(128, 64), new Size(16,
            16), new Size(8, 8), new Size(8, 8), 9, 0, -1,0, 0.2, false, 64);

    Imgproc.resize(imgSample, imgSample, new Size(128, 64));
    MatOfFloat z = new MatOfFloat();

    hog.compute(imgSample, z);

}