c++ - JNI: How to pass an object as parameter to JNI from java -


I start Java, and also start a JNI = (

I have my object I want to pass the JNI function, my object is like this:

  class FEATUREINFO {string str_ID; char [] c_ID; public double [] featuredata; int group; iplImage * t_faceImg; public FEATUREINFO () {This.featureData = new double [1280];}} // class FEATUREINFO  

Then I create 100 feature films:

  FEATUREINFO [] p_featureNode = InitializeWithDefaultFEATUREINFOInstances (100);  

and the JNI function, which I call I repeat: // double * matrix = double, (Double *) Eniv-> GetDoubleArrayElements (d_Matrix, 0); env-> ReleaseDoubleArrayElements (d_Matrix, Matrix, 0); // I do not know how to use the value of p_featureNode // If I want to get the value of p_featureNode [3] Feature data [8], how to do? DoFaceGrouping (p_featureNode, t_size_fea, matrix); // reall C function I use I // Definition of DoFaceGrouping: // INTEFaceGrouping (FEATUREINFO * p_facefeature, int t_size_fea, double * d_Matrix)}

I do not know how to field Get and set?) P_featureNode

Please help me very much!

In addition: In Java, ~ I defined my Java native code like this:

  Public stable country int DoFaceGrouping (FEATUREINFO [] p_featureNode, int size_fea, double [] Matrix);  

And I call it:

  int nRet = 0; NRT = Dufus Grouping (P_FeatureNode, T_Isa_FIA, Dmatrix);  


Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -