-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathprojection.orogen
184 lines (128 loc) · 4.97 KB
/
projection.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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
name "projection"
import_types_from "projectionTypes.hpp"
using_library "frame_helper"
using_library "projection"
import_types_from "base"
import_types_from "frame_helper/Calibration.h"
import_types_from "projection/OmnidirectionalConfig.hpp"
# Planar reprojection task for omnicam input images
task_context "OmnicamPlanar" do
needs_configuration
property("omnicam_calibration", "/projection/omnicam/Model").
doc "calibration parameters for the omnidirection camera model"
property("width", "/int", 640).
doc "width of the virtual view"
property("height", "/int", 480).
doc "height of the virtual view"
input_port("view_config", "/projection/omnicam/PlanarViewConfiguration").
doc "Parameters of the planar view"
input_port("omnicam", ro_ptr("/base/samples/frame/Frame")).
doc 'camera image that is projected into the input pointcloud'
output_port("planar_view", ro_ptr("/base/samples/frame/Frame")).
doc 'resulting planar view image'
port_driven "omnicam", "view_config"
end
task_context "OmnicamEquirectangular" do
needs_configuration
property("omnicam_calibration", "/projection/omnicam/Model").
doc "calibration parameters for the omnidirection camera model"
property("width", "/int", 640).
doc "width of the virtual view"
input_port("omnicam", ro_ptr("/base/samples/frame/Frame")).
doc 'camera image that is projected into the input pointcloud'
output_port("view", ro_ptr("/base/samples/frame/Frame")).
doc 'resulting planar view image'
port_driven "omnicam"
end
task_context "Triangulation" do
needs_configuration
property("extrinsic_calibration", "/frame_helper/ExtrinsicCalibration").
doc "extrinsic calibration between cam1 and cam2"
input_port("cam1_point", "/base/Vector2d").
doc "projected point in camera1"
input_port("cam2_point", "/base/Vector2d").
doc "projected point in camera2"
output_port("scene_point", "/base/Vector3d").
doc "resulting scene point"
output_port("error", "/double").
doc "ray alignment error for the scene point"
transformer do
max_latency( 0.2 )
transformation("base", "cam1")
end
port_driven
end
task_context "ColorizePointcloud" do
needs_configuration
property("output_ply", "/std/string", "").
doc "resulting ply file"
property("pc2Cam", "base::Matrix4d")
doc "Matrix, to convert the pointcloud into the camera view"
property("doUndistortion", "bool", true)
doc "Matrix, to convert the pointcloud into the camera view"
input_port("points", "/base/samples/Pointcloud" ).
doc 'input pointcloud'
input_port("camera", ro_ptr("/base/samples/frame/Frame")).
doc 'camera image that is projected into the input pointcloud'
output_port("colored_points", "/base/samples/Pointcloud").
doc 'output pointcloud'
stream_aligner do
max_latency( 0.2 )
align_port("camera", 0)
align_port("points", 0)
end
port_driven
end
task_context "ColorizePointcloudMultiCam" do
needs_configuration
property("pc2Cam1", "base::Matrix4d")
doc "Matrix, to convert the pointcloud into the camera view"
property("pc2Cam2", "base::Matrix4d")
doc "Matrix, to convert the pointcloud into the camera view"
property("doUndistortion", "bool", true)
doc "Matrix, to convert the pointcloud into the camera view"
input_port("points", "/base/samples/Pointcloud" ).
doc 'input pointcloud'
input_port("camera1", ro_ptr("/base/samples/frame/Frame")).
doc 'camera image that is projected into the input pointcloud'
input_port("camera2", ro_ptr("/base/samples/frame/Frame")).
doc 'camera image that is projected into the input pointcloud'
output_port("colored_points", "/base/samples/Pointcloud").
doc 'output pointcloud'
stream_aligner do
max_latency( 0.2 )
align_port("camera1", 0)
align_port("camera2", 0)
align_port("points", 0)
end
port_driven
end
task_context "VirtualView" do
needs_configuration
# width of the virtual view
property "width", "/int", 512
# height of the virtual view
property "height", "/int", 512
# focal length
property "focal_length", "/int", 250
# Dynamic input port declaration for the images
input_port "cam1", ro_ptr("/base/samples/frame/Frame")
input_port "cam2", ro_ptr("/base/samples/frame/Frame")
input_port "cam3", ro_ptr("/base/samples/frame/Frame")
input_port "cam4", ro_ptr("/base/samples/frame/Frame")
# the image for the virtual view
output_port "virtual_cam", ro_ptr("/base/samples/frame/Frame")
transformer do
max_latency( 0.2 )
transformation("virtual_cam", "plane")
transformation("cam1", "plane")
transformation("cam2", "plane")
transformation("cam3", "plane")
transformation("cam4", "plane")
align_port("cam1")
align_port("cam2")
align_port("cam3")
align_port("cam4")
end
periodic 0.1
end