use of boofcv.factory.feature.detect.line.ConfigHoughFoot in project BoofCV by lessthanoptimal.
the class VisualizeHoughFoot method process.
public void process(BufferedImage image) {
I input = GeneralizedImageOps.createSingleBand(imageType, image.getWidth(), image.getHeight());
I blur = GeneralizedImageOps.createSingleBand(imageType, image.getWidth(), image.getHeight());
ConvertBufferedImage.convertFromSingle(image, input, imageType);
GBlurImageOps.gaussian(input, blur, -1, 2, null);
DetectLineHoughFoot<I, D> alg = FactoryDetectLineAlgs.houghFoot(new ConfigHoughFoot(6, 12, 5, 25, 10), imageType, derivType);
ImageLinePanel gui = new ImageLinePanel();
gui.setBackground(image);
gui.setLines(alg.detect(blur));
gui.setPreferredSize(new Dimension(image.getWidth(), image.getHeight()));
BufferedImage renderedTran = VisualizeImageData.grayMagnitude(alg.getTransform().getTransform(), null, -1);
BufferedImage renderedBinary = VisualizeBinaryData.renderBinary(alg.getBinary(), false, null);
ShowImages.showWindow(renderedBinary, "Detected Edges");
ShowImages.showWindow(renderedTran, "Parameter Space");
ShowImages.showWindow(gui, "Detected Lines");
}
Aggregations