40 auto detection_image = frame->getThresholdedImage();
41 auto tiles =
getTiles(*detection_image);
43 VisitedMap visited(detection_image->getWidth(), detection_image->getHeight());
47 for (
auto& tile : tiles) {
48 for (
int y=0;
y<tile.height;
y++) {
49 for (
int x=0;
x<tile.width;
x++) {
51 if (!visited.
wasVisited(pixel) && detection_image->getValue(pixel) > 0.0) {
52 labelSource(pixel, listener, *detection_image, visited);
75 while (pixels_to_process.
size() > 0) {
76 auto pixel = pixels_to_process.
back();
90 for (
auto& offset : offsets) {
91 auto new_pixel = pixel + offset;
114 (image.
getHeight() + tile_height - 1) / tile_height);
118 for (
auto& coord : curve.
getCurve()) {
119 int x = coord.m_x * tile_width;
120 int y = coord.m_y * tile_height;