[TASK] Finalize stuff.
This commit is contained in:
parent
3619b9796b
commit
b150956f4b
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue