Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
4a073bd9
O
Opencv
项目概览
Greenplum
/
Opencv
11 个月 前同步成功
通知
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,发现更多精彩内容 >>
提交
4a073bd9
编写于
5月 12, 2010
作者:
V
Vadim Pisarevsky
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fixed build on Linux
上级
127d6649
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
85 addition
and
84 deletion
+85
-84
modules/calib3d/include/opencv2/calib3d/calib3d.hpp
modules/calib3d/include/opencv2/calib3d/calib3d.hpp
+5
-33
modules/calib3d/include/opencv2/calib3d/compat_c.h
modules/calib3d/include/opencv2/calib3d/compat_c.h
+0
-43
modules/features2d/include/opencv2/features2d/features2d.hpp
modules/features2d/include/opencv2/features2d/features2d.hpp
+2
-0
modules/features2d/src/oneway.cpp
modules/features2d/src/oneway.cpp
+1
-0
modules/highgui/src/cap_dc1394_v2.cpp
modules/highgui/src/cap_dc1394_v2.cpp
+0
-1
modules/highgui/src/cap_xine.cpp
modules/highgui/src/cap_xine.cpp
+0
-1
modules/imgproc/include/opencv2/imgproc/compat_c.h
modules/imgproc/include/opencv2/imgproc/compat_c.h
+44
-2
modules/imgproc/include/opencv2/imgproc/imgproc.hpp
modules/imgproc/include/opencv2/imgproc/imgproc.hpp
+7
-4
modules/imgproc/include/opencv2/imgproc/imgproc_c.h
modules/imgproc/include/opencv2/imgproc/imgproc_c.h
+26
-0
modules/imgproc/src/undistort.cpp
modules/imgproc/src/undistort.cpp
+0
-0
未找到文件。
modules/calib3d/include/opencv2/calib3d/calib3d.hpp
浏览文件 @
4a073bd9
...
...
@@ -104,31 +104,6 @@ CVAPI(void) cvTriangulatePoints(CvMat* projMatr1, CvMat* projMatr2,
CVAPI
(
void
)
cvCorrectMatches
(
CvMat
*
F
,
CvMat
*
points1
,
CvMat
*
points2
,
CvMat
*
new_points1
,
CvMat
*
new_points2
);
/* Transforms the input image to compensate lens distortion */
CVAPI
(
void
)
cvUndistort2
(
const
CvArr
*
src
,
CvArr
*
dst
,
const
CvMat
*
camera_matrix
,
const
CvMat
*
distortion_coeffs
,
const
CvMat
*
new_camera_matrix
CV_DEFAULT
(
0
)
);
/* Computes transformation map from intrinsic camera parameters
that can used by cvRemap */
CVAPI
(
void
)
cvInitUndistortMap
(
const
CvMat
*
camera_matrix
,
const
CvMat
*
distortion_coeffs
,
CvArr
*
mapx
,
CvArr
*
mapy
);
/* Computes undistortion+rectification map for a head of stereo camera */
CVAPI
(
void
)
cvInitUndistortRectifyMap
(
const
CvMat
*
camera_matrix
,
const
CvMat
*
dist_coeffs
,
const
CvMat
*
R
,
const
CvMat
*
new_camera_matrix
,
CvArr
*
mapx
,
CvArr
*
mapy
);
/* Computes the original (undistorted) feature coordinates
from the observed (distorted) coordinates */
CVAPI
(
void
)
cvUndistortPoints
(
const
CvMat
*
src
,
CvMat
*
dst
,
const
CvMat
*
camera_matrix
,
const
CvMat
*
dist_coeffs
,
const
CvMat
*
R
CV_DEFAULT
(
0
),
const
CvMat
*
P
CV_DEFAULT
(
0
));
/* Computes the optimal new camera matrix according to the free scaling parameter alpha:
alpha=0 - only valid pixels will be retained in the undistorted image
...
...
@@ -450,13 +425,6 @@ public:
namespace
cv
{
CV_EXPORTS
void
undistortPoints
(
const
Mat
&
src
,
vector
<
Point2f
>&
dst
,
const
Mat
&
cameraMatrix
,
const
Mat
&
distCoeffs
,
const
Mat
&
R
=
Mat
(),
const
Mat
&
P
=
Mat
());
CV_EXPORTS
void
undistortPoints
(
const
Mat
&
src
,
Mat
&
dst
,
const
Mat
&
cameraMatrix
,
const
Mat
&
distCoeffs
,
const
Mat
&
R
=
Mat
(),
const
Mat
&
P
=
Mat
());
CV_EXPORTS
void
Rodrigues
(
const
Mat
&
src
,
Mat
&
dst
);
CV_EXPORTS
void
Rodrigues
(
const
Mat
&
src
,
Mat
&
dst
,
Mat
&
jacobian
);
...
...
@@ -573,7 +541,7 @@ CV_EXPORTS void calibrationMatrixValues( const Mat& cameraMatrix,
double
&
focalLength
,
Point2d
&
principalPoint
,
double
&
aspectRatio
);
CV_EXPORTS
double
stereoCalibrate
(
const
vector
<
vector
<
Point3f
>
>&
objectPoints
,
const
vector
<
vector
<
Point2f
>
>&
imagePoints1
,
const
vector
<
vector
<
Point2f
>
>&
imagePoints2
,
...
...
@@ -605,6 +573,10 @@ CV_EXPORTS bool stereoRectifyUncalibrated( const Mat& points1,
Mat
&
H1
,
Mat
&
H2
,
double
threshold
=
5
);
CV_EXPORTS
Mat
getOptimalNewCameraMatrix
(
const
Mat
&
cameraMatrix
,
const
Mat
&
distCoeffs
,
Size
imageSize
,
double
alpha
,
Size
newImgSize
=
Size
(),
Rect
*
validPixROI
=
0
);
CV_EXPORTS
void
convertPointsHomogeneous
(
const
Mat
&
src
,
vector
<
Point3f
>&
dst
);
CV_EXPORTS
void
convertPointsHomogeneous
(
const
Mat
&
src
,
vector
<
Point2f
>&
dst
);
...
...
modules/calib3d/include/opencv2/calib3d/compat_c.h
浏览文件 @
4a073bd9
...
...
@@ -263,49 +263,6 @@ CV_INLINE void cvProjectPointsSimple( int point_count, CvPoint3D64f* _object_po
}
CV_INLINE
void
cvUnDistortOnce
(
const
CvArr
*
src
,
CvArr
*
dst
,
const
float
*
intrinsic_matrix
,
const
float
*
distortion_coeffs
,
int
CV_UNREFERENCED
(
interpolate
)
)
{
CvMat
_a
=
cvMat
(
3
,
3
,
CV_32F
,
(
void
*
)
intrinsic_matrix
);
CvMat
_k
=
cvMat
(
4
,
1
,
CV_32F
,
(
void
*
)
distortion_coeffs
);
cvUndistort2
(
src
,
dst
,
&
_a
,
&
_k
,
0
);
}
/* the two functions below have quite hackerish implementations, use with care
(or, which is better, switch to cvUndistortInitMap and cvRemap instead */
CV_INLINE
void
cvUnDistortInit
(
const
CvArr
*
CV_UNREFERENCED
(
src
),
CvArr
*
undistortion_map
,
const
float
*
A
,
const
float
*
k
,
int
CV_UNREFERENCED
(
interpolate
)
)
{
union
{
uchar
*
ptr
;
float
*
fl
;
}
data
;
CvSize
sz
;
cvGetRawData
(
undistortion_map
,
&
data
.
ptr
,
0
,
&
sz
);
assert
(
sz
.
width
>=
8
);
/* just save the intrinsic parameters to the map */
data
.
fl
[
0
]
=
A
[
0
];
data
.
fl
[
1
]
=
A
[
4
];
data
.
fl
[
2
]
=
A
[
2
];
data
.
fl
[
3
]
=
A
[
5
];
data
.
fl
[
4
]
=
k
[
0
];
data
.
fl
[
5
]
=
k
[
1
];
data
.
fl
[
6
]
=
k
[
2
];
data
.
fl
[
7
]
=
k
[
3
];
}
CV_INLINE
void
cvUnDistort
(
const
CvArr
*
src
,
CvArr
*
dst
,
const
CvArr
*
undistortion_map
,
int
CV_UNREFERENCED
(
interpolate
)
)
{
union
{
uchar
*
ptr
;
float
*
fl
;
}
data
;
float
a
[]
=
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
1
};
CvSize
sz
;
cvGetRawData
(
undistortion_map
,
&
data
.
ptr
,
0
,
&
sz
);
assert
(
sz
.
width
>=
8
);
a
[
0
]
=
data
.
fl
[
0
];
a
[
4
]
=
data
.
fl
[
1
];
a
[
2
]
=
data
.
fl
[
2
];
a
[
5
]
=
data
.
fl
[
3
];
cvUnDistortOnce
(
src
,
dst
,
a
,
data
.
fl
+
4
,
1
);
}
#define cvMake2DPoints cvConvertPointsHomogeneous
#define cvMake3DPoints cvConvertPointsHomogeneous
...
...
modules/features2d/include/opencv2/features2d/features2d.hpp
浏览文件 @
4a073bd9
...
...
@@ -46,6 +46,8 @@
#include "opencv2/core/core.hpp"
#ifdef __cplusplus
#include <limits>
extern
"C"
{
#endif
...
...
modules/features2d/src/oneway.cpp
浏览文件 @
4a073bd9
...
...
@@ -9,6 +9,7 @@
#include "precomp.hpp"
#include "opencv2/highgui/highgui.hpp"
#include <stdio.h>
namespace
cv
{
...
...
modules/highgui/src/cap_dc1394_v2.cpp
浏览文件 @
4a073bd9
...
...
@@ -47,7 +47,6 @@
#include <stdint.h>
#include <sys/select.h>
#include <dc1394/dc1394.h>
#include <cv.h>
#include <stdlib.h>
#include <string.h>
...
...
modules/highgui/src/cap_xine.cpp
浏览文件 @
4a073bd9
...
...
@@ -51,7 +51,6 @@
// required to enable some functions used here...
#define XINE_ENABLE_EXPERIMENTAL_FEATURES
#include <cv.h>
#include <cassert>
extern
"C"
...
...
modules/imgproc/include/opencv2/imgproc/compat_c.h
浏览文件 @
4a073bd9
...
...
@@ -425,8 +425,6 @@ CV_INLINE void cvMinAreaRect( CvPoint* points, int n,
vect1
->
y
=
pt
[
1
].
y
-
pt
[
0
].
y
;
vect2
->
x
=
pt
[
3
].
x
-
pt
[
0
].
x
;
vect2
->
y
=
pt
[
3
].
y
-
pt
[
0
].
y
;
CV_UNREFERENCED
(
(
left
,
bottom
,
right
,
top
)
);
}
typedef
int
CvDisType
;
...
...
@@ -828,6 +826,50 @@ typedef struct CvMatrix3
}
CvMatrix3
;
CV_INLINE
void
cvUnDistortOnce
(
const
CvArr
*
src
,
CvArr
*
dst
,
const
float
*
intrinsic_matrix
,
const
float
*
distortion_coeffs
,
int
CV_UNREFERENCED
(
interpolate
)
)
{
CvMat
_a
=
cvMat
(
3
,
3
,
CV_32F
,
(
void
*
)
intrinsic_matrix
);
CvMat
_k
=
cvMat
(
4
,
1
,
CV_32F
,
(
void
*
)
distortion_coeffs
);
cvUndistort2
(
src
,
dst
,
&
_a
,
&
_k
,
0
);
}
/* the two functions below have quite hackerish implementations, use with care
(or, which is better, switch to cvUndistortInitMap and cvRemap instead */
CV_INLINE
void
cvUnDistortInit
(
const
CvArr
*
CV_UNREFERENCED
(
src
),
CvArr
*
undistortion_map
,
const
float
*
A
,
const
float
*
k
,
int
CV_UNREFERENCED
(
interpolate
)
)
{
union
{
uchar
*
ptr
;
float
*
fl
;
}
data
;
CvSize
sz
;
cvGetRawData
(
undistortion_map
,
&
data
.
ptr
,
0
,
&
sz
);
assert
(
sz
.
width
>=
8
);
/* just save the intrinsic parameters to the map */
data
.
fl
[
0
]
=
A
[
0
];
data
.
fl
[
1
]
=
A
[
4
];
data
.
fl
[
2
]
=
A
[
2
];
data
.
fl
[
3
]
=
A
[
5
];
data
.
fl
[
4
]
=
k
[
0
];
data
.
fl
[
5
]
=
k
[
1
];
data
.
fl
[
6
]
=
k
[
2
];
data
.
fl
[
7
]
=
k
[
3
];
}
CV_INLINE
void
cvUnDistort
(
const
CvArr
*
src
,
CvArr
*
dst
,
const
CvArr
*
undistortion_map
,
int
CV_UNREFERENCED
(
interpolate
)
)
{
union
{
uchar
*
ptr
;
float
*
fl
;
}
data
;
float
a
[]
=
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
1
};
CvSize
sz
;
cvGetRawData
(
undistortion_map
,
&
data
.
ptr
,
0
,
&
sz
);
assert
(
sz
.
width
>=
8
);
a
[
0
]
=
data
.
fl
[
0
];
a
[
4
]
=
data
.
fl
[
1
];
a
[
2
]
=
data
.
fl
[
2
];
a
[
5
]
=
data
.
fl
[
3
];
cvUnDistortOnce
(
src
,
dst
,
a
,
data
.
fl
+
4
,
1
);
}
#ifdef __cplusplus
}
#endif
...
...
modules/imgproc/include/opencv2/imgproc/imgproc.hpp
浏览文件 @
4a073bd9
...
...
@@ -347,7 +347,7 @@ CV_EXPORTS void remap( const Mat& src, Mat& dst, const Mat& map1, const Mat& map
CV_EXPORTS
void
convertMaps
(
const
Mat
&
map1
,
const
Mat
&
map2
,
Mat
&
dstmap1
,
Mat
&
dstmap2
,
int
dstmap1type
,
bool
nninterpolation
=
false
);
CV_EXPORTS
Mat
getRotationMatrix2D
(
Point2f
center
,
double
angle
,
double
scale
);
CV_EXPORTS
Mat
getPerspectiveTransform
(
const
Point2f
src
[],
const
Point2f
dst
[]
);
CV_EXPORTS
Mat
getAffineTransform
(
const
Point2f
src
[],
const
Point2f
dst
[]
);
...
...
@@ -388,12 +388,15 @@ CV_EXPORTS void undistort( const Mat& src, Mat& dst, const Mat& cameraMatrix,
CV_EXPORTS
void
initUndistortRectifyMap
(
const
Mat
&
cameraMatrix
,
const
Mat
&
distCoeffs
,
const
Mat
&
R
,
const
Mat
&
newCameraMatrix
,
Size
size
,
int
m1type
,
Mat
&
map1
,
Mat
&
map2
);
CV_EXPORTS
Mat
getOptimalNewCameraMatrix
(
const
Mat
&
cameraMatrix
,
const
Mat
&
distCoeffs
,
Size
imageSize
,
double
alpha
,
Size
newImgSize
=
Size
(),
Rect
*
validPixROI
=
0
);
CV_EXPORTS
Mat
getDefaultNewCameraMatrix
(
const
Mat
&
cameraMatrix
,
Size
imgsize
=
Size
(),
bool
centerPrincipalPoint
=
false
);
CV_EXPORTS
void
undistortPoints
(
const
Mat
&
src
,
vector
<
Point2f
>&
dst
,
const
Mat
&
cameraMatrix
,
const
Mat
&
distCoeffs
,
const
Mat
&
R
=
Mat
(),
const
Mat
&
P
=
Mat
());
CV_EXPORTS
void
undistortPoints
(
const
Mat
&
src
,
Mat
&
dst
,
const
Mat
&
cameraMatrix
,
const
Mat
&
distCoeffs
,
const
Mat
&
R
=
Mat
(),
const
Mat
&
P
=
Mat
());
template
<
>
CV_EXPORTS
void
Ptr
<
CvHistogram
>::
delete_obj
();
...
...
modules/imgproc/include/opencv2/imgproc/imgproc_c.h
浏览文件 @
4a073bd9
...
...
@@ -205,6 +205,32 @@ CVAPI(void) cvLinearPolar( const CvArr* src, CvArr* dst,
CvPoint2D32f
center
,
double
maxRadius
,
int
flags
CV_DEFAULT
(
CV_INTER_LINEAR
+
CV_WARP_FILL_OUTLIERS
));
/* Transforms the input image to compensate lens distortion */
CVAPI
(
void
)
cvUndistort2
(
const
CvArr
*
src
,
CvArr
*
dst
,
const
CvMat
*
camera_matrix
,
const
CvMat
*
distortion_coeffs
,
const
CvMat
*
new_camera_matrix
CV_DEFAULT
(
0
)
);
/* Computes transformation map from intrinsic camera parameters
that can used by cvRemap */
CVAPI
(
void
)
cvInitUndistortMap
(
const
CvMat
*
camera_matrix
,
const
CvMat
*
distortion_coeffs
,
CvArr
*
mapx
,
CvArr
*
mapy
);
/* Computes undistortion+rectification map for a head of stereo camera */
CVAPI
(
void
)
cvInitUndistortRectifyMap
(
const
CvMat
*
camera_matrix
,
const
CvMat
*
dist_coeffs
,
const
CvMat
*
R
,
const
CvMat
*
new_camera_matrix
,
CvArr
*
mapx
,
CvArr
*
mapy
);
/* Computes the original (undistorted) feature coordinates
from the observed (distorted) coordinates */
CVAPI
(
void
)
cvUndistortPoints
(
const
CvMat
*
src
,
CvMat
*
dst
,
const
CvMat
*
camera_matrix
,
const
CvMat
*
dist_coeffs
,
const
CvMat
*
R
CV_DEFAULT
(
0
),
const
CvMat
*
P
CV_DEFAULT
(
0
));
/* creates structuring element used for morphological operations */
CVAPI
(
IplConvKernel
*
)
cvCreateStructuringElementEx
(
int
cols
,
int
rows
,
int
anchor_x
,
int
anchor_y
,
...
...
modules/
calib3d
/src/undistort.cpp
→
modules/
imgproc
/src/undistort.cpp
浏览文件 @
4a073bd9
文件已移动
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录