#include "dde.h" dde::dde(QObject *parent) : QObject{parent} { ready = false; dderate = 1; thread = new QThread(); thread->start(); this->moveToThread(thread); } void dde::setpara(double rate) { dderate = rate; ready = true; if(rate ==0 ) ready = false; } void dde::off() { ready = false; } void dde::slotprocimg(cv::Mat img) { if(ready){ cv::Mat gauss; cv::GaussianBlur(img,gauss,cv::Size(5,5),5); cv::Mat dst(img.rows,img.cols,CV_16UC1); for(int i = 0;i(i,j)-gauss.at(i,j))+gauss.at(i,j); dst.at(i,j) =temp; if(temp<0) dst.at(i,j) = 0; if(temp>65535) dst.at(i,j) = 65535; } } emit signalsendimg(dst); } else{ cv::Mat temp; img.copyTo(temp); emit signalsendimg(temp); } }