public static class BaseFeatureSearchEngine.FeatureSeImpl extends BaseFeatureSeImpl
Constructor and Description |
---|
FeatureSeImpl(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
boolean |
addFeature(byte[] featureId,
byte[] feature,
long appid)
添加一条特征码到内存表
|
boolean |
addFeature(byte[] featureId,
byte[] feature,
java.lang.String imgMD5)
添加一条特征码到内存表
|
void |
clearAll()
删除内存表中所有特征数据
|
CodeBean |
getFeature(byte[] featureId)
根据特征码ID在表中查找指定的记录
|
boolean |
removeFeature(byte[] featureId)
根据特征码ID中表中删除指定的记录
|
CodeBean[] |
searchCode(byte[] code,
double sim,
int rows)
在内存表中根据比对相似度进行特征码搜索
|
int |
size() |
java.lang.String |
toString() |
getFeatureByHex, removeFeatureByHex
public FeatureSeImpl(java.lang.String name)
name
- 封装实现FseJniBridge
的类名,用于区分实例public CodeBean[] searchCode(byte[] code, double sim, int rows)
FeatureSe
code
- 要比对的特征码sim
- 相似度阀值rows
- 最大返回的记录数public CodeBean getFeature(byte[] featureId)
FeatureSe
featureId
- 特征码ID,MD5校验码(16 bytes)null
,featureId
为null
或空返回null
public boolean addFeature(byte[] featureId, byte[] feature, java.lang.String imgMD5)
FeatureSe
featureId
- 特征码ID(MD5校验码),为null时,native library会自动计算MD5作为特征码IDfeature
- 特征码字节数组,为null
时返回falseimgMD5
- 特征所属图的MD5(32字节HEX字符串),可为nullpublic boolean addFeature(byte[] featureId, byte[] feature, long appid)
FeatureSe
featureId
- 特征码ID(MD5校验码),为null时,native library会自动计算MD5作为特征码IDfeature
- 特征码字节数组,为null
时返回falseappid
- 应用id,由调用者定义,可为nullpublic boolean removeFeature(byte[] featureId)
FeatureSe
featureId
- 特征码ID,MD5校验码(16 bytes)public int size()
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2020. All rights reserved.