Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
4a073bd9
Commit
4a073bd9
authored
May 12, 2010
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed build on Linux
parent
127d6649
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
85 additions
and
84 deletions
+85
-84
calib3d.hpp
modules/calib3d/include/opencv2/calib3d/calib3d.hpp
+5
-33
compat_c.h
modules/calib3d/include/opencv2/calib3d/compat_c.h
+0
-43
features2d.hpp
modules/features2d/include/opencv2/features2d/features2d.hpp
+2
-0
oneway.cpp
modules/features2d/src/oneway.cpp
+1
-0
cap_dc1394_v2.cpp
modules/highgui/src/cap_dc1394_v2.cpp
+0
-1
cap_xine.cpp
modules/highgui/src/cap_xine.cpp
+0
-1
compat_c.h
modules/imgproc/include/opencv2/imgproc/compat_c.h
+44
-2
imgproc.hpp
modules/imgproc/include/opencv2/imgproc/imgproc.hpp
+7
-4
imgproc_c.h
modules/imgproc/include/opencv2/imgproc/imgproc_c.h
+26
-0
undistort.cpp
modules/imgproc/src/undistort.cpp
+0
-0
No files found.
modules/calib3d/include/opencv2/calib3d/calib3d.hpp
View file @
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
View file @
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
View file @
4a073bd9
...
...
@@ -46,6 +46,8 @@
#include "opencv2/core/core.hpp"
#ifdef __cplusplus
#include <limits>
extern
"C"
{
#endif
...
...
modules/features2d/src/oneway.cpp
View file @
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
View file @
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
View file @
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
View file @
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
View file @
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
View file @
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
View file @
4a073bd9
File moved
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment