-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcamera_calib.orogen
109 lines (84 loc) · 4.63 KB
/
camera_calib.orogen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
name "camera_calib"
# Optionally declare the version number
# version "0.1"
# If new data types need to be defined, they have to be put in a separate C++
# header, and this header will be loaded here
# Finally, it is pretty common that headers are directly loaded from an external
# library. In this case, the library must be first used (the name is the
# library's pkg-config name) and then the header can be used. Following Rock
# conventions, a common use-case would be:
#
using_library "opencv"
using_library "frame_helper"
# If this project uses data types that are defined in other oroGen projects,
# these projects should be imported there as well.
import_types_from "base"
# Declare a new task context (i.e., a component)
#
# The corresponding C++ class can be edited in tasks/Task.hpp and
# tasks/Task.cpp, and will be put in the camera_calib namespace.
task_context "Task" do
# This is the default from now on, and should not be removed. Rock will
# transition to a setup where all components use a configuration step.
needs_configuration
#*********************************
#**** Calibration Properties *****
#*********************************
property("BoardSize_Width","int", 9).
doc 'Number of inner corners per a item row and column. (square, circle)'
property("BoardSize_Height","int", 6).
doc 'Number of inner corners per a item row and column. (square, circle)'
property("Square_Size","int", 36).
doc ' The size of a square in some user defined metric system (pixel, millimeter).'
property("Calibrate_Pattern","string", "CHESSBOARD").
doc 'The type of input used for camera calibration.'+
'One of: CHESSBOARD CIRCLES_GRID ASYMMETRIC_CIRCLES_GRID.'
property("Input_FlipAroundHorizontalAxis","bool", false).
doc 'If true (non-zero) we flip the input images around the horizontal axis.'
property("Input_Delay","int", 100).
doc ' Time (in milliseconds) delay between frames'
property("Calibrate_FixAspectRatio","double", 1.0).
doc 'Consider only fy as a free parameter, the ratio fx/fy stays the same as in the input cameraMatrix.'+
'Use or not setting. 0 - False Non-Zero - True'
property("Calibrate_AssumeZeroTangentialDistortion","bool", true).
doc 'If true (non-zero) tangential distortion coefficients are set to zeros and stay zero'
property("Calibrate_FixPrincipalPointAtTheCenter","bool", true).
doc 'If true (non-zero) the principal point is not changed during the global optimization.'
property("Write_outputFileName","string", "out_camera_data.yml").
doc 'The type of input used for camera calibration.'
property("Write_DetectedFeaturePoints","bool", true).
doc 'If true (non-zero) we write to the output file the feature points.'
property("Write_extrinsicParameters","bool", true).
doc 'If true (non-zero) we write to the output file the extrinsic camera parameters.'
property("Show_UndistortedImage","bool", true).
doc 'If true (non-zero) we show after calibration the undistorted images.'
# An input port, i.e. an object from which the component gets data from
# other components' outputs
#
# Data can be retrieved using _input.read(value), which returns true if data
# was available, and false otherwise. _input.connected() returns if this
# input is connected to an output or not.
#******************************
#******* Input ports *********
#******************************
input_port("left_frame", ro_ptr('base::samples::frame::Frame')).
doc 'First camera frame (left in a stereo configuration).'
input_port("right_frame", ro_ptr('base::samples::frame::Frame')).
doc 'Second camera frame (right in a stereo configuration).'
# An output port, i.e. an object to which the component pushes data so that
# it is transmitted to other components' inputs
#
# Data can be written using _output.write(value). _output.connected() returns
# if this output is connected to an input or not.
output_port("left_frame_out", ro_ptr('base::samples::frame::Frame')).
doc 'First camera frame with pattern detected.'
output_port("right_frame_out", ro_ptr('base::samples::frame::Frame')).
doc 'Second camera frame with pattern detected.'
output_port("rectify_frame_out", ro_ptr('base::samples::frame::Frame')).
doc 'Rectified Frame.'
# If you want that component's updateHook() to be executed when the "input"
# port gets data, uncomment this and comment the 'periodic' line
# port_driven "input"
# By default, the task will be periodic with a period of 0.1
port_driven
end