41 auto detection_image = frame->getThresholdedImage();
42 auto tiles =
getTiles(*detection_image);
44 VisitedMap visited(detection_image->getWidth(), detection_image->getHeight());
46 for (
auto& tile : tiles) {
47 auto chunk = detection_image->getChunk(tile.offset.m_x, tile.offset.m_y, tile.width, tile.height);
48 for (
int y=0;
y<tile.height;
y++) {
49 for (
int x=0;
x<tile.width;
x++) {
51 if (!visited.
wasVisited(pixel) && chunk->getValue(
x,
y) > 0.0) {
52 labelSource(pixel, listener, *detection_image, visited);
64 DetectionAccessor detectionAccessor(detection_image);
78 while (pixels_to_process.
size() > 0) {
79 auto pixel = pixels_to_process.
back();
93 for (
auto& offset : offsets) {
94 auto new_pixel = pixel + offset;
96 if (!visited_map.
wasVisited(new_pixel) && detectionAccessor.getValue(new_pixel) > 0.0) {
117 (image.
getHeight() + tile_height - 1) / tile_height);
121 for (
auto& coord : curve.
getCurve()) {
122 int x = coord.m_x * tile_width;
123 int y = coord.m_y * tile_height;
std::shared_ptr< DependentParameter< std::shared_ptr< EngineParameter > > > x
std::shared_ptr< DependentParameter< std::shared_ptr< EngineParameter > > > y
T emplace_back(T... args)