Repository for OpenCV's extra modules
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

185 lines
7.1 KiB

/*
By downloading, copying, installing or using the software you agree to this
license. If you do not agree to this license, do not download, install,
copy or use the software.
License Agreement
For Open Source Computer Vision Library
(3-clause BSD License)
Copyright (C) 2013, OpenCV Foundation, all rights reserved.
Third party copyrights are property of their respective owners.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the names of the copyright holders nor the names of the contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
This software is provided by the copyright holders and contributors "as is" and
any express or implied warranties, including, but not limited to, the implied
warranties of merchantability and fitness for a particular purpose are
disclaimed. In no event shall copyright holders or contributors be liable for
any direct, indirect, incidental, special, exemplary, or consequential damages
(including, but not limited to, procurement of substitute goods or services;
loss of use, data, or profits; or business interruption) however caused
and on any theory of liability, whether in contract, strict liability,
or tort (including negligence or otherwise) arising in any way out of
the use of this software, even if advised of the possibility of such damage.
*/
#ifndef __OPENCV_XFEATURES2D_HPP__
#define __OPENCV_XFEATURES2D_HPP__
#include "opencv2/features2d.hpp"
#include "opencv2/xfeatures2d/nonfree.hpp"
/** @defgroup xfeatures2d Extra 2D Features Framework
@{
@defgroup xfeatures2d_experiment Experimental 2D Features Algorithms
This section describes experimental algorithms for 2d feature detection.
@defgroup xfeatures2d_nonfree Non-free 2D Features Algorithms
This section describes two popular algorithms for 2d feature detection, SIFT and SURF, that are
known to be patented. Use them at your own risk.
@}
*/
namespace cv
{
namespace xfeatures2d
{
//! @addtogroup xfeatures2d_experiment
//! @{
/** @brief Class implementing the FREAK (*Fast Retina Keypoint*) keypoint descriptor, described in @cite AOV12 .
The algorithm propose a novel keypoint descriptor inspired by the human visual system and more
precisely the retina, coined Fast Retina Key- point (FREAK). A cascade of binary strings is
computed by efficiently comparing image intensities over a retinal sampling pattern. FREAKs are in
general faster to compute with lower memory load and also more robust than SIFT, SURF or BRISK.
They are competitive alternatives to existing keypoints in particular for embedded applications.
@note
- An example on how to use the FREAK descriptor can be found at
opencv_source_code/samples/cpp/freak_demo.cpp
*/
class CV_EXPORTS FREAK : public Feature2D
{
public:
enum
{
NB_SCALES = 64, NB_PAIRS = 512, NB_ORIENPAIRS = 45
};
/**
@param orientationNormalized Enable orientation normalization.
@param scaleNormalized Enable scale normalization.
@param patternScale Scaling of the description pattern.
@param nOctaves Number of octaves covered by the detected keypoints.
@param selectedPairs (Optional) user defined selected pairs indexes,
*/
static Ptr<FREAK> create(bool orientationNormalized = true,
bool scaleNormalized = true,
float patternScale = 22.0f,
int nOctaves = 4,
const std::vector<int>& selectedPairs = std::vector<int>());
};
/** @brief The class implements the keypoint detector introduced by @cite Agrawal08, synonym of StarDetector. :
*/
class CV_EXPORTS StarDetector : public FeatureDetector
{
public:
//! the full constructor
static Ptr<StarDetector> create(int maxSize=45, int responseThreshold=30,
int lineThresholdProjected=10,
int lineThresholdBinarized=8,
int suppressNonmaxSize=5);
};
/*
* BRIEF Descriptor
*/
/** @brief Class for computing BRIEF descriptors described in @cite calon2010 .
@note
- A complete BRIEF extractor sample can be found at
opencv_source_code/samples/cpp/brief_match_test.cpp
*/
class CV_EXPORTS BriefDescriptorExtractor : public DescriptorExtractor
{
public:
static Ptr<BriefDescriptorExtractor> create( int bytes = 32 );
};
/** @brief Class implementing the locally uniform comparison image descriptor, described in @cite LUCID
An image descriptor that can be computed very fast, while being
about as robust as, for example, SURF or BRIEF.
*/
class CV_EXPORTS LUCID : public DescriptorExtractor
{
public:
/**
* @param lucid_kernel kernel for descriptor construction, where 1=3x3, 2=5x5, 3=7x7 and so forth
* @param blur_kernel kernel for blurring image prior to descriptor construction, where 1=3x3, 2=5x5, 3=7x7 and so forth
*/
static Ptr<LUCID> create(const int lucid_kernel, const int blur_kernel);
};
/** @brief Class implementing DAISY descriptor, described in @cite Tola10
@param radius radius of the descriptor at the initial scale
@param q_radius amount of radial range division quantity
@param q_theta amount of angular range division quantity
@param q_hist amount of gradient orientations range division quantity
@param mode choose computation mode of descriptors where
DAISY::ONLY_KEYS means to compute descriptors only for keypoints in the list (default) and
DAISY::COMP_FULL will compute descriptors for all pixels in the given image
@param norm choose descriptors normalization type, where
DAISY::NRM_NONE will not do any normalization (default),
DAISY::NRM_PARTIAL mean that histograms are normalized independently for L2 norm equal to 1.0,
DAISY::NRM_FULL mean that descriptors are normalized for L2 norm equal to 1.0,
DAISY::NRM_SIFT mean that descriptors are normalized for L2 norm equal to 1.0 but no individual one is bigger than 0.154 as in SIFT
@param H optional 3x3 homography matrix used to warp the grid of daisy but sampling keypoints remains unwarped on image
@param interpolation switch to disable interpolation for speed improvement at minor quality loss
@param use_orientation sample patterns using keypoints orientation, disabled by default.
*/
class CV_EXPORTS DAISY : public DescriptorExtractor
{
public:
enum
{
ONLY_KEYS = 0, COMP_FULL = 1,
NRM_NONE = 100, NRM_PARTIAL = 101, NRM_FULL = 102, NRM_SIFT = 103,
};
static Ptr<DAISY> create( float radius = 15, int q_radius = 3, int q_theta = 8,
int q_hist = 8, int mode = DAISY::ONLY_KEYS, int norm = DAISY::NRM_NONE,
InputArray H = noArray() , bool interpolation = true, bool use_orientation = false );
};
//! @}
}
}
#endif