Improve comments in RangeImage
Also remove some dead code.
Change-Id: Ia0635e7b47dd52ef72b673ee4272c11a86f9ba2c
diff --git a/aos/vision/blob/range_image.cc b/aos/vision/blob/range_image.cc
index 613d2ca..81a8c48 100644
--- a/aos/vision/blob/range_image.cc
+++ b/aos/vision/blob/range_image.cc
@@ -5,18 +5,10 @@
namespace aos {
namespace vision {
+namespace {
-void DrawRangeImage(const RangeImage &rimg, ImagePtr outbuf, PixelRef color) {
- for (int i = 0; i < (int)rimg.ranges().size(); ++i) {
- int y = rimg.min_y() + i;
- for (ImageRange rng : rimg.ranges()[i]) {
- for (int x = rng.st; x < rng.ed; ++x) {
- outbuf.get_px(x, y) = color;
- }
- }
- }
-}
-
+// Merge sort of multiple range images into a single range image.
+// They must not overlap.
RangeImage MergeRangeImage(const BlobList &blobl) {
if (blobl.size() == 1) return blobl[0];
@@ -48,6 +40,8 @@
}
}
+} // namespace
+
std::string ShortDebugPrint(const BlobList &blobl) {
RangeImage rimg = MergeRangeImage(blobl);
std::string out;