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
b1722352
Commit
b1722352
authored
Nov 29, 2010
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed severe bug: CV_RANSAC != CV_FM_RANSAC, CV_LMEDS != CV_FM_LMEDS
parent
2b660bf5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
21 deletions
+23
-21
calib3d.hpp
modules/calib3d/include/opencv2/calib3d/calib3d.hpp
+20
-18
watershed.cpp
samples/cpp/watershed.cpp
+3
-3
No files found.
modules/calib3d/include/opencv2/calib3d/calib3d.hpp
View file @
b1722352
...
...
@@ -77,10 +77,15 @@ CVAPI(void) cvConvertPointsHomogeneous( const CvMat* src, CvMat* dst );
/* Calculates fundamental matrix given a set of corresponding points */
#define CV_FM_7POINT 1
#define CV_FM_8POINT 2
#define CV_FM_LMEDS_ONLY 8
#define CV_FM_RANSAC_ONLY 4
#define CV_FM_LMEDS 8
#define CV_FM_RANSAC 4
#define CV_LMEDS 4
#define CV_RANSAC 8
#define CV_FM_LMEDS_ONLY CV_LMEDS
#define CV_FM_RANSAC_ONLY CV_RANSAC
#define CV_FM_LMEDS CV_LMEDS
#define CV_FM_RANSAC CV_RANSAC
CVAPI
(
int
)
cvFindFundamentalMat
(
const
CvMat
*
points1
,
const
CvMat
*
points2
,
CvMat
*
fundamental_matrix
,
int
method
CV_DEFAULT
(
CV_FM_RANSAC
),
...
...
@@ -120,9 +125,6 @@ CVAPI(void) cvGetOptimalNewCameraMatrix( const CvMat* camera_matrix,
CVAPI
(
int
)
cvRodrigues2
(
const
CvMat
*
src
,
CvMat
*
dst
,
CvMat
*
jacobian
CV_DEFAULT
(
0
)
);
#define CV_LMEDS 4
#define CV_RANSAC 8
/* Finds perspective transformation between the object plane and image (view) plane */
CVAPI
(
int
)
cvFindHomography
(
const
CvMat
*
src_points
,
const
CvMat
*
dst_points
,
...
...
@@ -438,8 +440,8 @@ CV_EXPORTS_AS(RodriguesJ) void Rodrigues(const Mat& src, CV_OUT Mat& dst, CV_OUT
//! type of the robust estimation algorithm
enum
{
LMEDS
=
4
,
//!< least-median algorithm
RANSAC
=
8
//!< RANSAC algorithm
LMEDS
=
CV_LMEDS
,
//!< least-median algorithm
RANSAC
=
CV_RANSAC
//!< RANSAC algorithm
};
//! computes the best-fit perspective transformation mapping srcPoints to dstPoints.
...
...
@@ -543,11 +545,11 @@ CV_EXPORTS void drawChessboardCorners( Mat& image, Size patternSize,
enum
{
CALIB_USE_INTRINSIC_GUESS
=
1
,
CALIB_FIX_ASPECT_RATIO
=
2
,
CALIB_FIX_PRINCIPAL_POINT
=
4
,
CALIB_ZERO_TANGENT_DIST
=
8
,
CALIB_FIX_FOCAL_LENGTH
=
16
,
CALIB_USE_INTRINSIC_GUESS
=
CV_CALIB_USE_INTRINSIC_GUESS
,
CALIB_FIX_ASPECT_RATIO
=
CV_CALIB_FIX_ASPECT_RATIO
,
CALIB_FIX_PRINCIPAL_POINT
=
CV_CALIB_FIX_PRINCIPAL_POINT
,
CALIB_ZERO_TANGENT_DIST
=
CV_CALIB_ZERO_TANGENT_DIST
,
CALIB_FIX_FOCAL_LENGTH
=
CV_CALIB_FIX_FOCAL_LENGTH
,
CALIB_FIX_K1
=
CV_CALIB_FIX_K1
,
CALIB_FIX_K2
=
CV_CALIB_FIX_K2
,
CALIB_FIX_K3
=
CV_CALIB_FIX_K3
,
...
...
@@ -645,10 +647,10 @@ CV_EXPORTS void convertPointsHomogeneous( const Mat& src, CV_OUT vector<Point2f>
//! the algorithm for finding fundamental matrix
enum
{
FM_7POINT
=
1
,
//!< 7-point algorithm
FM_8POINT
=
2
,
//!< 8-point algorithm
FM_LMEDS
=
4
,
//!< least-median algorithm
FM_RANSAC
=
8
//!< RANSAC algorithm
FM_7POINT
=
CV_FM_7POINT
,
//!< 7-point algorithm
FM_8POINT
=
CV_FM_8POINT
,
//!< 8-point algorithm
FM_LMEDS
=
CV_FM_LMEDS
,
//!< least-median algorithm
FM_RANSAC
=
CV_FM_RANSAC
//!< RANSAC algorithm
};
//! finds fundamental matrix from a set of corresponding 2D points
...
...
samples/cpp/watershed.cpp
View file @
b1722352
...
...
@@ -92,9 +92,9 @@ int main( int argc, char** argv )
vector
<
Vec3b
>
colorTab
;
for
(
i
=
0
;
i
<
compCount
;
i
++
)
{
int
b
=
theRNG
().
uniform
(
180
,
230
);
int
g
=
theRNG
().
uniform
(
180
,
230
);
int
r
=
theRNG
().
uniform
(
180
,
230
);
int
b
=
theRNG
().
uniform
(
0
,
255
);
int
g
=
theRNG
().
uniform
(
0
,
255
);
int
r
=
theRNG
().
uniform
(
0
,
255
);
colorTab
.
push_back
(
Vec3b
((
uchar
)
b
,
(
uchar
)
g
,
(
uchar
)
r
));
}
...
...
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