类 SURF
- java.lang.Object
-
- org.opencv.core.Algorithm
-
- org.opencv.features2d.Feature2D
-
- org.opencv.xfeatures2d.SURF
-
public class SURF extends Feature2D
用于从图像中提取加速稳健特征的类 CITE: Bay06 。该算法参数- 成员 int extended
- 0 表示应计算基本描述符(每个 64 个元素)
- 1 表示应计算扩展描述符(每个 128 个元素)
- 成员 int upright
- 0 表示检测器计算每个特征的方向。
- 1 表示不计算方向(速度快得多)。例如,如果要匹配来自立体声对的图像,或者进行图像拼接,则匹配的特征可能具有非常相似的角度,并且可以通过设置 upright=1 来加快特征提取速度。
- 成员 double hessianThreshold 关键点检测器的阈值。只有海森矩阵大于 hessianThreshold 的特征才会被检测器保留。因此,该值越大,您将获得的特征点越少。一个好的默认值可以是 300 到 500,具体取决于图像对比度。
- 成员 int nOctaves 检测器使用的高斯金字塔八度音阶的数量。默认设置为 4。如果您想获得非常大的特征,请使用较大的值。如果您只想获得较小的特征,请减小它。
- 成员 int nOctaveLayers 高斯金字塔的每个八度音阶内的图像数量。默认设置为 2。
- 使用 SURF 特征检测器的示例可以在 opencv_source_code/samples/cpp/generic_descriptor_match.cpp 中找到
- 使用 SURF 特征检测器、提取器和匹配器的另一个示例可以在 opencv_source_code/samples/cpp/matcher_simple.cpp 中找到
- 成员 int extended
-
-
构造函数摘要
构造函数 修饰符 构造函数 描述 保护SURF(long addr)
-
方法摘要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 描述 static SURF__fromPtr__(long addr)static SURFcreate()64 元素描述符)。static SURFcreate(double hessianThreshold)static SURFcreate(double hessianThreshold, int nOctaves)static SURFcreate(double hessianThreshold, int nOctaves, int nOctaveLayers)static SURFcreate(double hessianThreshold, int nOctaves, int nOctaveLayers, boolean extended)static SURFcreate(double hessianThreshold, int nOctaves, int nOctaveLayers, boolean extended, boolean upright)protected voidfinalize()java.lang.StringgetDefaultName()返回算法字符串标识符。booleangetExtended()doublegetHessianThreshold()intgetNOctaveLayers()intgetNOctaves()booleangetUpright()voidsetExtended(boolean extended)voidsetHessianThreshold(double hessianThreshold)voidsetNOctaveLayers(int nOctaveLayers)voidsetNOctaves(int nOctaves)voidsetUpright(boolean upright)-
从类继承的方法 org.opencv.features2d.Feature2D
compute, compute, defaultNorm, descriptorSize, descriptorType, detect, detect, detect, detect, detectAndCompute, detectAndCompute, empty, read, write
-
从类继承的方法 org.opencv.core.Algorithm
clear, getNativeObjAddr, save
-
-
-
-
方法详细信息
-
__fromPtr__
public static SURF __fromPtr__(long addr)
-
create
public static SURF create(double hessianThreshold, int nOctaves, int nOctaveLayers, boolean extended, boolean upright)
- 参数
hessianThreshold- 用于 SURF 中的海森关键点检测器的阈值。nOctaves- 关键点检测器将使用的金字塔八度音阶的数量。nOctaveLayers- 每个八度音阶内的八度音阶层数。extended- 扩展描述符标志(true - 使用扩展的 128 元素描述符;false - 使用 64 元素描述符)。upright- 直立或旋转的特征标志(true - 不计算特征的方向;false - 计算方向)。- 返回
- 自动生成
-
create
public static SURF create(double hessianThreshold, int nOctaves, int nOctaveLayers, boolean extended)
- 参数
hessianThreshold- 用于 SURF 中的海森关键点检测器的阈值。nOctaves- 关键点检测器将使用的金字塔八度音阶的数量。nOctaveLayers- 每个八度音阶内的八度音阶层数。extended- 扩展描述符标志(true - 使用扩展的 128 元素描述符;false - 使用 64 元素描述符)。false - 计算方向)。- 返回
- 自动生成
-
create
public static SURF create(double hessianThreshold, int nOctaves, int nOctaveLayers)
- 参数
hessianThreshold- 用于 SURF 中的海森关键点检测器的阈值。nOctaves- 关键点检测器将使用的金字塔八度音阶的数量。nOctaveLayers- 每个八度音阶内的八度音阶层数。64 元素描述符)。false - 计算方向)。- 返回
- 自动生成
-
create
public static SURF create(double hessianThreshold, int nOctaves)
- 参数
hessianThreshold- 用于 SURF 中的海森关键点检测器的阈值。nOctaves- 关键点检测器将使用的金字塔八度音阶的数量。64 元素描述符)。false - 计算方向)。- 返回
- 自动生成
-
create
public static SURF create(double hessianThreshold)
- 参数
hessianThreshold- 用于 SURF 中的海森关键点检测器的阈值。64 元素描述符)。false - 计算方向)。- 返回
- 自动生成
-
create
public static SURF create()
64 元素描述符)。false - 计算方向)。- 返回
- 自动生成
-
setHessianThreshold
public void setHessianThreshold(double hessianThreshold)
-
getHessianThreshold
public double getHessianThreshold()
-
setNOctaves
public void setNOctaves(int nOctaves)
-
getNOctaves
public int getNOctaves()
-
setNOctaveLayers
public void setNOctaveLayers(int nOctaveLayers)
-
getNOctaveLayers
public int getNOctaveLayers()
-
setExtended
public void setExtended(boolean extended)
-
getExtended
public boolean getExtended()
-
setUpright
public void setUpright(boolean upright)
-
getUpright
public boolean getUpright()
-
getDefaultName
public java.lang.String getDefaultName()
从类复制的描述:Algorithm返回算法字符串标识符。当对象保存到文件或字符串时,此字符串用作顶级 xml/yml 节点标签。- 重写
getDefaultName在类中Feature2D- 返回
- 自动生成
-
-