@@ -32,14 +32,12 @@ using Buckets = std::vector<Bucket>;
32
32
33
33
/* ! Base class of image processor
34
34
*
35
- * The camera defined here is a specific image input device for reconstruction
36
- * which includes the full acquisition pipeline.
37
- *
35
+ * The image processor includes the full acquisition pipeline.
38
36
* ```
39
- * +-------+ +-----------+ +--------+ +--------+
40
- * | Get | |Undistort | |Compute | |Cast |
41
- * | Image +-->Image +->Mask +--->Ray |
42
- * +-------+ +-----------+ +--------+ +--------+
37
+ * +-------+ +-----------+ +--------+ +--------+ +--------+
38
+ * | Get | |Undistort | |Compute | |Cast | |Genearte|
39
+ * | Image +-->Image +->Mask +--->Ray +--->Buckets |
40
+ * +-------+ +-----------+ +--------+ +--------+ +--------+
43
41
* ```
44
42
*
45
43
* * The image acquisition is implemented as a forward iterator (getNextFrame)
@@ -53,9 +51,26 @@ using Buckets = std::vector<Bucket>;
53
51
* than a threshold, the pixel is considered invalid and would be `0` in the
54
52
* mask.
55
53
*
56
- * * The camera can also cast a ray into the 3D space based on the intrinsic
54
+ * * The camera casts a ray into the 3D space based on the intrinsic
57
55
* parameters.
58
56
*
57
+ * * A buckets of rays is generated to pass to reconstructor.
58
+ *
59
+ * The Buckets is the data structure to hash the ray into projector pixel indices.
60
+ *
61
+ * ```
62
+ * ProjPixels(Buckets) Rays
63
+ * +------------------+ +---+---+---+
64
+ * | 0 +->+R0 |R1 |R2 |
65
+ * +------------------+ +-------+---+
66
+ * | 1 +->+R3 |
67
+ * +------------------+ +----
68
+ *
69
+ * +------------------+ +---+
70
+ * | n +->+Rm |
71
+ * +------------------+ +---+
72
+ *
73
+ * ```
59
74
*/
60
75
class ImageProcessor {
61
76
protected:
@@ -103,7 +118,7 @@ class ImageProcessor {
103
118
y = resY_;
104
119
}
105
120
106
- const unsigned char &getThreashold (const size_t &idx)
121
+ const unsigned char &getThreshold (const size_t &idx)
107
122
{
108
123
return thresholds_[idx];
109
124
}
@@ -134,18 +149,21 @@ class ImageProcessor {
134
149
135
150
// Interfaces
136
151
/* *
137
- *! Get a ray in world space by given pixel
152
+ *! Get a ray in world space by given pixel
153
+ * \param x x coordinate of pixel
154
+ * \param y y coordinate of pixel
155
+ *
156
+ * \return Ray shot from camera to this pixel
157
+ */
158
+ virtual Ray getRay (const size_t &x, const size_t &y) = 0;
159
+
160
+ /* *
161
+ * ! Get a ray by pixel index.
138
162
*
139
- * \param x x coordinate of pixel
140
- * \param y y coordinate of pixel
163
+ * \param idx pixel index
141
164
*
142
- * \return Ray shot from camera to this pixel
165
+ * \returns Ray shot from the pixel.
143
166
*/
144
-
145
- // Reconstruction relies on find intersection of two rays at the same point
146
- // from two cameras. The rays can be get from the following functions.
147
- virtual Ray getRay (const size_t &x, const size_t &y) = 0;
148
-
149
167
virtual Ray getRay (const size_t &idx) = 0;
150
168
151
169
virtual void setResolution (const size_t &x, const size_t &y)
0 commit comments