Skip to content
Snippets Groups Projects
Commit c2d4f01e authored by calrama's avatar calrama
Browse files

Cleanup

parent f5e11f9a
Branches
No related tags found
No related merge requests found
Pipeline #42510 passed
...@@ -56,9 +56,7 @@ void Config::load(QString dir, QString file) ...@@ -56,9 +56,7 @@ void Config::load(QString dir, QString file)
config->SizeDilate = tree.get<int>(globalPrefix+"SizeDilate",config->SizeDilate); config->SizeDilate = tree.get<int>(globalPrefix+"SizeDilate",config->SizeDilate);
config->MinBlobSize = tree.get<int>(globalPrefix+"MinBlobSize",config->MinBlobSize); config->MinBlobSize = tree.get<int>(globalPrefix+"MinBlobSize",config->MinBlobSize);
config->MaxBlobSize = tree.get<int>(globalPrefix+"MaxBlobSize",config->MaxBlobSize); config->MaxBlobSize = tree.get<int>(globalPrefix+"MaxBlobSize",config->MaxBlobSize);
config->Mog2History = tree.get<int>(globalPrefix+"Mog2History",config->Mog2History); config->BackgroundRatio = tree.get<double>(globalPrefix+"BackgroundRatio",config->BackgroundRatio);
config->Mog2VarThresh = tree.get<int>(globalPrefix+"Mog2VarThresh",config->Mog2VarThresh);
config->Mog2BackgroundRatio = tree.get<double>(globalPrefix+"Mog2BackgroundRatio",config->Mog2BackgroundRatio);
config->DoNetwork = tree.get<int>(globalPrefix+"DoNetwork",config->DoNetwork); config->DoNetwork = tree.get<int>(globalPrefix+"DoNetwork",config->DoNetwork);
config->NetworkPort = tree.get<int>(globalPrefix+"NetworkPort",config->NetworkPort); config->NetworkPort = tree.get<int>(globalPrefix+"NetworkPort",config->NetworkPort);
config->DoBackground = tree.get<int>(globalPrefix+"DoBackground",config->DoBackground); config->DoBackground = tree.get<int>(globalPrefix+"DoBackground",config->DoBackground);
...@@ -84,9 +82,7 @@ void Config::save(QString dir, QString file) ...@@ -84,9 +82,7 @@ void Config::save(QString dir, QString file)
tree.put(globalPrefix+"SizeDilate", config->SizeDilate); tree.put(globalPrefix+"SizeDilate", config->SizeDilate);
tree.put(globalPrefix+"MinBlobSize", config->MinBlobSize); tree.put(globalPrefix+"MinBlobSize", config->MinBlobSize);
tree.put(globalPrefix+"MaxBlobSize", config->MaxBlobSize); tree.put(globalPrefix+"MaxBlobSize", config->MaxBlobSize);
tree.put(globalPrefix+"Mog2History", config->Mog2History); tree.put(globalPrefix+"BackgroundRatio", config->BackgroundRatio);
tree.put(globalPrefix+"Mog2VarThresh", config->Mog2VarThresh);
tree.put(globalPrefix+"Mog2BackgroundRatio", config->Mog2BackgroundRatio);
tree.put(globalPrefix+"DoNetwork", config->DoNetwork); tree.put(globalPrefix+"DoNetwork", config->DoNetwork);
tree.put(globalPrefix+"NetworkPort", config->NetworkPort); tree.put(globalPrefix+"NetworkPort", config->NetworkPort);
tree.put(globalPrefix+"DoBackground", config->DoBackground); tree.put(globalPrefix+"DoBackground", config->DoBackground);
......
...@@ -13,9 +13,7 @@ public: ...@@ -13,9 +13,7 @@ public:
int MinBlobSize = 40; int MinBlobSize = 40;
int MaxBlobSize = 999999; int MaxBlobSize = 999999;
int Mog2History = 200; double BackgroundRatio = 0.05;
int Mog2VarThresh = 64;
double Mog2BackgroundRatio = 0.05;
int DoNetwork = false; int DoNetwork = false;
int NetworkPort = 54444; int NetworkPort = 54444;
......
...@@ -69,35 +69,33 @@ void BioTrackerTrackingAlgorithm::sendSelectedImage(std::map<std::string, std::s ...@@ -69,35 +69,33 @@ void BioTrackerTrackingAlgorithm::sendSelectedImage(std::map<std::string, std::s
//Send forth whatever the user selected //Send forth whatever the user selected
switch (_TrackingParameter->getSendImage()) { switch (_TrackingParameter->getSendImage()) {
case 0: //Send none case 0: //Send none
//sendImage = images.find(std::string("Original"))->second;
//Q_EMIT emitCvMatA(sendImage, QString("Original"));
Q_EMIT emitChangeDisplayImage("Original"); Q_EMIT emitChangeDisplayImage("Original");
break; break;
case 1: case 1:
sendImage = images->find(std::string("Background"))->second;
Q_EMIT emitCvMatA(sendImage, QString("Background"));
Q_EMIT emitChangeDisplayImage(QString("Background"));
break;
case 2:
sendImage = images->find(std::string("Foreground"))->second;
Q_EMIT emitCvMatA(sendImage, QString("Foreground"));
Q_EMIT emitChangeDisplayImage(QString("Foreground"));
break;
case 3:
sendImage = images->find(std::string("Binarized"))->second; sendImage = images->find(std::string("Binarized"))->second;
Q_EMIT emitCvMatA(sendImage, QString("Binarized")); Q_EMIT emitCvMatA(sendImage, QString("Binarized"));
Q_EMIT emitChangeDisplayImage(QString("Binarized")); Q_EMIT emitChangeDisplayImage(QString("Binarized"));
break; break;
case 2: case 4:
sendImage = images->find(std::string("Eroded"))->second; sendImage = images->find(std::string("Eroded"))->second;
Q_EMIT emitCvMatA(sendImage, QString("Eroded")); Q_EMIT emitCvMatA(sendImage, QString("Eroded"));
Q_EMIT emitChangeDisplayImage(QString("Eroded")); Q_EMIT emitChangeDisplayImage(QString("Eroded"));
break; break;
case 3: case 5:
sendImage = images->find(std::string("Dilated"))->second; sendImage = images->find(std::string("Dilated"))->second;
Q_EMIT emitCvMatA(sendImage, QString("Dilated")); Q_EMIT emitCvMatA(sendImage, QString("Dilated"));
Q_EMIT emitChangeDisplayImage(QString("Dilated")); Q_EMIT emitChangeDisplayImage(QString("Dilated"));
break; break;
case 4:
sendImage = images->find(std::string("Difference"))->second;
Q_EMIT emitCvMatA(sendImage, QString("Difference"));
Q_EMIT emitChangeDisplayImage(QString("Difference"));
break;
case 5:
sendImage = images->find(std::string("Background"))->second;
Q_EMIT emitCvMatA(sendImage, QString("Background"));
Q_EMIT emitChangeDisplayImage(QString("Background"));
break;
} }
} }
...@@ -134,17 +132,8 @@ std::vector<BlobPose> BioTrackerTrackingAlgorithm::getContourCentroids(cv::Mat& ...@@ -134,17 +132,8 @@ std::vector<BlobPose> BioTrackerTrackingAlgorithm::getContourCentroids(cv::Mat&
return centroids; return centroids;
} }
#define EEE duration = std::chrono::duration_cast< std::chrono::milliseconds> (std::chrono::steady_clock::now() - startt); block++; std::cout << "Block " << block << ": " << duration.count() << std::endl;
#define SSS startt = std::chrono::steady_clock::now();
void BioTrackerTrackingAlgorithm::doTracking(std::shared_ptr<cv::Mat> p_image, uint framenumber) void BioTrackerTrackingAlgorithm::doTracking(std::shared_ptr<cv::Mat> p_image, uint framenumber)
{ {
//Q_EMIT emitCvMatA(p_image, QString("Original"));
//Q_EMIT emitChangeDisplayImage("Original");
//Q_EMIT emitTrackingDone(framenumber);
//return;
int block = 0;
_ipp.m_TrackingParameter = _TrackingParameter; _ipp.m_TrackingParameter = _TrackingParameter;
_lastImage = p_image; _lastImage = p_image;
_lastFramenumber = framenumber; _lastFramenumber = framenumber;
...@@ -172,7 +161,6 @@ void BioTrackerTrackingAlgorithm::doTracking(std::shared_ptr<cv::Mat> p_image, u ...@@ -172,7 +161,6 @@ void BioTrackerTrackingAlgorithm::doTracking(std::shared_ptr<cv::Mat> p_image, u
//The user changed the # of fish. Reset the history and start over! //The user changed the # of fish. Reset the history and start over!
if (_noFish != _TrackedTrajectoryMajor->validCount()) { if (_noFish != _TrackedTrajectoryMajor->validCount()) {
_noFish = _TrackedTrajectoryMajor->validCount(); _noFish = _TrackedTrajectoryMajor->validCount();
//resetFishHistory(_noFish);
_nn2d = std::make_shared<NN2dMapper>(_TrackedTrajectoryMajor); _nn2d = std::make_shared<NN2dMapper>(_TrackedTrajectoryMajor);
} }
......
...@@ -56,9 +56,6 @@ std::vector<BlobPose> getContourCentroids(cv::Mat& image, int minSize); ...@@ -56,9 +56,6 @@ std::vector<BlobPose> getContourCentroids(cv::Mat& image, int minSize);
BlobsDetector _bd; BlobsDetector _bd;
std::shared_ptr<NN2dMapper> _nn2d; std::shared_ptr<NN2dMapper> _nn2d;
// background subtraction
cv::Ptr<cv::BackgroundSubtractorMOG2> _pMOG;
int _noFish; int _noFish;
//std::ofstream _ofs; //std::ofstream _ofs;
......
...@@ -14,15 +14,11 @@ TrackerParameter::TrackerParameter(QObject *parent) : ...@@ -14,15 +14,11 @@ TrackerParameter::TrackerParameter(QObject *parent) :
_MinBlobSize = _cfg->MinBlobSize; _MinBlobSize = _cfg->MinBlobSize;
_MaxBlobSize = _cfg->MaxBlobSize; _MaxBlobSize = _cfg->MaxBlobSize;
_mog2History = _cfg->Mog2History; _BackgroundRatio = _cfg->BackgroundRatio;
_mog2VarThresh = _cfg->Mog2VarThresh;
_mog2BackgroundRatio = _cfg->Mog2BackgroundRatio;
_doNetwork = _cfg->DoNetwork; _doNetwork = _cfg->DoNetwork;
_networkPort = _cfg->NetworkPort; _networkPort = _cfg->NetworkPort;
_Threshold = 12345;
_doBackground = true; _doBackground = true;
_sendImage = 0; //Send no image _sendImage = 0; //Send no image
_resetBackground = false; _resetBackground = false;
...@@ -30,18 +26,6 @@ TrackerParameter::TrackerParameter(QObject *parent) : ...@@ -30,18 +26,6 @@ TrackerParameter::TrackerParameter(QObject *parent) :
Q_EMIT notifyView(); Q_EMIT notifyView();
} }
void TrackerParameter::setThreshold(int x)
{
_Threshold = x;
Q_EMIT notifyView();
}
int TrackerParameter::getThreshold()
{
return _Threshold;
}
void TrackerParameter::setBinarizationThreshold(int x) void TrackerParameter::setBinarizationThreshold(int x)
{ {
_BinarizationThreshold = x; _BinarizationThreshold = x;
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
#include "Interfaces/IModel/IModel.h" #include "Interfaces/IModel/IModel.h"
#include "../Config.h" #include "../Config.h"
#include "TrackingAlgorithm/ParamNames.h"
class TrackerParameter : public IModel class TrackerParameter : public IModel
{ {
...@@ -12,9 +11,7 @@ class TrackerParameter : public IModel ...@@ -12,9 +11,7 @@ class TrackerParameter : public IModel
public: public:
TrackerParameter(QObject *parent = 0); TrackerParameter(QObject *parent = 0);
void setThreshold(int x); public slots:
int getThreshold();
void setBinarizationThreshold(int x); void setBinarizationThreshold(int x);
int getBinarizationThreshold(); int getBinarizationThreshold();
...@@ -31,21 +28,9 @@ public: ...@@ -31,21 +28,9 @@ public:
Q_EMIT notifyView(); Q_EMIT notifyView();
}; };
int getmog2History() { return _mog2History; }; double getBackgroundRatio() { return _BackgroundRatio; };
void setmog2History(int x) { void setBackgroundRatio(double x) {
_mog2History = x; _BackgroundRatio = x;
Q_EMIT notifyView();
};
int getmog2VarThresh() { return _mog2VarThresh; };
void setmog2VarThresh(int x) {
_mog2VarThresh = x;
Q_EMIT notifyView();
};
double getmog2BackgroundRatio() { return _mog2BackgroundRatio; };
void setmog2BackgroundRatio(double x) {
_mog2BackgroundRatio = x;
Q_EMIT notifyView(); Q_EMIT notifyView();
}; };
...@@ -99,23 +84,17 @@ public: ...@@ -99,23 +84,17 @@ public:
void setAll( void setAll(
int Threshold,
int BinarizationThreshold, int BinarizationThreshold,
int SizeErode, int SizeErode,
int SizeDilate, int SizeDilate,
int mog2History, double BackgroundRatio,
int mog2VarThresh,
double mog2BackgroundRatio,
int minBlobSize, int minBlobSize,
int maxBlobSize) int maxBlobSize)
{ {
_Threshold = Threshold;
_BinarizationThreshold = BinarizationThreshold; _BinarizationThreshold = BinarizationThreshold;
_SizeErode = SizeErode; _SizeErode = SizeErode;
_SizeDilate = SizeDilate; _SizeDilate = SizeDilate;
_mog2History = mog2History; _BackgroundRatio = BackgroundRatio;
_mog2VarThresh = mog2VarThresh;
_mog2BackgroundRatio = mog2BackgroundRatio;
_MinBlobSize = minBlobSize; _MinBlobSize = minBlobSize;
_MaxBlobSize = maxBlobSize; _MaxBlobSize = maxBlobSize;
_cfg->BinarizationThreshold = BinarizationThreshold; _cfg->BinarizationThreshold = BinarizationThreshold;
...@@ -123,9 +102,7 @@ public: ...@@ -123,9 +102,7 @@ public:
_cfg->SizeDilate = SizeDilate; _cfg->SizeDilate = SizeDilate;
_cfg->MinBlobSize = minBlobSize; _cfg->MinBlobSize = minBlobSize;
_cfg->MaxBlobSize = maxBlobSize; _cfg->MaxBlobSize = maxBlobSize;
_cfg->Mog2History = mog2History; _cfg->BackgroundRatio = BackgroundRatio;
_cfg->Mog2VarThresh = mog2VarThresh;
_cfg->Mog2BackgroundRatio = mog2BackgroundRatio;
Q_EMIT notifyView(); Q_EMIT notifyView();
}; };
...@@ -133,13 +110,10 @@ public: ...@@ -133,13 +110,10 @@ public:
private: private:
int _Threshold;
int _BinarizationThreshold; int _BinarizationThreshold;
int _SizeErode; int _SizeErode;
int _SizeDilate; int _SizeDilate;
int _mog2History; double _BackgroundRatio;
int _mog2VarThresh;
double _mog2BackgroundRatio;
int _MinBlobSize; int _MinBlobSize;
int _MaxBlobSize; int _MaxBlobSize;
......
#pragma once
#include <iostream>
#include <vector>
namespace CONFIGPARAM
{
// System config
const std::string CONFIG_INI_FILE = "./BSTrackerConfig.ini";
}
namespace APPLICATIONPARAM
{
// System config
const std::string APP_VERSION = "APPLICATIONPARAM/APP_VERSION";
}
namespace TRACKERPARAM
{
// Parameter for the opencv BackgroundSubtractorMOG2 class
const std::string BG_MOG2_HISTORY = "TRACKERPARAM/BG_MOG2_HISTORY";
const std::string BG_MOG2_VAR_THRESHOLD = "TRACKERPARAM/BG_MOG2_VAR_THRESHOLD";
const std::string BG_MOG2_BACKGROUND_RATIO = "TRACKERPARAM/BG_MOG2_BACKGROUND_RATIO";
// Blob dectection issue
const std::string MAX_BLOB_SIZE = "TRACKERPARAM/MAX_BLOB_SIZE";
const std::string MIN_BLOB_SIZE = "TRACKERPARAM/MIN_BLOB_SIZE";
// Parameters for image pre-processing step
const std::string SIZE_ERODE = "TRACKERPARAM/SIZE_ERODE";
const std::string SIZE_DILATE = "TRACKERPARAM/SIZE_DILATE";
const std::string THRESHOLD_BINARIZING = "TRACKERPARAM/THRESHOLD_BINARIZING";
//const std::string GAUSSIAN_BLUR_SIZE = "TRACKERPARAM/GAUSSIAN_BLUR_SIZE";
}
namespace GUIPARAM
{
// FPS label
const std::string ENABLE_LABEL_FPS = "GUIPARAM/ENABLE_LABEL_FPS";
// Fish id label
const std::string ENABLE_LABEL_FISH_ID = "GUIPARAM/ENABLE_LABEL_FISH_ID";
// Replica marker
const std::string ENABLE_LABEL_REPLICA = "GUIPARAM/ENABLE_LABEL_REPLICA";
// Fish position
const std::string ENABLE_LABEL_FISH_POS = "GUIPARAM/ENABLE_LABEL_FISH_POS";
// Fish orientation
const std::string ENABLE_LABEL_FISH_ORI = "GUIPARAM/ENABLE_LABEL_FISH_ORI";
// Fish history
const std::string ENABLE_LABEL_FISH_HISTORY = "GUIPARAM/ENABLE_LABEL_FISH_HISTORY";
// Blobs
const std::string ENABLE_SHOW_BLOBS = "GUIPARAM/ENABLE_SHOW_BLOBS";
// Swap fish id
const std::string ENABLE_SWAP_FISH_ID = "GUIPARAM/ENABLE_SWAP_FISH_ID";
// Core view of tracked components
const std::string ENABLE_CORE_COMPONENT_VIEW = "GUIPARAM/ENABLE_CORE_COMPONENT_VIEW";
// Move components in core view
const std::string ENABLE_CORE_COMPONENT_MOVE = "GUIPARAM/ENABLE_CORE_COMPONENT_MOVE";
// Remove components in core view
const std::string ENABLE_CORE_COMPONENT_REMOVE = "GUIPARAM/ENABLE_CORE_COMPONENT_REMOVE";
// Swap component id in core view
const std::string ENABLE_CORE_COMPONENT_ID_SWAP = "GUIPARAM/ENABLE_CORE_COMPONENT_ID_SWAP";
// Add component in core view
const std::string ENABLE_CORE_COMPONENT_ADD = "GUIPARAM/ENABLE_CORE_COMPONENT_ADD";
// Rotate component in core view
const std::string ENABLE_CORE_COMPONENT_ROTATE = "GUIPARAM/ENABLE_CORE_COMPONENT_ROTATE";
}
namespace FISHTANKPARAM
{
// Tank area
const std::string FISHTANK_AREA_WIDTH = "FISHTANKPARAM/FISHTANK_AREA_WIDTH";
const std::string FISHTANK_AREA_HEIGHT = "FISHTANKPARAM/FISHTANK_AREA_HEIGHT";
const std::string FISHTANK_FISH_AMOUNT = "FISHTANKPARAM/FISHTANK_FISH_AMOUNT";
const std::string FISHTANK_AREA_CORNER1 = "FISHTANKPARAM/FISHTANK_AREA_CORNER1";
const std::string FISHTANK_AREA_CORNER2 = "FISHTANKPARAM/FISHTANK_AREA_CORNER2";
const std::string FISHTANK_AREA_CORNER3 = "FISHTANKPARAM/FISHTANK_AREA_CORNER3";
const std::string FISHTANK_AREA_CORNER4 = "FISHTANKPARAM/FISHTANK_AREA_CORNER4";
const std::string FISHTANK_ENABLE_NETWORKING = "FISHTANKPARAM/FISHTANK_ENABLE_NETWORKING";
const std::string FISHTANK_NETWORKING_PORT = "FISHTANKPARAM/FISHTANK_NETWORKING_PORT";
}
...@@ -8,11 +8,9 @@ ...@@ -8,11 +8,9 @@
QMutex bgsMutex; QMutex bgsMutex;
QMutex oriImageMutex; QMutex oriImageMutex;
QMutex initBgkFrameNumMutex; QMutex initBgkFrameNumMutex;
QMutex mog2Mutex;
ImagePreProcessor::ImagePreProcessor(TrackerParameter* p_TrackingParameter) : ImagePreProcessor::ImagePreProcessor(TrackerParameter* p_TrackingParameter) :
_maxBackgroundImageInitTime(0), //BG_MOG2_INIT_FRAME_NUMBER TODO _maxBackgroundImageInitTime(0)
_bkgSubMethodMog2(false)
{ {
_TrackingParameter = p_TrackingParameter; _TrackingParameter = p_TrackingParameter;
init(); init();
...@@ -42,11 +40,6 @@ void ImagePreProcessor::init() ...@@ -42,11 +40,6 @@ void ImagePreProcessor::init()
m_backgroundImage = std::make_shared<cv::Mat>(); m_backgroundImage = std::make_shared<cv::Mat>();
m_foregroundImage = std::make_shared<cv::Mat>(); m_foregroundImage = std::make_shared<cv::Mat>();
_pMOG = cv::createBackgroundSubtractorMOG2(
_TrackingParameter->getmog2History(),
_TrackingParameter->getmog2VarThresh(),
true); //Shadow detection
_backgroundSubtractionEnabled = true; _backgroundSubtractionEnabled = true;
_backgroundEnabled = true; _backgroundEnabled = true;
_erodeEnabled = true; _erodeEnabled = true;
...@@ -107,24 +100,11 @@ cv::Mat ImagePreProcessor::dilate(cv::Mat& image) ...@@ -107,24 +100,11 @@ cv::Mat ImagePreProcessor::dilate(cv::Mat& image)
cv::Mat ImagePreProcessor::backgroundSubtraction(cv::Mat& image) cv::Mat ImagePreProcessor::backgroundSubtraction(cv::Mat& image)
{ {
if (false)//(isEnabledMog2())
{
//QMutexLocker locker(&bgsMutex);
cv::Mat fgMaskMOG;
_pMOG->setBackgroundRatio(m_TrackingParameter->getmog2BackgroundRatio());
_pMOG->apply(image, fgMaskMOG); //fg mask generated by MOG method
_pMOG->getBackgroundImage(*m_backgroundImage);
return fgMaskMOG;
}
// otherwise, custom background subtraction
if (!m_backgroundImage->data) if (!m_backgroundImage->data)
image.copyTo(*m_backgroundImage); image.copyTo(*m_backgroundImage);
// calculate the image difference // calculate the image difference
const double alpha = m_TrackingParameter->getmog2BackgroundRatio(); const double alpha = m_TrackingParameter->getBackgroundRatio();
const int &imageWidth = m_backgroundImage->cols; const int &imageWidth = m_backgroundImage->cols;
const int &imageHeight = m_backgroundImage->rows; const int &imageHeight = m_backgroundImage->rows;
...@@ -171,7 +151,6 @@ std::map<std::string, std::shared_ptr<cv::Mat>> ImagePreProcessor::preProcess(st ...@@ -171,7 +151,6 @@ std::map<std::string, std::shared_ptr<cv::Mat>> ImagePreProcessor::preProcess(st
std::shared_ptr<cv::Mat> binarizedImage = std::make_shared<cv::Mat>(); std::shared_ptr<cv::Mat> binarizedImage = std::make_shared<cv::Mat>();
std::shared_ptr<cv::Mat> erodedImage = std::make_shared<cv::Mat>(); std::shared_ptr<cv::Mat> erodedImage = std::make_shared<cv::Mat>();
std::shared_ptr<cv::Mat> dilatedImage = std::make_shared<cv::Mat>(); std::shared_ptr<cv::Mat> dilatedImage = std::make_shared<cv::Mat>();
//cv::Mat test;
cv::cvtColor(*p_image, *greyMat, cv::COLOR_BGR2GRAY); cv::cvtColor(*p_image, *greyMat, cv::COLOR_BGR2GRAY);
...@@ -190,7 +169,7 @@ std::map<std::string, std::shared_ptr<cv::Mat>> ImagePreProcessor::preProcess(st ...@@ -190,7 +169,7 @@ std::map<std::string, std::shared_ptr<cv::Mat>> ImagePreProcessor::preProcess(st
std::map<std::string, std::shared_ptr<cv::Mat>> all; std::map<std::string, std::shared_ptr<cv::Mat>> all;
all.insert(std::pair<std::string, std::shared_ptr<cv::Mat>>(std::string("Greyscale"), greyMat)); all.insert(std::pair<std::string, std::shared_ptr<cv::Mat>>(std::string("Greyscale"), greyMat));
all.insert(std::pair<std::string, std::shared_ptr<cv::Mat>>(std::string("Background"), m_backgroundImage)); all.insert(std::pair<std::string, std::shared_ptr<cv::Mat>>(std::string("Background"), m_backgroundImage));
all.insert(std::pair<std::string, std::shared_ptr<cv::Mat>>(std::string("Difference"), m_foregroundImage)); all.insert(std::pair<std::string, std::shared_ptr<cv::Mat>>(std::string("Foreground"), m_foregroundImage));
all.insert(std::pair<std::string, std::shared_ptr<cv::Mat>>(std::string("Binarized"), binarizedImage)); all.insert(std::pair<std::string, std::shared_ptr<cv::Mat>>(std::string("Binarized"), binarizedImage));
all.insert(std::pair<std::string, std::shared_ptr<cv::Mat>>(std::string("Eroded"), erodedImage)); all.insert(std::pair<std::string, std::shared_ptr<cv::Mat>>(std::string("Eroded"), erodedImage));
all.insert(std::pair<std::string, std::shared_ptr<cv::Mat>>(std::string("Dilated"), dilatedImage)); all.insert(std::pair<std::string, std::shared_ptr<cv::Mat>>(std::string("Dilated"), dilatedImage));
...@@ -203,14 +182,3 @@ void ImagePreProcessor::resetBackgroundImage() ...@@ -203,14 +182,3 @@ void ImagePreProcessor::resetBackgroundImage()
// this will reset the background at the next opportunity // this will reset the background at the next opportunity
init(); init();
} }
bool ImagePreProcessor::isEnabledMog2()
{
return _bkgSubMethodMog2;
}
void ImagePreProcessor::setEnabledMog2(bool enable)
{
QMutexLocker locker(&mog2Mutex);
_bkgSubMethodMog2 = enable;
}
...@@ -81,13 +81,9 @@ private: ...@@ -81,13 +81,9 @@ private:
cv::Mat _outputImage; cv::Mat _outputImage;
int m_Mog2ShadowDetection = true;
std::shared_ptr<cv::Mat> m_backgroundImage; std::shared_ptr<cv::Mat> m_backgroundImage;
std::shared_ptr<cv::Mat> m_foregroundImage; std::shared_ptr<cv::Mat> m_foregroundImage;
// background subtraction
cv::Ptr<cv::BackgroundSubtractorMOG2> _pMOG;
//parameters for image pre-processing //parameters for image pre-processing
bool _backgroundSubtractionEnabled; bool _backgroundSubtractionEnabled;
bool _backgroundEnabled; bool _backgroundEnabled;
...@@ -98,14 +94,10 @@ private: ...@@ -98,14 +94,10 @@ private:
bool _resetBackgroundImageEnabled; bool _resetBackgroundImageEnabled;
int _maxBackgroundImageInitTime; int _maxBackgroundImageInitTime;
bool _bkgSubMethodMog2;
TrackerParameter* _TrackingParameter; TrackerParameter* _TrackingParameter;
// functions // functions
void setBkgFrameNum(int); void setBkgFrameNum(int);
int getBkgFrameNum(); int getBkgFrameNum();
void setEnabledMog2(bool);
bool isEnabledMog2();
}; };
#include "TrackedElementView.h" #include "TrackedElementView.h"
#include "../Model/TrackedComponents/TrackedElement.h" #include "../Model/TrackedComponents/TrackedElement.h"
#include "../Model/TrackedComponents/TrackedTrajectory.h" #include "../Model/TrackedComponents/TrackedTrajectory.h"
#include "../Model/TrackingAlgorithm/ParamNames.h"
#include "QBrush" #include "QBrush"
#include "QPainter" #include "QPainter"
#include "QGraphicsScene" #include "QGraphicsScene"
......
...@@ -3,22 +3,31 @@ ...@@ -3,22 +3,31 @@
#include <iostream> #include <iostream>
TrackerParameterView::TrackerParameterView(QWidget *parent, IController *controller, IModel *model) : TrackerParameterView::TrackerParameterView(QWidget *parent, IController *controller, IModel *model) : IViewWidget(parent, controller, model),
IViewWidget(parent, controller, model),
_ui(new Ui::TrackerParameterView) _ui(new Ui::TrackerParameterView)
{ {
_ui->setupUi(this); _ui->setupUi(this);
getNotified(); getNotified();
auto parameter = qobject_cast<TrackerParameter *>(getModel());
QObject::connect(_ui->lineEdit_2_binThresh, SIGNAL(valueChanged(int)), this, SLOT(on_pushButton_clicked())); connect(_ui->lineEdit_2_binThresh, qOverload<int>(&QSpinBox::valueChanged), parameter, &TrackerParameter::setBinarizationThreshold);
QObject::connect(_ui->lineEdit_3_SizeErode, SIGNAL(valueChanged(int)), this, SLOT(on_pushButton_clicked())); connect(_ui->lineEdit_2_binThresh, qOverload<int>(&QSpinBox::valueChanged), this, &TrackerParameterView::parametersChanged);
QObject::connect(_ui->lineEdit_4_SizeDilate, SIGNAL(valueChanged(int)), this, SLOT(on_pushButton_clicked()));
QObject::connect(_ui->lineEdit_8_MinBlob, SIGNAL(valueChanged(int)), this, SLOT(on_pushButton_clicked()));
QObject::connect(_ui->lineEdit_9MaxBlob, SIGNAL(valueChanged(int)), this, SLOT(on_pushButton_clicked()));
QObject::connect(_ui->lineEdit_7_MogBack, SIGNAL(valueChanged(double)), this, SLOT(on_pushButton_clicked()));
_ui->pushButton->setVisible(false); connect(_ui->lineEdit_3_SizeErode, qOverload<int>(&QSpinBox::valueChanged), parameter, &TrackerParameter::setSizeErode);
connect(_ui->lineEdit_3_SizeErode, qOverload<int>(&QSpinBox::valueChanged), this, &TrackerParameterView::parametersChanged);
connect(_ui->lineEdit_4_SizeDilate, qOverload<int>(&QSpinBox::valueChanged), parameter, &TrackerParameter::setSizeDilate);
connect(_ui->lineEdit_4_SizeDilate, qOverload<int>(&QSpinBox::valueChanged), this, &TrackerParameterView::parametersChanged);
connect(_ui->lineEdit_8_MinBlob, qOverload<int>(&QSpinBox::valueChanged), parameter, &TrackerParameter::setMinBlobSize);
connect(_ui->lineEdit_8_MinBlob, qOverload<int>(&QSpinBox::valueChanged), this, &TrackerParameterView::parametersChanged);
connect(_ui->lineEdit_9MaxBlob, qOverload<int>(&QSpinBox::valueChanged), parameter, &TrackerParameter::setMaxBlobSize);
connect(_ui->lineEdit_9MaxBlob, qOverload<int>(&QSpinBox::valueChanged), this, &TrackerParameterView::parametersChanged);
connect(_ui->lineEdit_7_bgRatio, qOverload<double>(&QDoubleSpinBox::valueChanged), parameter, &TrackerParameter::setBackgroundRatio);
connect(_ui->lineEdit_7_bgRatio, qOverload<double>(&QDoubleSpinBox::valueChanged), this, &TrackerParameterView::parametersChanged);
} }
TrackerParameterView::~TrackerParameterView() TrackerParameterView::~TrackerParameterView()
...@@ -26,36 +35,19 @@ TrackerParameterView::~TrackerParameterView() ...@@ -26,36 +35,19 @@ TrackerParameterView::~TrackerParameterView()
delete _ui; delete _ui;
} }
void TrackerParameterView::on_pushButtonResetBackground_clicked() { void TrackerParameterView::on_pushButtonResetBackground_clicked()
{
TrackerParameter *parameter = qobject_cast<TrackerParameter *>(getModel()); TrackerParameter *parameter = qobject_cast<TrackerParameter *>(getModel());
parameter->setResetBackground(true); parameter->setResetBackground(true);
} }
void TrackerParameterView::on_comboBoxSendImage_currentIndexChanged(int v) { void TrackerParameterView::on_comboBoxSendImage_currentIndexChanged(int v)
{
TrackerParameter *parameter = qobject_cast<TrackerParameter *>(getModel()); TrackerParameter *parameter = qobject_cast<TrackerParameter *>(getModel());
parameter->setSendImage(v); parameter->setSendImage(v);
parameter->setNewSelection(_ui->comboBoxSendImage->currentText().toStdString()); parameter->setNewSelection(_ui->comboBoxSendImage->currentText().toStdString());
} }
void TrackerParameterView::on_pushButton_clicked()
{
TrackerParameter *parameter = qobject_cast<TrackerParameter *>(getModel());
int setBinarizationThreshold = _ui->lineEdit_2_binThresh->text().toInt();
int setSizeErode = _ui->lineEdit_3_SizeErode->text().toInt();
int setSizeDilate = _ui->lineEdit_4_SizeDilate->text().toInt();
int setMinBlobSize = _ui->lineEdit_8_MinBlob->text().toInt();
int setMaxBlobSize = _ui->lineEdit_9MaxBlob->text().toInt();
double setmog2BackgroundRatio = _ui->lineEdit_7_MogBack->value();
parameter->setAll(0, setBinarizationThreshold, setSizeErode, setSizeDilate, 0, 0,
setmog2BackgroundRatio, setMinBlobSize, setMaxBlobSize);
Q_EMIT parametersChanged();
}
void TrackerParameterView::getNotified() void TrackerParameterView::getNotified()
{ {
TrackerParameter *parameter = qobject_cast<TrackerParameter *>(getModel()); TrackerParameter *parameter = qobject_cast<TrackerParameter *>(getModel());
...@@ -69,8 +61,8 @@ void TrackerParameterView::getNotified() ...@@ -69,8 +61,8 @@ void TrackerParameterView::getNotified()
val = parameter->getSizeDilate(); val = parameter->getSizeDilate();
_ui->lineEdit_4_SizeDilate->setValue(val); _ui->lineEdit_4_SizeDilate->setValue(val);
double dval = parameter->getmog2BackgroundRatio(); double dval = parameter->getBackgroundRatio();
_ui->lineEdit_7_MogBack->setValue(dval); _ui->lineEdit_7_bgRatio->setValue(dval);
val = parameter->getMinBlobSize(); val = parameter->getMinBlobSize();
_ui->lineEdit_8_MinBlob->setValue(val); _ui->lineEdit_8_MinBlob->setValue(val);
......
...@@ -17,7 +17,6 @@ public: ...@@ -17,7 +17,6 @@ public:
~TrackerParameterView(); ~TrackerParameterView();
private slots: private slots:
void on_pushButton_clicked();
void on_pushButtonResetBackground_clicked(); void on_pushButtonResetBackground_clicked();
void on_comboBoxSendImage_currentIndexChanged(int v); void on_comboBoxSendImage_currentIndexChanged(int v);
......
...@@ -6,10 +6,22 @@ ...@@ -6,10 +6,22 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>304</width> <width>583</width>
<height>481</height> <height>782</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>320</width>
<height>0</height>
</size>
</property>
<property name="windowTitle"> <property name="windowTitle">
<string>Form</string> <string>Form</string>
</property> </property>
...@@ -54,8 +66,8 @@ ...@@ -54,8 +66,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>304</width> <width>583</width>
<height>472</height> <height>773</height>
</rect> </rect>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout_4"> <layout class="QHBoxLayout" name="horizontalLayout_4">
...@@ -68,239 +80,230 @@ ...@@ -68,239 +80,230 @@
<item> <item>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
<item> <item>
<widget class="QFrame" name="frame"> <widget class="QGroupBox" name="groupBox">
<property name="styleSheet"> <property name="title">
<string notr="true">#frame{color: #e5e5e5;}</string> <string>Background Subtraction</string>
</property> </property>
<property name="frameShape"> <layout class="QVBoxLayout" name="verticalLayout_4">
<enum>QFrame::Box</enum> <item>
<layout class="QFormLayout" name="formLayout">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::ExpandingFieldsGrow</enum>
</property> </property>
<property name="frameShadow"> <property name="formAlignment">
<enum>QFrame::Plain</enum> <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_2"> <property name="horizontalSpacing">
<property name="spacing"> <number>44</number>
<number>3</number>
</property> </property>
<property name="leftMargin"> <item row="0" column="0">
<number>5</number> <widget class="QLabel" name="label_7">
<property name="text">
<string>Background Ratio:</string>
</property> </property>
<property name="topMargin"> </widget>
<number>5</number> </item>
<item row="0" column="1">
<widget class="QDoubleSpinBox" name="lineEdit_7_bgRatio">
<property name="minimumSize">
<size>
<width>132</width>
<height>30</height>
</size>
</property> </property>
<property name="rightMargin"> <property name="toolTip">
<number>5</number> <string>Set the background ratio</string>
</property> </property>
<property name="bottomMargin"> <property name="decimals">
<number>5</number> <number>6</number>
</property> </property>
<item> <property name="maximum">
<widget class="QWidget" name="widgetBinThr" native="true"> <double>1.000000000000000</double>
<property name="toolTip">
<string>Set the binarization threshold</string>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout_2"> <property name="singleStep">
<item> <double>0.001000000000000</double>
<widget class="QLabel" name="label_2">
<property name="text">
<string>Binarization Threshold</string>
</property> </property>
</widget> <property name="value">
</item> <double>0.001000000000000</double>
<item>
<widget class="QSpinBox" name="lineEdit_2_binThresh">
<property name="toolTip">
<string>Set the binarization threshold</string>
</property> </property>
</widget> </widget>
</item> </item>
</layout> </layout>
</widget>
</item> </item>
<item> <item>
<widget class="Line" name="line_2"> <layout class="QHBoxLayout" name="horizontalLayout">
<property name="styleSheet"> <item>
<string notr="true">color: #e5e5e5;</string> <spacer name="horizontalSpacer_2">
</property>
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
</widget> <property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>78</width>
<height>20</height>
</size>
</property>
</spacer>
</item> </item>
<item> <item>
<widget class="QWidget" name="widgetSizeErode" native="true"> <widget class="QPushButton" name="pushButtonResetBackground">
<property name="toolTip"> <property name="toolTip">
<string>Set the erosion size</string> <string>Reset the current background</string>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout_6">
<item>
<widget class="QLabel" name="label_3">
<property name="text"> <property name="text">
<string>Size Erode</string> <string>Reset Background</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QSpinBox" name="lineEdit_3_SizeErode"> <spacer name="horizontalSpacer">
<property name="toolTip"> <property name="orientation">
<string>Set the erosion size</string> <enum>Qt::Horizontal</enum>
</property> </property>
</widget> <property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item> </item>
</layout> </layout>
</widget>
</item> </item>
<item> </layout>
<widget class="Line" name="line_3">
<property name="styleSheet">
<string notr="true">color: #e5e5e5;</string>
</property>
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QWidget" name="widgetSizeDil" native="true"> <widget class="QGroupBox" name="groupBox_2">
<property name="toolTip"> <property name="title">
<string>Set the dilation size</string> <string>Morphology</string>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout_7"> <layout class="QVBoxLayout" name="verticalLayout_6">
<item> <item>
<widget class="QLabel" name="label_4"> <layout class="QFormLayout" name="formLayout_6">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::ExpandingFieldsGrow</enum>
</property>
<property name="horizontalSpacing">
<number>16</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="label_2">
<property name="text"> <property name="text">
<string>Size Dilate</string> <string>Binarization Threshold:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item row="0" column="1">
<widget class="QSpinBox" name="lineEdit_4_SizeDilate"> <widget class="QSpinBox" name="lineEdit_2_binThresh">
<property name="minimumSize">
<size>
<width>132</width>
<height>30</height>
</size>
</property>
<property name="toolTip"> <property name="toolTip">
<string>Set the dilation size</string> <string>Set the binarization threshold</string>
</property> </property>
</widget> </widget>
</item> </item>
</layout> <item row="1" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Size Erosion:</string>
</property>
</widget> </widget>
</item> </item>
<item> <item row="1" column="1">
<widget class="Line" name="line_4"> <widget class="QSpinBox" name="lineEdit_3_SizeErode">
<property name="styleSheet"> <property name="minimumSize">
<string notr="true">color: #e5e5e5;</string> <size>
</property> <width>132</width>
<property name="frameShadow"> <height>30</height>
<enum>QFrame::Plain</enum> </size>
</property> </property>
<property name="orientation"> <property name="toolTip">
<enum>Qt::Horizontal</enum> <string>Set the erosion size</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item row="2" column="0">
<widget class="QWidget" name="widgetBackgroundRatio" native="true"> <widget class="QLabel" name="label_4">
<property name="toolTip">
<string>Set the background ratio</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_8">
<item>
<widget class="QLabel" name="label_7">
<property name="text"> <property name="text">
<string>Background Ratio</string> <string>Size Dilation:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item row="2" column="1">
<widget class="QDoubleSpinBox" name="lineEdit_7_MogBack"> <widget class="QSpinBox" name="lineEdit_4_SizeDilate">
<property name="toolTip"> <property name="minimumSize">
<string>Set the background ratio</string> <size>
</property> <width>132</width>
<property name="decimals"> <height>30</height>
<number>6</number> </size>
</property>
<property name="maximum">
<double>1.000000000000000</double>
</property>
<property name="singleStep">
<double>0.001000000000000</double>
</property> </property>
<property name="value"> <property name="toolTip">
<double>0.001000000000000</double> <string>Set the dilation size</string>
</property> </property>
</widget> </widget>
</item> </item>
</layout> </layout>
</widget>
</item> </item>
<item> </layout>
<widget class="Line" name="line_5">
<property name="styleSheet">
<string notr="true">color: #e5e5e5;</string>
</property>
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QWidget" name="widgetMinBlob" native="true"> <widget class="QGroupBox" name="groupBox_3">
<property name="toolTip"> <property name="title">
<string>Set the minimal blob size</string> <string>Blob Detection</string>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout_10"> <layout class="QVBoxLayout" name="verticalLayout_5">
<item> <item>
<layout class="QFormLayout" name="formLayout_2">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::ExpandingFieldsGrow</enum>
</property>
<property name="horizontalSpacing">
<number>66</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="label_8"> <widget class="QLabel" name="label_8">
<property name="text"> <property name="text">
<string>Min Blob Size</string> <string>Min Blob Size:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item row="0" column="1">
<widget class="QSpinBox" name="lineEdit_8_MinBlob"> <widget class="QSpinBox" name="lineEdit_8_MinBlob">
<property name="minimumSize">
<size>
<width>132</width>
<height>30</height>
</size>
</property>
<property name="toolTip"> <property name="toolTip">
<string>Set the minimal blob size</string> <string>Set the minimal blob size</string>
</property> </property>
</widget> </widget>
</item> </item>
</layout> <item row="1" column="0">
</widget>
</item>
<item>
<widget class="Line" name="line_6">
<property name="styleSheet">
<string notr="true">color: #e5e5e5;</string>
</property>
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item>
<widget class="QWidget" name="widgetMaxBlob" native="true">
<property name="toolTip">
<string>Sets the maximum blob size</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QLabel" name="label_9"> <widget class="QLabel" name="label_9">
<property name="text"> <property name="text">
<string>Max Blob Size</string> <string>Max Blob Size:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item row="1" column="1">
<widget class="QSpinBox" name="lineEdit_9MaxBlob"> <widget class="QSpinBox" name="lineEdit_9MaxBlob">
<property name="minimumSize">
<size>
<width>132</width>
<height>30</height>
</size>
</property>
<property name="toolTip"> <property name="toolTip">
<string>Sets the maximum blob size</string> <string>Sets the maximum blob size</string>
</property> </property>
...@@ -310,43 +313,39 @@ ...@@ -310,43 +313,39 @@
</widget> </widget>
</item> </item>
</layout> </layout>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton">
<property name="toolTip">
<string>Set the parameters for the tracking plugin</string>
</property>
<property name="text">
<string>Set Values</string>
</property>
</widget>
</item> </item>
</layout> </layout>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="Line" name="line"> <widget class="QGroupBox" name="groupBox_4">
<property name="orientation"> <property name="title">
<enum>Qt::Horizontal</enum> <string>Display</string>
</property> </property>
</widget> <layout class="QVBoxLayout" name="verticalLayout_2">
</item>
<item> <item>
<widget class="QLabel" name="label"> <layout class="QFormLayout" name="formLayout_4">
<property name="sizePolicy"> <property name="fieldGrowthPolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed"> <enum>QFormLayout::ExpandingFieldsGrow</enum>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property> </property>
<property name="horizontalSpacing">
<number>108</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="label_5">
<property name="text"> <property name="text">
<string>Send Image:</string> <string>Image:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item row="0" column="1">
<widget class="QComboBox" name="comboBoxSendImage"> <widget class="QComboBox" name="comboBoxSendImage">
<property name="minimumSize">
<size>
<width>132</width>
<height>0</height>
</size>
</property>
<property name="toolTip"> <property name="toolTip">
<string>Choose which image to display for the next frames. Tracking must be actived.</string> <string>Choose which image to display for the next frames. Tracking must be actived.</string>
</property> </property>
...@@ -360,39 +359,34 @@ ...@@ -360,39 +359,34 @@
</item> </item>
<item> <item>
<property name="text"> <property name="text">
<string>Binarized</string> <string>Background</string>
</property> </property>
</item> </item>
<item> <item>
<property name="text"> <property name="text">
<string>Eroded</string> <string>Foreground</string>
</property> </property>
</item> </item>
<item> <item>
<property name="text"> <property name="text">
<string>Dilated</string> <string>Binarized</string>
</property> </property>
</item> </item>
<item> <item>
<property name="text"> <property name="text">
<string>Difference</string> <string>Eroded</string>
</property> </property>
</item> </item>
<item> <item>
<property name="text"> <property name="text">
<string>Background</string> <string>Dilated</string>
</property> </property>
</item> </item>
</widget> </widget>
</item> </item>
<item> </layout>
<widget class="QPushButton" name="pushButtonResetBackground"> </item>
<property name="toolTip"> </layout>
<string>Reset the current background</string>
</property>
<property name="text">
<string>Reset Background</string>
</property>
</widget> </widget>
</item> </item>
<item> <item>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment