[TASK] Finalize stuff.

This commit is contained in:
Jan Philipp Timme 2016-01-13 15:09:39 +01:00
parent 3619b9796b
commit b150956f4b
2 changed files with 5 additions and 5 deletions

View File

@ -80,7 +80,7 @@ class HoughMachine {
std::cout << "n_ang: " << this->n_ang << ", d_ang: " << this->d_ang << 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; std::cout << "n_rad: " << this->n_rad << ", d_rad: " << this->d_rad << ", r_max: " << r_max << std::endl;
this->fillHoughAccumulator(); this->fillHoughAccumulator();
//this->debugShow(); this->debugShow();
}; };
void fillHoughAccumulator() { void fillHoughAccumulator() {
@ -146,8 +146,8 @@ class HoughMachine {
// sin() cos() // sin() cos()
// Do matrix multiplication // Do matrix multiplication
// Turn r into a x/y vector // Turn r into a x/y vector
double vec_x = r * cos(theta) + 0 * -sin(theta); double vec_x = r * cos(theta);// + 0 * -sin(theta);
double vec_y = r * sin(theta) + 0 * cos(theta); double vec_y = r * sin(theta);// + 0 * cos(theta);
// find point in image // find point in image
double x = vec_x + this->x_center; double x = vec_x + this->x_center;
double y = vec_y + this->y_center; double y = vec_y + this->y_center;

View File

@ -791,8 +791,8 @@ void ImageViewer::runHoughTransformation(void) {
hm->reset(); hm->reset();
hm->setMatchingThreshold(threshold); hm->setMatchingThreshold(threshold);
//hm->run(256, 256); //hm->run(256, 256);
hm->run(300, 300); hm->run(original->width()/2, original->height()/2);
hm->drawLines(70); hm->drawLines(75);
delete hm; delete hm;
updateImageDisplay(); updateImageDisplay();
} }