Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
c4631573
O
Opencv
项目概览
Greenplum
/
Opencv
10 个月 前同步成功
通知
7
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
Opencv
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
“d2f6f0bdb98144143088fb44fd6d69fcfca90507”上不存在“git@gitcode.net:qq_62668011/fucking-algorithm.git”
提交
c4631573
编写于
5月 26, 2010
作者:
V
Victor Erukhimov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
cv::cvflann -> cv::flann
上级
583a08d5
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
43 addition
and
20 deletion
+43
-20
include/opencv/cv.h
include/opencv/cv.h
+0
-4
include/opencv/cv.hpp
include/opencv/cv.hpp
+4
-0
include/opencv/cvaux.h
include/opencv/cvaux.h
+3
-2
include/opencv/cvaux.hpp
include/opencv/cvaux.hpp
+4
-0
include/opencv/cxcore.h
include/opencv/cxcore.h
+4
-0
modules/core/include/opencv2/core/flann.hpp
modules/core/include/opencv2/core/flann.hpp
+1
-1
modules/core/src/flann.cpp
modules/core/src/flann.cpp
+1
-1
modules/features2d/include/opencv2/features2d/features2d.hpp
modules/features2d/include/opencv2/features2d/features2d.hpp
+1
-1
modules/features2d/src/oneway.cpp
modules/features2d/src/oneway.cpp
+6
-6
samples/c/find_obj.cpp
samples/c/find_obj.cpp
+2
-2
samples/c/one_way_sample.cpp
samples/c/one_way_sample.cpp
+16
-2
tests/cv/src/anearestneighbors.cpp
tests/cv/src/anearestneighbors.cpp
+1
-1
未找到文件。
include/opencv/cv.h
浏览文件 @
c4631573
...
...
@@ -62,10 +62,6 @@
#if defined(__cplusplus)
#include "opencv2/core/internal.hpp"
namespace
cv
{
namespace
flann
=
cvflann
;
}
#endif //__cplusplus
#endif __OPENCV_OLD_CV_H_
include/opencv/cv.hpp
浏览文件 @
c4631573
...
...
@@ -43,6 +43,10 @@
#ifndef __OPENCV_OLD_CV_HPP__
#define __OPENCV_OLD_CV_HPP__
#if defined(__GNUC__)
#warning "This is a deprecated opencv header provided for compatibility. Please include a header from a corresponding opencv module"
#endif
#include <cv.h>
#endif
include/opencv/cvaux.h
浏览文件 @
c4631573
...
...
@@ -42,8 +42,9 @@
#ifndef __OPENCV_OLD_AUX_H__
#define __OPENCV_OLD_AUX_H__
#pragma warning("This is a deprecated opencv header provided for compatibility. Please \
include a header from a corresponding opencv module")
#if defined(__GNUC__)
#warning "This is a deprecated opencv header provided for compatibility. Please include a header from a corresponding opencv module"
#endif
#include "opencv2/core/core_c.h"
#include "opencv2/core/core.hpp"
...
...
include/opencv/cvaux.hpp
浏览文件 @
c4631573
...
...
@@ -42,6 +42,10 @@
#ifndef __OPENCV_OLD_AUX_HPP__
#define __OPENCV_OLD_AUX_HPP__
#if defined(__GNUC__)
#warning "This is a deprecated opencv header provided for compatibility. Please include a header from a corresponding opencv module"
#endif
#include <cvaux.h>
#endif
include/opencv/cxcore.h
浏览文件 @
c4631573
...
...
@@ -43,6 +43,10 @@
#ifndef __OPENCV_OLD_CXCORE_H__
#define __OPENCV_OLD_CXCORE_H__
#if defined(__GNUC__)
#warning "This is a deprecated opencv header provided for compatibility. Please include a header from a corresponding opencv module"
#endif
#include "opencv2/core/core_c.h"
#include "opencv2/core/core.hpp"
...
...
modules/core/include/opencv2/core/flann.hpp
浏览文件 @
c4631573
...
...
@@ -52,7 +52,7 @@ namespace cvflann
namespace
cv
{
namespace
cv
flann
{
namespace
flann
{
/* Nearest neighbor index algorithms */
enum
flann_algorithm_t
{
...
...
modules/core/src/flann.cpp
浏览文件 @
c4631573
...
...
@@ -38,7 +38,7 @@
namespace
cv
{
namespace
cv
flann
{
namespace
flann
{
::
cvflann
::
Index
*
LinearIndexParams
::
createIndex
(
const
Mat
&
dataset
)
const
{
...
...
modules/features2d/include/opencv2/features2d/features2d.hpp
浏览文件 @
c4631573
...
...
@@ -1077,7 +1077,7 @@ protected:
CvMat
*
m_pca_hr_eigenvectors
;
// PCA eigenvectors for large patches
OneWayDescriptor
*
m_pca_descriptors
;
// an array of PCA descriptors
cv
::
cv
flann
::
Index
*
m_pca_descriptors_tree
;
cv
::
flann
::
Index
*
m_pca_descriptors_tree
;
CvMat
*
m_pca_descriptors_matrix
;
CvAffinePose
*
m_poses
;
// array of poses
...
...
modules/features2d/src/oneway.cpp
浏览文件 @
c4631573
...
...
@@ -149,7 +149,7 @@ namespace cv{
std
::
vector
<
int
>&
desc_idxs
,
std
::
vector
<
int
>&
pose_idxs
,
std
::
vector
<
float
>&
distances
,
CvMat
*
avg
=
0
,
CvMat
*
eigenvalues
=
0
);
void
FindOneWayDescriptor
(
cv
::
cv
flann
::
Index
*
m_pca_descriptors_tree
,
CvSize
patch_size
,
int
m_pca_dim_low
,
int
m_pose_count
,
IplImage
*
patch
,
int
&
desc_idx
,
int
&
pose_idx
,
float
&
distance
,
void
FindOneWayDescriptor
(
cv
::
flann
::
Index
*
m_pca_descriptors_tree
,
CvSize
patch_size
,
int
m_pca_dim_low
,
int
m_pose_count
,
IplImage
*
patch
,
int
&
desc_idx
,
int
&
pose_idx
,
float
&
distance
,
CvMat
*
avg
=
0
,
CvMat
*
eigenvalues
=
0
);
void
FindOneWayDescriptorEx
(
int
desc_count
,
const
OneWayDescriptor
*
descriptors
,
IplImage
*
patch
,
...
...
@@ -163,7 +163,7 @@ namespace cv{
std
::
vector
<
float
>&
distances
,
std
::
vector
<
float
>&
scales
,
CvMat
*
avg
,
CvMat
*
eigenvectors
);
void
FindOneWayDescriptorEx
(
cv
::
cv
flann
::
Index
*
m_pca_descriptors_tree
,
CvSize
patch_size
,
int
m_pca_dim_low
,
int
m_pose_count
,
IplImage
*
patch
,
void
FindOneWayDescriptorEx
(
cv
::
flann
::
Index
*
m_pca_descriptors_tree
,
CvSize
patch_size
,
int
m_pca_dim_low
,
int
m_pose_count
,
IplImage
*
patch
,
float
scale_min
,
float
scale_max
,
float
scale_step
,
int
&
desc_idx
,
int
&
pose_idx
,
float
&
distance
,
float
&
scale
,
CvMat
*
avg
,
CvMat
*
eigenvectors
);
...
...
@@ -800,7 +800,7 @@ namespace cv{
#if defined(_KDTREE)
void
FindOneWayDescriptor
(
cv
::
cv
flann
::
Index
*
m_pca_descriptors_tree
,
CvSize
patch_size
,
int
m_pca_dim_low
,
int
m_pose_count
,
IplImage
*
patch
,
int
&
desc_idx
,
int
&
pose_idx
,
float
&
distance
,
void
FindOneWayDescriptor
(
cv
::
flann
::
Index
*
m_pca_descriptors_tree
,
CvSize
patch_size
,
int
m_pca_dim_low
,
int
m_pose_count
,
IplImage
*
patch
,
int
&
desc_idx
,
int
&
pose_idx
,
float
&
distance
,
CvMat
*
avg
,
CvMat
*
eigenvectors
)
{
desc_idx
=
-
1
;
...
...
@@ -875,7 +875,7 @@ namespace cv{
object_ptr
[
i
]
=
pca_coeffs
->
data
.
fl
[
i
];
}
m_pca_descriptors_tree
->
knnSearch
(
m_object
,
m_indices
,
m_dists
,
1
,
cv
::
cv
flann
::
SearchParams
(
-
1
)
);
m_pca_descriptors_tree
->
knnSearch
(
m_object
,
m_indices
,
m_dists
,
1
,
cv
::
flann
::
SearchParams
(
-
1
)
);
desc_idx
=
((
int
*
)(
m_indices
.
ptr
<
int
>
(
0
)))[
0
]
/
m_pose_count
;
pose_idx
=
((
int
*
)(
m_indices
.
ptr
<
int
>
(
0
)))[
0
]
%
m_pose_count
;
...
...
@@ -1109,7 +1109,7 @@ namespace cv{
}
#if defined(_KDTREE)
void
FindOneWayDescriptorEx
(
cv
::
cv
flann
::
Index
*
m_pca_descriptors_tree
,
CvSize
patch_size
,
int
m_pca_dim_low
,
void
FindOneWayDescriptorEx
(
cv
::
flann
::
Index
*
m_pca_descriptors_tree
,
CvSize
patch_size
,
int
m_pca_dim_low
,
int
m_pose_count
,
IplImage
*
patch
,
float
scale_min
,
float
scale_max
,
float
scale_step
,
int
&
desc_idx
,
int
&
pose_idx
,
float
&
distance
,
float
&
scale
,
...
...
@@ -1660,7 +1660,7 @@ namespace cv{
//::cvflann::KDTreeIndexParams params;
//params.trees = 1;
//m_pca_descriptors_tree = new KDTree(pca_descriptors_mat);
m_pca_descriptors_tree
=
new
cv
::
cvflann
::
Index
(
pca_descriptors_mat
,
cv
::
cv
flann
::
KDTreeIndexParams
(
1
));
m_pca_descriptors_tree
=
new
cv
::
flann
::
Index
(
pca_descriptors_mat
,
cv
::
flann
::
KDTreeIndexParams
(
1
));
//cvReleaseMat(&m_pca_descriptors_matrix);
//m_pca_descriptors_tree->buildIndex();
}
...
...
samples/c/find_obj.cpp
浏览文件 @
c4631573
...
...
@@ -138,8 +138,8 @@ flannFindPairs( const CvSeq*, const CvSeq* objectDescriptors,
// find nearest neighbors using FLANN
cv
::
Mat
m_indices
(
objectDescriptors
->
total
,
2
,
CV_32S
);
cv
::
Mat
m_dists
(
objectDescriptors
->
total
,
2
,
CV_32F
);
cv
::
cvflann
::
Index
flann_index
(
m_image
,
cv
::
cv
flann
::
KDTreeIndexParams
(
4
));
// using 4 randomized kdtrees
flann_index
.
knnSearch
(
m_object
,
m_indices
,
m_dists
,
2
,
cv
::
cv
flann
::
SearchParams
(
64
)
);
// maximum number of leafs checked
cv
::
flann
::
Index
flann_index
(
m_image
,
cv
::
flann
::
KDTreeIndexParams
(
4
));
// using 4 randomized kdtrees
flann_index
.
knnSearch
(
m_object
,
m_indices
,
m_dists
,
2
,
cv
::
flann
::
SearchParams
(
64
)
);
// maximum number of leafs checked
int
*
indices_ptr
=
m_indices
.
ptr
<
int
>
(
0
);
float
*
dists_ptr
=
m_dists
.
ptr
<
float
>
(
0
);
...
...
samples/c/one_way_sample.cpp
浏览文件 @
c4631573
...
...
@@ -54,12 +54,26 @@ int main(int argc, char** argv)
printf
(
"Reading the images...
\n
"
);
IplImage
*
img1
=
cvLoadImage
(
img1_name
.
c_str
(),
CV_LOAD_IMAGE_GRAYSCALE
);
IplImage
*
img2
=
cvLoadImage
(
img2_name
.
c_str
(),
CV_LOAD_IMAGE_GRAYSCALE
);
// extract keypoints from the first image
vector
<
KeyPoint
>
keypoints1
;
SURF
surf_extractor
(
5.0e3
);
vector
<
KeyPoint
>
keypoints1
;
#if 1
Mat
_img1
(
img1
);
vector
<
Point2f
>
corners
;
goodFeaturesToTrack
(
_img1
,
corners
,
200
,
0.01
,
20
);
for
(
size_t
i
=
0
;
i
<
corners
.
size
();
i
++
)
{
KeyPoint
p
;
p
.
pt
=
corners
[
i
];
keypoints1
.
push_back
(
p
);
}
#else
// printf("Extracting keypoints\n");
surf_extractor
(
img1
,
Mat
(),
keypoints1
);
#endif
printf
(
"Extracted %d keypoints...
\n
"
,
(
int
)
keypoints1
.
size
());
printf
(
"Training one way descriptors..."
);
...
...
tests/cv/src/anearestneighbors.cpp
浏览文件 @
c4631573
...
...
@@ -47,7 +47,7 @@
#include <iostream>
using
namespace
cv
;
using
namespace
cv
::
cv
flann
;
using
namespace
cv
::
flann
;
//--------------------------------------------------------------------------------
class
NearestNeighborTest
:
public
CvTest
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录