jloyd / javacv

Automatically exported from code.google.com/p/javacv
GNU General Public License v2.0
0 stars 0 forks source link

Calling cvCalcImageHomography results java.lang.UnsatisfiedLinkError #47

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.import static com.googlecode.javacv.jna.cv.v20.cvCalcImageHomography;
2.call cvCalcImageHomography in java code
3.

What is the expected output? What do you see instead?
"Exception in thread "main" java.lang.UnsatisfiedLinkError: Unable to load 
library 'cv': ÕҲ»µ½ָ¶¨µÄģ¿顣" <-- Unrecognizable message.

What version of the product are you using? On what operating system?
opencv 2.1, windows xp

Please provide any additional information below.
I didn't find cvCalcImageHomography in "cv" but found it in "cv.v20", "cv.v10" 
and "cv.v11", so I tried invoking them but got above exception. Does it mean 
cvCalcImageHomography is not supportted in v21? And the same to function 
cvFindHomography.

Original issue reported on code.google.com by bjzhangh...@gmail.com on 31 Jan 2011 at 6:33

GoogleCodeExporter commented 9 years ago
They moved it to `cvaux` in version 2.1.

Original comment by samuel.a...@gmail.com on 31 Jan 2011 at 6:35

GoogleCodeExporter commented 9 years ago
And below is the code:

import static com.googlecode.javacv.jna.cv.v10.cvCalcImageHomography;

import com.googlecode.javacv.jna.cxcore.CvPoint3D32f;

public class Test2 {
    public static void main(String[] args) {
        float[] lines = new float[] {
                1, 2, 3
        };
        CvPoint3D32f center = new CvPoint3D32f();
        center.set(0, 0, 0);
        int fx = 500;
        int fy = 500;
        int cx = 0;
        int cy = 0;
        float[] intrisic_matrix = new float[] {
                fx, 0, cx, 0, fy, cy, 0, 0, 1
        };
        float[] h = new float[9];
        cvCalcImageHomography(lines, center, intrisic_matrix, h);
        for (int i = 0; i < h.length; i++) {
            System.out.println(h[i]);
        }
    }

}

Original comment by bjzhangh...@gmail.com on 31 Jan 2011 at 6:36