From b150956f4b7e845bd216b07859445f56c39714f2 Mon Sep 17 00:00:00 2001 From: Jan Philipp Timme Date: Wed, 13 Jan 2016 15:09:39 +0100 Subject: [PATCH] [TASK] Finalize stuff. --- hough_machine.cpp | 6 +++--- imageviewer-qt4.cpp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hough_machine.cpp b/hough_machine.cpp index fa161ac..c49b08a 100644 --- a/hough_machine.cpp +++ b/hough_machine.cpp @@ -80,7 +80,7 @@ class HoughMachine { std::cout << "n_ang: " << this->n_ang << ", d_ang: " << this->d_ang << std::endl; std::cout << "n_rad: " << this->n_rad << ", d_rad: " << this->d_rad << ", r_max: " << r_max << std::endl; this->fillHoughAccumulator(); - //this->debugShow(); + this->debugShow(); }; void fillHoughAccumulator() { @@ -146,8 +146,8 @@ class HoughMachine { // sin() cos() // Do matrix multiplication // Turn r into a x/y vector - double vec_x = r * cos(theta) + 0 * -sin(theta); - double vec_y = r * sin(theta) + 0 * cos(theta); + double vec_x = r * cos(theta);// + 0 * -sin(theta); + double vec_y = r * sin(theta);// + 0 * cos(theta); // find point in image double x = vec_x + this->x_center; double y = vec_y + this->y_center; diff --git a/imageviewer-qt4.cpp b/imageviewer-qt4.cpp index 186bb86..d6b3c42 100644 --- a/imageviewer-qt4.cpp +++ b/imageviewer-qt4.cpp @@ -791,8 +791,8 @@ void ImageViewer::runHoughTransformation(void) { hm->reset(); hm->setMatchingThreshold(threshold); //hm->run(256, 256); - hm->run(300, 300); - hm->drawLines(70); + hm->run(original->width()/2, original->height()/2); + hm->drawLines(75); delete hm; updateImageDisplay(); }