资源简介
OpenCV-2.0.0.tar.bz2 计算机视觉处理的库
代码片段和文件信息
/***********************************************************************
* Software License Agreement (BSD License)
*
* Copyright 2008-2009 Marius Muja (mariusm@cs.ubc.ca). All rights reserved.
* Copyright 2008-2009 David G. Lowe (lowe@cs.ubc.ca). All rights reserved.
*
* THE BSD LICENSE
*
* Redistribution and use in source and binary forms with or without
* modification are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice this list of conditions and the following disclaimer.
* 2. 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.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ‘‘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 THE AUTHOR 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.
*************************************************************************/
#include
#include
#include “flann.h“
#include “timer.h“
#include “common.h“
#include “logger.h“
#include “index_testing.h“
#include “saving.h“
#include “object_factory.h“
// index types
#include “kdtree_index.h“
#include “kmeans_index.h“
#include “composite_index.h“
#include “linear_index.h“
#include “autotuned_index.h“
#include
using namespace std;
#include “flann.h“
#ifdef WIN32
#define EXPORTED extern “C“ __declspec(dllexport)
#else
#define EXPORTED extern “C“
#endif
namespace flann
{
typedef objectFactory ParamsFactory;
IndexParams* IndexParams::createFromParameters(const FLANNParameters& p)
{
IndexParams* params = ParamsFactory::instance().create(p.algorithm);
params->fromParameters(p);
return params;
}
NNIndex* LinearIndexParams::createIndex(const Matrix& dataset) const
{
return new LinearIndex(dataset *this);
}
NNIndex* KDTreeIndexParams::createIndex(const Matrix& dataset) const
{
return new KDTreeIndex(dataset *this);
}
NNIndex* KMeansIndexParams::createIndex(const Matrix& dataset) const
{
return new KMeansIndex(dataset *this);
}
NNIndex* CompositeIndexParams::createIndex(const Matrix& dataset) const
{
return new CompositeIndex(dataset *this);
}
NNIndex* AutotunedIndexParams::createIndex(const Matrix& dataset) const
- 上一篇:unity简单的2D飞机大战游戏
- 下一篇:数学游戏与欣赏
评论
共有 条评论