Commit 38d74e8b by “liusq”

打印日志新增sn

parent b31cf23d
...@@ -20,7 +20,8 @@ CameraHandle::CameraHandle(QString &url, QString &httpUrl, QString &sSn, int &ch ...@@ -20,7 +20,8 @@ CameraHandle::CameraHandle(QString &url, QString &httpUrl, QString &sSn, int &ch
connect(this, SIGNAL(afterDownloadFile(int,int,QString)), this, SLOT(pushRecordToCloud(int,int,QString)),Qt::QueuedConnection); connect(this, SIGNAL(afterDownloadFile(int,int,QString)), this, SLOT(pushRecordToCloud(int,int,QString)),Qt::QueuedConnection);
detector = TCV_CreateHumanDetector(); detector = TCV_CreateHumanDetector();
// 设置检测得分阈值 默认0.5 // 设置检测得分阈值 默认0.5
TCV_HumanDetectorSetScoreThreshold(detector, 0.8f); TCV_HumanDetectorSetHumanThreshold(detector,0.5f);
TCV_HumanDetectorSetCarThreshold(detector,0.2f);
HLPR_ContextConfiguration configuration = {0}; HLPR_ContextConfiguration configuration = {0};
QByteArray && by_mpath=modelPaths.toUtf8(); QByteArray && by_mpath=modelPaths.toUtf8();
...@@ -557,9 +558,9 @@ void CameraHandle::updateImage(const cv::Mat & frame,qint64 currentTime){ ...@@ -557,9 +558,9 @@ void CameraHandle::updateImage(const cv::Mat & frame,qint64 currentTime){
std::map<int,RecognizedInfo>exitMoMap; std::map<int,RecognizedInfo>exitMoMap;
vides_data::requestLicensePlate newPlate; vides_data::requestLicensePlate newPlate;
newPlate.sn=sSn; newPlate.sn=sSn;
qDebug()<<QString("识别的车牌号是:%1").arg(lpNumber); qDebug()<<QString("sn==>%1,识别的车牌号是:%2").arg(sSn).arg(lpNumber);
std::list<vides_data::LicensePlate>ps=plate.plates; std::list<vides_data::LicensePlate>ps=plate.plates;
int res=-1; int res =-1;
this->matToBase64(frame, imgs); this->matToBase64(frame, imgs);
if(ps.size()==0){ if(ps.size()==0){
for (auto it = parkMap.begin(); it != parkMap.end(); ++it) { for (auto it = parkMap.begin(); it != parkMap.end(); ++it) {
...@@ -597,13 +598,13 @@ void CameraHandle::updateImage(const cv::Mat & frame,qint64 currentTime){ ...@@ -597,13 +598,13 @@ void CameraHandle::updateImage(const cv::Mat & frame,qint64 currentTime){
vides_data::LicensePlate recognition= indexToLicensePlate.at(key); vides_data::LicensePlate recognition= indexToLicensePlate.at(key);
RecognizedInfo recognizedInfo; RecognizedInfo recognizedInfo;
if (recognition.new_color=="蓝牌" && recognition.new_plate.length() != 7) { if (recognition.new_color=="蓝牌" && recognition.new_plate.length() != 7) {
qDebug()<<"蓝牌车牌号:"<<recognition.new_plate<<"===>recognition.new_plate.length():"<<recognition.new_plate.length(); qDebug()<<sSn<<"==>蓝牌车牌号:"<<recognition.new_plate<<"===>recognition.new_plate.length():"<<recognition.new_plate.length();
continue; continue;
} else if (recognition.new_color=="绿牌新能源" && recognition.new_plate.length() != 8) { } else if (recognition.new_color=="绿牌新能源" && recognition.new_plate.length() != 8) {
qDebug()<<"绿牌车牌号:"<<recognition.new_plate<<"===>recognition.new_plate.length():"<<recognition.new_plate.length(); qDebug()<<sSn<<"==>绿牌车牌号:"<<recognition.new_plate<<"===>recognition.new_plate.length():"<<recognition.new_plate.length();
continue; continue;
} else if (recognition.new_plate.length() < 7) { } else if (recognition.new_plate.length() < 7) {
qDebug()<<"非绿牌蓝牌车牌号:"<<recognition.new_plate<<"===>recognition.new_plate.length():"<<recognition.new_plate.length(); qDebug()<<sSn<<"==>非绿牌蓝牌车牌号:"<<recognition.new_plate<<"===>recognition.new_plate.length():"<<recognition.new_plate.length();
continue; continue;
} }
if(recognition.text_confidence>=instace.getCarConfidenceMax()){ if(recognition.text_confidence>=instace.getCarConfidenceMax()){
...@@ -619,7 +620,11 @@ void CameraHandle::updateImage(const cv::Mat & frame,qint64 currentTime){ ...@@ -619,7 +620,11 @@ void CameraHandle::updateImage(const cv::Mat & frame,qint64 currentTime){
this->checkAndUpdateCurrentPlate(value,frame,recognizedInfo,res,exitMoMap); this->checkAndUpdateCurrentPlate(value,frame,recognizedInfo,res,exitMoMap);
} }
} }
qDebug()<<sSn<<"==>识别的车牌置信度"<<recognition.text_confidence;
qDebug()<<sSn<<"==>最小车牌置信度"<<instace.getCarConfidenceMin();
if(recognition.text_confidence<=instace.getCarConfidenceMin()){ if(recognition.text_confidence<=instace.getCarConfidenceMin()){
qDebug()<<sSn<<"==>recognition.text_confidence<=instace.getCarConfidenceMin"<<instace.getCarConfidenceMin();
continue; continue;
} }
if(recognition.text_confidence>instace.getCarConfidenceMin() if(recognition.text_confidence>instace.getCarConfidenceMin()
...@@ -633,6 +638,7 @@ void CameraHandle::updateImage(const cv::Mat & frame,qint64 currentTime){ ...@@ -633,6 +638,7 @@ void CameraHandle::updateImage(const cv::Mat & frame,qint64 currentTime){
recognizedInfo=std::move(info); recognizedInfo=std::move(info);
this->checkAndUpdateCurrentPlate(value,frame,recognizedInfo,res,exitMoMap); this->checkAndUpdateCurrentPlate(value,frame,recognizedInfo,res,exitMoMap);
} }
if (res == Exit || res == Mobilization) { if (res == Exit || res == Mobilization) {
recognition.areaLocation=value->getArea(); recognition.areaLocation=value->getArea();
recognition.img=imgs; recognition.img=imgs;
......
...@@ -47,7 +47,7 @@ INCLUDEPATH+=/usr/local/include/human ...@@ -47,7 +47,7 @@ INCLUDEPATH+=/usr/local/include/human
# INCLUDEPATH+=/usr/local/include/hyperface # INCLUDEPATH+=/usr/local/include/hyperface
# INCLUDEPATH+=/usr/local/include/hyper # INCLUDEPATH+=/usr/local/include/hyper
# INCLUDEPATH+=/usr/local/include/XNetSDK # INCLUDEPATH+=/usr/local/include/XNetSDK
# #INCLUDEPATH+=/usr/local/include/human # INCLUDEPATH+=/usr/local/include/human
# } # }
#} #}
......
...@@ -779,7 +779,7 @@ void MainWindow::initCommon(){ ...@@ -779,7 +779,7 @@ void MainWindow::initCommon(){
createDirectory(0x01,"frame_images", "目录创建成功", "目录创建失败"); createDirectory(0x01,"frame_images", "目录创建成功", "目录创建失败");
createDirectory(0x00,"frame_video", "创建视频目录成功", "视频目录创建失败"); createDirectory(0x00,"frame_video", "创建视频目录成功", "视频目录创建失败");
createDirectory(0x02,"images", "图片目录创建成功", "图片目录创建失败"); createDirectory(0x02,"images", "图片目录创建成功", "图片目录创建失败");
float carConfidenceMax=qSetting->value("devices/carConfidenceMax").toDouble(); float carConfidenceMax=qSetting->value("devices/carConfidenceMax").toFloat();
float carConfidenceMin=qSetting->value("devices/carConfidenceMin").toFloat(); float carConfidenceMin=qSetting->value("devices/carConfidenceMin").toFloat();
Common& instance = Common::getInstance(); Common& instance = Common::getInstance();
instance.setCarConfidenceMax(carConfidenceMax); instance.setCarConfidenceMax(carConfidenceMax);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment