IplImage
我需要将( )数组的指针传递IplImage extends CvArray extends Structure implements cloneable
给函数 C 中的本机代码如下:
cvCalcEigenObjects(
nTrainFaces,
(void*)faceImgArr,
(void*)eigenVectArr,
CV_EIGOBJ_NO_CALLBACK,
0,
0,
&calcLimit,
pAvgTrainImg,
eigenValMat->data.fl);
我试过这个:
cvCalcEigenObjects(
nTrainFaces,
faceImgArr[0].getPointer(),
eigenVectArr[0].getPointer(),
CV_EIGOBJ_NO_CALLBACK,
0,
null,
calcLimit,
pAvgTrainImg,
eigenValMat.data.getFloatArray(0, Pointer.SIZE));
但它没有用。这个函数在Java中的声明是这样的:
public static void cvCalcEigenObjects(int i,
Pointer pntr,
Pointer pntr1,
int i1,
int 2,
Pointer pntr2,
cxcore.CvTermCriteria ctc,
cxcore.IplImage ii,
FloatBuffer fb)