-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathimage_preprocessing.orogen
More file actions
131 lines (101 loc) · 4.28 KB
/
image_preprocessing.orogen
File metadata and controls
131 lines (101 loc) · 4.28 KB
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
name "image_preprocessing"
version "0.1"
using_library "base-types"
import_types_from "base"
using_task_library "transformer"
using_library "frame_helper"
import_types_from "frame_helper/Calibration.h"
import_types_from "frame_helper/FrameHelperTypes.h"
typekit.export_types "frame_helper/CameraCalibration"
task_context "BaseTask" do
property("calibrate", "bool", false)
.doc("Whether the image should be undistorted. " \
"Subclasses should have a property that provide the calibration parameter ")
property("frame_mode", "/base/samples/frame/frame_mode_t", :MODE_BAYER)
.doc("The mode of the output image")
property("resize_algorithm", "/frame_helper/ResizeAlgorithm", :BAYER_RESIZE)
property("scale_x", "double", 0.5)
.doc("Scale factor in the X (horizontal) direction")
property("scale_y", "double", 0.5)
.doc("Scale factor in the Y (vertical) direction")
property("offset_x", "int", 0)
.doc("the offset to be used on the left margin " \
"in case of resizing widescreen images")
property("offset_y", "int", 0)
.doc("the offset to be used on the top margin " \
"in case of resizing widescreen images")
property("opencv_num_threads", "int", -1)
.doc("the maximum number of threads allowed")
end
task_context "DepthImage2Pointcloud" do
input_port("color_frame", ro_ptr("/base/samples/frame/Frame"))
.doc("Color Frame for DepthImage if available")
input_port "frame", ro_ptr("/base/samples/DistanceImage")
output_port "pointcloud", "/base/samples/Pointcloud"
port_driven
stream_aligner do
max_latency 0.1
align_port "color_frame", 0.3
align_port "frame", 0.3
end
transformer do
transform "input", "pc"
max_latency 60
end
end
task_context "MonoTask" do
subclasses "BaseTask"
property("convert_to_grayscale", "bool", false)
.doc("Convert the image to grayscale regardless of the output mode. " \
"Note that this is a no-op if set and frame_mode is MODE_GRAYSCALE")
input_port "frame", ro_ptr("/base/samples/frame/Frame")
output_port "oframe", ro_ptr("/base/samples/frame/Frame")
property("calibration", "frame_helper/CameraCalibration")
port_driven "frame"
end
task_context "HSVSegmentationAndBlur" do
input_port "frame", ro_ptr("/base/samples/frame/Frame")
output_port "oframe", ro_ptr("/base/samples/frame/Frame")
output_port "binary_result", ro_ptr("/base/samples/frame/Frame")
output_port "hDebug", ro_ptr("/base/samples/frame/Frame")
output_port "hDebugGray", ro_ptr("/base/samples/frame/Frame")
output_port "vDebug", ro_ptr("/base/samples/frame/Frame")
output_port "vDebugGray", ro_ptr("/base/samples/frame/Frame")
output_port "sDebug", ro_ptr("/base/samples/frame/Frame")
output_port "sDebugGray", ro_ptr("/base/samples/frame/Frame")
output_port "hsv_v_frame", ro_ptr("/base/samples/frame/Frame")
property("hMin", "int", 0)
property("hMax", "int", 255)
property("vMin", "int", 0)
property("sMax", "int", 255)
property("sMin", "int", 0)
property("vMax", "int", 255)
property("blur", "int", 0)
property("unsetValue", "int", 0)
property("invert", "bool", false)
property("minVadapt", "int", 110)
.doc("minumum adaptation for V value")
property("maxVadapt", "int", 140)
.doc("minumum adaptation for V value")
property("target_pixel_s", "int", 100)
property("steps_per_frame", "int", 1)
port_driven "frame"
end
task_context "StereoTask" do
subclasses "BaseTask"
input_port "frame_left", ro_ptr("/base/samples/frame/Frame")
input_port "frame_right", ro_ptr("/base/samples/frame/Frame")
output_port "oframe_pair", ro_ptr("/base/samples/frame/FramePair")
property("calibration", "/frame_helper/StereoCalibration")
port_driven "frame_left", "frame_right"
end
# Declares a deployment, i.e. an actual executable that contains various tasks.
deployment "image_preprocessing_test" do
# This is a test deployment that should not be installed
do_not_install
task("mono_image_preprocessing", "MonoTask")
task("stereo_image_preprocessing", "StereoTask")
end
deployment "stereo_image_preprocessing" do
task("stereo_image_preprocessing", "StereoTask")
end