Closed GoogleCodeExporter closed 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
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
Original issue reported on code.google.com by
bjzhangh...@gmail.com
on 31 Jan 2011 at 6:33