A template that bootstraps a full Randomized Hough transform implementation. The basic primitives required are as follows.
Randomized Hough Transform for lines
// Load an image from filesystem. Image image = imread("/path/to/image.png"); // Calculate edges by use of canny algorithm auto edges = image .sliced .rgb2gray .as!float .slice .conv(gaussian!float(1.0f, 3, 3)) .canny!ubyte(100); // Setup RHT line extraction context auto lines = RhtLines().epouchs(50).iterations(250).minCurve(25); // Lazily iterate and detect lines in pre-processed image foreach(line; lines(edges)) { // do stuff with lines.. }
For more elaborated module description visit the RHT example.
Copyright © 2016, Dmitry Olshansky
$(LINK3 http://www.boost.org/LICENSE_1_0.txt, Boost Software License - Version 1.0).
Module introduces Randomized Hough Transform implementation.