net.gdface.facedb.FeatureDbSearchEngine Maven / Gradle / Ivy
package net.gdface.facedb;
import net.gdface.facedb.db.FeatureBean;
import net.gdface.sdk.fse.BaseFseDbEngine;
import net.gdface.sdk.fse.FeatureSe;
import net.gdface.utils.FaceUtilits;
/**
* 基于数据库的特征搜索引擎
* @author guyadong
*
*/
public class FeatureDbSearchEngine extends BaseFseDbEngine {
/**
*
* @param fse {@link FeatureSe}引擎实例
*/
public FeatureDbSearchEngine(FeatureSe fse) {
super(fse);
}
@Override
protected byte[] featureOf(FeatureBean bean) {
return null == bean ? null : FaceUtilits.getBytesInBuffer(bean.getFeature());
}
@Override
protected byte[] featureIdOf(FeatureBean bean) {
return null == bean ? null : FaceUtilits.hex2Bytes(bean.getMd5());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy