All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.gdface.facedb.FeatureDbSearchEngine Maven / Gradle / Ivy

There is a newer version: 3.2.0
Show newest version
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