Added parameter Homography/rectBorderWidth

git-svn-id: http://find-object.googlecode.com/svn/trunk/find_object@286 620bd6b2-0a58-f614-fd9a-1bd335dccda9
This commit is contained in:
matlabbe 2014-05-25 22:34:10 +00:00
parent 75aef2e726
commit e056dd8e14
3 changed files with 4 additions and 3 deletions

View File

@ -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);

View File

@ -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));
}
}

View File

@ -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(){}