[TASK] Add debugging output to hough machine.
This commit is contained in:
parent
ad271edbcf
commit
c3d7dfb593
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user