From c3d7dfb593de63b33057ffbaf2f27402074b74e1 Mon Sep 17 00:00:00 2001 From: Jan Philipp Timme Date: Thu, 7 Jan 2016 18:38:36 +0100 Subject: [PATCH] [TASK] Add debugging output to hough machine. --- hough_machine.cpp | 5 ++++- imageviewer-qt4.cpp | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/hough_machine.cpp b/hough_machine.cpp index a3ec510..aed2d7d 100644 --- a/hough_machine.cpp +++ b/hough_machine.cpp @@ -60,6 +60,9 @@ class HoughMachine { this->d_rad = (2*r_max)/this->n_rad; this->hough_arr = (int*) malloc(sizeof(int) * this->n_ang * this->n_rad); for(int i=0; i< this->n_ang*this->n_rad; i++) this->hough_arr[i] = 0; + std::cout << "Hough params: x_center: " << this->x_center << ", y_center: " << this->y_center << std::endl; + 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(); }; @@ -70,7 +73,7 @@ class HoughMachine { QColor pixel = QColor::fromRgb(this->original->getPixel(u, v, LazyImage::DEFAULT)); int h, s, l; pixel.getHsl(&h, &s, &l); - if(l < 15) { + if(l < 15) { // TODO: parameterize this this->doPixel(u, v); } } diff --git a/imageviewer-qt4.cpp b/imageviewer-qt4.cpp index b2f5955..e3081f1 100644 --- a/imageviewer-qt4.cpp +++ b/imageviewer-qt4.cpp @@ -774,7 +774,7 @@ void ImageViewer::runHoughTransformation(void) { logFile << "Let's run a hough transformation!" << std::endl; renewLogging(); HoughMachine* hm = new HoughMachine(original, working_copy); - hm->run(250, 250); + hm->run(256, 256); delete hm; updateImageDisplay(); }