From 793b8b99eb80ff10162b4a129476bbe098fea8b6 Mon Sep 17 00:00:00 2001 From: Lee Hicks Date: Thu, 4 Jun 2009 13:20:50 -0500 Subject: [PATCH] Fixed Threshold Button Not Applying Threshold --- src/camerathread.cpp | 1 + src/setupdialog.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/src/camerathread.cpp b/src/camerathread.cpp index f7b2ec7..fc07711 100644 --- a/src/camerathread.cpp +++ b/src/camerathread.cpp @@ -297,6 +297,7 @@ CameraThread::TargetPoint CameraThread::applyFilters(IplImage *img) { if(applyThreshold) { + //are we going to use AdaptiveThreshold? cvThreshold(img, bufferImg, (double)thresh/100 * 255, 255, CV_THRESH_BINARY); } else diff --git a/src/setupdialog.cpp b/src/setupdialog.cpp index 30f79b9..5db6dff 100644 --- a/src/setupdialog.cpp +++ b/src/setupdialog.cpp @@ -43,6 +43,7 @@ SetupDialog::SetupDialog(CameraThread *camthread) FPSNum = new QLabel(this); toggleThreshold = new QPushButton("Threshold: "); toggleThreshold->setCheckable(true); + connect(toggleThreshold,SIGNAL(toggled(bool)),camThread,SLOT(setApplyThreshold(bool))); threshold = new QSlider(Qt::Horizontal); connect(threshold, SIGNAL(valueChanged(int)), this, SLOT(updateThreshold(int))); -- 2.11.4.GIT