From 704cdef61f7fe99897c6c68d0a101074fb617dad Mon Sep 17 00:00:00 2001 From: qbigot <quentin.bigot@insa-rennes.fr> Date: Tue, 18 Jul 2017 15:35:18 +0200 Subject: [PATCH] improve hough display --- app/Operations/HoughOp.cpp | 1 + app/Operations/HoughOp.h | 2 ++ core/Operation.cpp | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Operations/HoughOp.cpp b/app/Operations/HoughOp.cpp index d0eeafa..04af234 100644 --- a/app/Operations/HoughOp.cpp +++ b/app/Operations/HoughOp.cpp @@ -49,6 +49,7 @@ void HoughOp::operator()(const imagein::Image* img, const std::map<const imagein } else { angleStep = dialog->getAngleStep(); + distanceStep = dialog->getDistanceStep(); resImg = Transforms::hough2(img, dialog->getAngleStep(), dialog->getDistanceStep()); } outDoubleImage(resImg, qApp->translate("Hough", "Hough transform").toStdString(), true, true); diff --git a/app/Operations/HoughOp.h b/app/Operations/HoughOp.h index e8af83e..06190cb 100644 --- a/app/Operations/HoughOp.h +++ b/app/Operations/HoughOp.h @@ -32,10 +32,12 @@ public: bool needCurrentImg() const; double getAngleStep(){return angleStep;} + double getDistanceStep(){return distanceStep;} private: double angleStep; + double distanceStep; }; #endif // HOUGHOP_H diff --git a/core/Operation.cpp b/core/Operation.cpp index 2a6a309..c6b425d 100644 --- a/core/Operation.cpp +++ b/core/Operation.cpp @@ -73,7 +73,7 @@ void GenericOperation::outDoubleImage(imagein::ImageDouble* img, string title, b DoubleImageWindow* wnd = new DoubleImageWindow(img, QString(), norm, log, logScale, abs); if(HoughOp* v = dynamic_cast<HoughOp*>(this)) { // teste si l'operation effectuee est une transformee de Hough - wnd->isHough(v->getAngleStep()); + wnd->isHough(v->getAngleStep(), v->getDistanceStep()); //isHough=true ce qui change les coordonnées des pixels de l'image pour correspondre au domaine de Hough } this->outImgWnd(wnd, title); -- GitLab