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
c1a862f1
Commit
c1a862f1
authored
Nov 23, 2010
by
Gary Bradski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor docs and help code at top
parent
f87de190
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
15 deletions
+38
-15
3calibration.cpp
samples/cpp/3calibration.cpp
+38
-15
No files found.
samples/cpp/3calibration.cpp
View file @
c1a862f1
/*
* 3calibration.cpp -- Calibrate 3 cameras in a horizontal line together.
*/
#include "opencv2/opencv.hpp"
#include <stdio.h>
#include <string.h>
...
...
@@ -8,6 +12,37 @@ using namespace std;
enum
{
DETECTION
=
0
,
CAPTURING
=
1
,
CALIBRATED
=
2
};
void
test
()
{
printf
(
"This is a camera calibration sample that calibrates 3 horizontally placed cameras together.
\n
"
"Usage: 3calibration
\n
"
" -w <board_width> # the number of inner corners per one of board dimension
\n
"
" -h <board_height> # the number of inner corners per another board dimension
\n
"
" [-s <squareSize>] # square size in some user-defined units (1 by default)
\n
"
" [-o <out_camera_params>] # the output filename for intrinsic [and extrinsic] parameters
\n
"
" [-zt] # assume zero tangential distortion
\n
"
" [-a <aspectRatio>] # fix aspect ratio (fx/fy)
\n
"
" [-p] # fix the principal point at the center
\n
"
" [input_data] # input data - text file with a list of the images of the board
\n
"
"
\n
"
);
}
static
void
calcChessboardCorners
(
Size
boardSize
,
float
squareSize
,
vector
<
Point3f
>&
corners
)
{
corners
.
resize
(
0
);
...
...
@@ -161,21 +196,9 @@ int main( int argc, char** argv )
vector
<
vector
<
Point2f
>
>
imgpt
[
3
];
vector
<
string
>
imageList
;
if
(
argc
<
2
)
{
printf
(
"This is a camera calibration sample.
\n
"
"Usage: calibration
\n
"
" -w <board_width> # the number of inner corners per one of board dimension
\n
"
" -h <board_height> # the number of inner corners per another board dimension
\n
"
" [-s <squareSize>] # square size in some user-defined units (1 by default)
\n
"
" [-o <out_camera_params>] # the output filename for intrinsic [and extrinsic] parameters
\n
"
" [-zt] # assume zero tangential distortion
\n
"
" [-a <aspectRatio>] # fix aspect ratio (fx/fy)
\n
"
" [-p] # fix the principal point at the center
\n
"
" [input_data] # input data - text file with a list of the images of the board
\n
"
"
\n
"
);
return
0
;
}
if
(
argc
<
2
)
test
();
for
(
i
=
1
;
i
<
argc
;
i
++
)
{
...
...
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