001package net.gdface.mtfsdk; 002 003import net.gdface.sdk.fse.BaseFeatureSearchEngine; 004import net.gdface.sdk.fse.FeatureSe; 005 006/** 007 * 基于MTFSDK Arm android算法的特征码内存搜索引擎(FSE,feature search engine)java接口类(JNI) 008 * @author guyadong 009 * 010 */ 011public class FseMtfAndroidBridge extends BaseFeatureSearchEngine{ 012 private static final String DEFAULT_LIB_NAME = "FS_FaceFeatureCompare"; 013 014 private static final FeatureSe FSE_INSTANCE = new FeatureSeImpl(FseMtfAndroidBridge.class.getName()); 015 static { 016 try{ 017 System.loadLibrary(DEFAULT_LIB_NAME); 018 init(DEFAULT_MODE,256,DEFAULT_LOAD_FACTOR,DEFAULT_OVERBLOCK_CAPACITY); 019 020 libraryLoaded = true; 021 }catch(Exception e){ 022 throw new ExceptionInInitializerError(e); 023 } 024 } 025 protected FseMtfAndroidBridge() { 026 } 027 028 /** 029 * 返回FSE搜索引擎的单实例 030 * @return 031 */ 032 public static FeatureSe getFeatureSe(){ 033 return isLibraryLoaded() ? FSE_INSTANCE : null; 034 } 035}