Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv_contrib
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_contrib
Commits
3fbe8bc6
Commit
3fbe8bc6
authored
Oct 07, 2018
by
Lubos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SFM::reconstruct - decompose K matrix correctly
parent
e9966862
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
8 deletions
+14
-8
simple_pipeline.hpp
modules/sfm/include/opencv2/sfm/simple_pipeline.hpp
+8
-4
libmv_capi.h
modules/sfm/src/libmv_capi.h
+2
-2
reconstruct.cpp
modules/sfm/src/reconstruct.cpp
+4
-2
No files found.
modules/sfm/include/opencv2/sfm/simple_pipeline.hpp
View file @
3fbe8bc6
...
...
@@ -55,7 +55,8 @@ enum {
/** @brief Data structure describing the camera model and its parameters.
@param _distortion_model Type of camera model.
@param _focal_length focal length of the camera (in pixels).
@param _focal_length_x focal length of the camera (in pixels).
@param _focal_length_y focal length of the camera (in pixels).
@param _principal_point_x principal point of the camera in the x direction (in pixels).
@param _principal_point_y principal point of the camera in the y direction (in pixels).
@param _polynomial_k1 radial distortion parameter.
...
...
@@ -73,7 +74,8 @@ class CV_EXPORTS_W_SIMPLE libmv_CameraIntrinsicsOptions
public
:
CV_WRAP
libmv_CameraIntrinsicsOptions
(
const
int
_distortion_model
=
0
,
const
double
_focal_length
=
0
,
const
double
_focal_length_x
=
0
,
const
double
_focal_length_y
=
0
,
const
double
_principal_point_x
=
0
,
const
double
_principal_point_y
=
0
,
const
double
_polynomial_k1
=
0
,
...
...
@@ -84,7 +86,8 @@ public:
:
distortion_model
(
_distortion_model
),
image_width
(
2
*
_principal_point_x
),
image_height
(
2
*
_principal_point_y
),
focal_length
(
_focal_length
),
focal_length_x
(
_focal_length_x
),
focal_length_y
(
_focal_length_y
),
principal_point_x
(
_principal_point_x
),
principal_point_y
(
_principal_point_y
),
polynomial_k1
(
_polynomial_k1
),
...
...
@@ -103,7 +106,8 @@ public:
// Common settings of all distortion models.
CV_PROP_RW
int
distortion_model
;
CV_PROP_RW
int
image_width
,
image_height
;
CV_PROP_RW
double
focal_length
;
CV_PROP_RW
double
focal_length_x
;
CV_PROP_RW
double
focal_length_y
;
CV_PROP_RW
double
principal_point_x
,
principal_point_y
;
// Radial distortion model.
...
...
modules/sfm/src/libmv_capi.h
View file @
3fbe8bc6
...
...
@@ -203,8 +203,8 @@ static bool selectTwoKeyframesBasedOnGRICAndVariance(
static
void
libmv_cameraIntrinsicsFillFromOptions
(
const
libmv_CameraIntrinsicsOptions
*
camera_intrinsics_options
,
CameraIntrinsics
*
camera_intrinsics
)
{
camera_intrinsics
->
SetFocalLength
(
camera_intrinsics_options
->
focal_length
,
camera_intrinsics_options
->
focal_length
);
camera_intrinsics
->
SetFocalLength
(
camera_intrinsics_options
->
focal_length
_x
,
camera_intrinsics_options
->
focal_length
_y
);
camera_intrinsics
->
SetPrincipalPoint
(
camera_intrinsics_options
->
principal_point_x
,
...
...
modules/sfm/src/reconstruct.cpp
View file @
3fbe8bc6
...
...
@@ -69,7 +69,8 @@ namespace sfm
// Camera data
Matx33d
Ka
=
K
.
getMat
();
const
double
focal_length
=
Ka
(
0
,
0
);
const
double
focal_length_x
=
Ka
(
0
,
0
);
const
double
focal_length_y
=
Ka
(
1
,
1
);
const
double
principal_x
=
Ka
(
0
,
2
),
principal_y
=
Ka
(
1
,
2
),
k1
=
0
,
k2
=
0
,
k3
=
0
;
// Set reconstruction options
...
...
@@ -77,7 +78,8 @@ namespace sfm
libmv_CameraIntrinsicsOptions
camera_instrinsic_options
=
libmv_CameraIntrinsicsOptions
(
SFM_DISTORTION_MODEL_POLYNOMIAL
,
focal_length
,
principal_x
,
principal_y
,
focal_length_x
,
focal_length_y
,
principal_x
,
principal_y
,
k1
,
k2
,
k3
);
//-- Instantiate reconstruction pipeline
...
...
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