zoukankan      html  css  js  c++  java
  • keypoint数据结构

    公有属性

    (float)angle:角度,表示关键点的方向,-1为初值。

    (int)class_id:当要对图片进行分类时,我们可以用class_id对每个特征点进行区分,未设定时为-1,需要靠自己设定

    (int)octave:代表是从金字塔哪一层提取的得到的数据。

    (Point2f)pt:关键点的点坐标

    (float)response:响应程度,代表该点强壮大小—response代表着该关键点how good,更确切的说,是该点角点的程度。

    (float)size:该点直径的大小

    公有成员函数

    三个构造函数

    KeyPoint () : 默认构造函数

    KeyPoint (Point2f _pt, float _size, float _angle=-1, float _response=0, int _octave=0, int _class_id=-1)

    参数
        _pt	     : 关键点的x和y坐标
        _size	 : 关键点直径
        _angle	 : 关键点方向
        _response:关键点上的关键点检测器响应(即关键点的强度)
        _octave	 : 已检测到关键点的pyramid octave
        _class_id: 关键点ID
    

    KeyPoint (float x, float y, float _size, float _angle=-1, float _response=0, int _octave=0, int _class_id=-1)

    参数
        x	     : 关键点的x坐标
        y	     : 关键点的y坐标
        _size	 : 关键点直径
        _angle	 : 关键点方向
        _response:关键点上的关键点检测器响应(即关键点的强度)
        _octave	 : 已检测到关键点的pyramid octave
        _class_id: 关键点ID
    

    size_t hash () const

    静态公有成员函数
    static void convert (const std::vector< KeyPoint > &keypoints, std::vector< Point2f > &points2f, const std::vector< int > &keypointIndexes=std::vector< int >())

    此方法将关键点的矢量转换为点矢量或反向,其中每个关键点被指定相同的大小和相同的方向。

    参数
    keypoints	    : 从任何特征检测算法(如SIFT / SURF / ORB)获得的关键点
    points2f	    : 每个关键点的(x,y)坐标数组
    keypointIndexes	: 要转换为点的关键点的索引数组。(像掩码一样只转换指定的关键点)
    

    static void convert (const std::vector< Point2f > &points2f, std::vector< KeyPoint > &keypoints, float size=1, float response=1, int octave=0, int class_id=-1)

    这是一个重载的成员函数,为方便起见而提供。它与上述函数的不同之处仅在于它接受的参数。

    参数
    points2f  : 每个关键点的(x,y)坐标数组
    keypoints : 从任何特征检测算法(如SIFT / SURF / ORB)获得的关键点
    size	  : 关键点直径
    response  : 关键点上的关键点检测器响应(即关键点的强度)
    octave	  : 已检测到关键点的pyramid octave
    class_id  : 关键点 id
    

    static float overlap (const KeyPoint &kp1, const KeyPoint &kp2)

    此方法计算关键点对的重叠。重叠是关键点区域交叉区域与关键点区域联合区域之间的比率(将关键点区域视为圆圈)。如果它们不重叠,我们就会得到零。如果它们在相同大小的相同位置重合,我们得到1。

    参数
        kp1	: First keypoint
        kp2	: Second keypoint
    
  • 相关阅读:
    NOIP2011 D1T1 铺地毯
    NOIP2013 D1T3 货车运输 倍增LCA OR 并查集按秩合并
    POJ 2513 trie树+并查集判断无向图的欧拉路
    599. Minimum Index Sum of Two Lists
    594. Longest Harmonious Subsequence
    575. Distribute Candies
    554. Brick Wall
    535. Encode and Decode TinyURL(rand and srand)
    525. Contiguous Array
    500. Keyboard Row
  • 原文地址:https://www.cnblogs.com/penuel/p/13251941.html
Copyright © 2011-2022 走看看