public interface FeatureSe
addFeature(byte[], byte[], String)
方法将特征添加到搜索引擎searchCode(byte[], double, int)
在内存中搜索与指定特征相似的的特征返回搜索结果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在表中查找指定的记录
|
CodeBean |
getFeatureByHex(java.lang.String featureId)
根据特征码ID在表中查找指定的记录
|
boolean |
removeFeature(byte[] featureId)
根据特征码ID中表中删除指定的记录
|
boolean |
removeFeatureByHex(java.lang.String featureId)
根据特征码ID中表中删除指定的记录
|
CodeBean[] |
searchCode(byte[] code,
double sim,
int rows)
在内存表中根据比对相似度进行特征码搜索
|
int |
size() |
CodeBean[] searchCode(byte[] code, double sim, int rows)
code
- 要比对的特征码sim
- 相似度阀值rows
- 最大返回的记录数CodeBean getFeature(byte[] featureId)
featureId
- 特征码ID,MD5校验码(16 bytes)null
,featureId
为null
或空返回null
CodeBean getFeatureByHex(java.lang.String featureId)
featureId
- 特征码ID,MD5校验码(32字节HEX字符串)null
,featureId
为null
或空返回null
boolean addFeature(byte[] featureId, byte[] feature, java.lang.String imgMD5)
featureId
- 特征码ID(MD5校验码),为null时,native library会自动计算MD5作为特征码IDfeature
- 特征码字节数组,为null
时返回falseimgMD5
- 特征所属图的MD5(32字节HEX字符串),可为nullboolean addFeature(byte[] featureId, byte[] feature, long appid)
featureId
- 特征码ID(MD5校验码),为null时,native library会自动计算MD5作为特征码IDfeature
- 特征码字节数组,为null
时返回falseappid
- 应用id,由调用者定义,可为nullboolean removeFeature(byte[] featureId)
featureId
- 特征码ID,MD5校验码(16 bytes)boolean removeFeatureByHex(java.lang.String featureId)
featureId
- 特征码ID,MD5校验码(32字节HEX字符串)void clearAll()
int size()
Copyright © 2020. All rights reserved.