炎炎设计
JAVA比较典型的native的使用方式,用loadLibrary导入存在源文件目录下的*.dll文件,然后定义native方法时,与c/c++实现的函数有相同的参数和返回类型。123456789101112131415161718192021public class OpticalFlowCalculateDll{ static{ System.loadLibrary("OpticalFlow"); } public native static void setImage(); public native static int[] getGoodFeatureListForTrack(); public native static int[] getMatchedFeatureList(); public native static int getFeatureListSize(); public native static void dispose(); }