diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index c94acdd6..efc783fa 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -1610,7 +1610,7 @@ void MainWindow::update(const cv::Mat & image) label->setText(QString("%1 in %2 out").arg(threads[j]->getInliers()).arg(threads[j]->getOutliers())); } QPen rectPen(color); - rectPen.setWidth(4); + rectPen.setWidth(Settings::getHomography_rectBorderWidth()); RectItem * rectItemScene = new RectItem(objects_.at(index)->id(), rect); connect(rectItemScene, SIGNAL(hovered(int)), this, SLOT(rectHovered(int))); rectItemScene->setPen(rectPen); diff --git a/src/RectItem.cpp b/src/RectItem.cpp index 524e676c..5638f0ff 100644 --- a/src/RectItem.cpp +++ b/src/RectItem.cpp @@ -54,7 +54,7 @@ void RectItem::showDescription() QPen pen = this->pen(); - this->setPen(QPen(pen.color(), pen.width()+2)); + this->setPen(QPen(pen.color(), pen.width()*2)); placeHolder_->setZValue(this->zValue()+1); placeHolder_->setPos(0,0); placeHolder_->setVisible(true); @@ -68,7 +68,7 @@ void RectItem::hideDescription() if(placeHolder_ && placeHolder_->isVisible()) { placeHolder_->setVisible(false); - this->setPen(QPen(pen().color(), pen().width()-2)); + this->setPen(QPen(pen().color(), pen().width()/2)); } } diff --git a/src/Settings.h b/src/Settings.h index 43be123e..8e733be7 100644 --- a/src/Settings.h +++ b/src/Settings.h @@ -190,6 +190,7 @@ class Settings PARAMETER(Homography, ransacReprojThr, double, 1.0, "Maximum allowed reprojection error to treat a point pair as an inlier (used in the RANSAC method only). It usually makes sense to set this parameter somewhere in the range of 1 to 10."); PARAMETER(Homography, minimumInliers, int, 10, "Minimum inliers to accept the homography. Value must be >= 4."); PARAMETER(Homography, ignoreWhenAllInliers, bool, false, "Ignore homography when all features are inliers (sometimes when the homography doesn't converge, it returns the best homography with all features as inliers)."); + PARAMETER(Homography, rectBorderWidth, int, 4, "Homography rectangle border width."); public: virtual ~Settings(){}