Commit af92429f by “liusq”

车牌大于最大匹配度进场

parent 38d74e8b
......@@ -20,8 +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);
detector = TCV_CreateHumanDetector();
// 设置检测得分阈值 默认0.5
TCV_HumanDetectorSetHumanThreshold(detector,0.5f);
TCV_HumanDetectorSetCarThreshold(detector,0.2f);
//TCV_HumanDetectorSetHumanThreshold(detector,0.5f);
//TCV_HumanDetectorSetCarThreshold(detector,0.2f);
HLPR_ContextConfiguration configuration = {0};
QByteArray && by_mpath=modelPaths.toUtf8();
......@@ -558,7 +558,7 @@ void CameraHandle::updateImage(const cv::Mat & frame,qint64 currentTime){
std::map<int,RecognizedInfo>exitMoMap;
vides_data::requestLicensePlate newPlate;
newPlate.sn=sSn;
qDebug()<<QString("sn==>%1,识别的车牌是:%2").arg(sSn).arg(lpNumber);
qDebug()<<QString("sn==>%1,识别的车牌信息是:%2").arg(sSn).arg(lpNumber);
std::list<vides_data::LicensePlate>ps=plate.plates;
int res =-1;
this->matToBase64(frame, imgs);
......@@ -588,7 +588,7 @@ void CameraHandle::updateImage(const cv::Mat & frame,qint64 currentTime){
ParkingSpaceInfo newcurrentPlate;
newcurrentPlate.setArea(currentPlate.recognition);
int index = this->findPointRegion(newcurrentPlate);
qDebug()<<"识别的区域:"<<index;
qDebug()<<sSn<<"==>识别的区域:"<<index;
indexToLicensePlate[index] = currentPlate;
}
for (auto it = parkMap.begin(); it != parkMap.end(); ++it) {
......@@ -612,6 +612,7 @@ void CameraHandle::updateImage(const cv::Mat & frame,qint64 currentTime){
for (int i = 0; i < 3; ++i) {
value->removeQueue();
}
}
for (int var = 0; var < 3; ++var) {
RecognizedInfo info(recognition.new_plate,recognition.time,recognition.new_color);
value->addQueue(info);
......@@ -619,10 +620,6 @@ void CameraHandle::updateImage(const cv::Mat & frame,qint64 currentTime){
}
this->checkAndUpdateCurrentPlate(value,frame,recognizedInfo,res,exitMoMap);
}
}
qDebug()<<sSn<<"==>识别的车牌置信度"<<recognition.text_confidence;
qDebug()<<sSn<<"==>最小车牌置信度"<<instace.getCarConfidenceMin();
if(recognition.text_confidence<=instace.getCarConfidenceMin()){
qDebug()<<sSn<<"==>recognition.text_confidence<=instace.getCarConfidenceMin"<<instace.getCarConfidenceMin();
continue;
......@@ -638,6 +635,7 @@ void CameraHandle::updateImage(const cv::Mat & frame,qint64 currentTime){
recognizedInfo=std::move(info);
this->checkAndUpdateCurrentPlate(value,frame,recognizedInfo,res,exitMoMap);
}
qDebug()<<sSn<<"==>checkAndUpdateCurrentPlate结果是"<<res;
if (res == Exit || res == Mobilization) {
recognition.areaLocation=value->getArea();
......
......@@ -15,7 +15,7 @@ int HumanDetection::findHuManCar(const cv::Mat &source,int res,TCV_HumanDetector
// 执行一帧目标检测
TCV_HumanDetectorProcessFrame(detector, stream);
int num = (res == 0) ? TCV_HumanDetectorGetNumOfHuman(detector) :TCV_HumanDetectorGetNumOfCar(detector);
int num = (res == 0) ? TCV_HumanDetectorGetNumOfHuman(detector) :0;//TCV_HumanDetectorGetNumOfCar(detector);
qDebug() << (res == 0 ? "Number of people detected:" : "Number of cars detected:") << num;
TCV_ReleaseCameraStream(stream);
......
......@@ -13,43 +13,43 @@ TEMPLATE = app
DEFINES += QT_DEPRECATED_WARNINGS
QMAKE_LIBDIR += /usr/local/lib
INCLUDEPATH+=/usr/local/include/opencv4
INCLUDEPATH+=/usr/local/include/hyperface
INCLUDEPATH+=/usr/local/include/hyper
INCLUDEPATH+=/usr/local/include/XNetSDK
INCLUDEPATH+=/usr/local/include/human
#unix:contains(QMAKE_HOST.arch, x86_64) {
# QMAKE_LIBDIR += /home/mark/Public/x86_opencv/lib
#}
#unix:contains(QMAKE_HOST.arch, arm) {
# QMAKE_LIBDIR += /usr/local/lib
#}
## 根据编译器类型选择库路径和头文件路径
#unix: {
# # x86 架构
# contains(QMAKE_HOST.arch, x86_64) {
# INCLUDEPATH+=/home/mark/Public/x86_opencv/include/opencv4
# INCLUDEPATH+=/home/mark/Public/x86_opencv/include/hyperface
# INCLUDEPATH+=/home/mark/Public/x86_opencv/include/hyper
# INCLUDEPATH+=/home/mark/Public/x86_opencv/include/XNetSDK
# INCLUDEPATH+=/home/mark/Public/x86_opencv/include/human
# }
# # ARM 架构
# contains(QMAKE_HOST.arch, arm) {
# INCLUDEPATH+=/usr/local/include/opencv4
# INCLUDEPATH+=/usr/local/include/hyperface
# INCLUDEPATH+=/usr/local/include/hyper
# INCLUDEPATH+=/usr/local/include/XNetSDK
# INCLUDEPATH+=/usr/local/include/human
# }
#}
#QMAKE_LIBDIR += /usr/local/lib
#INCLUDEPATH+=/usr/local/include/opencv4
#INCLUDEPATH+=/usr/local/include/hyperface
#INCLUDEPATH+=/usr/local/include/hyper
#INCLUDEPATH+=/usr/local/include/XNetSDK
#INCLUDEPATH+=/usr/local/include/human
unix:contains(QMAKE_HOST.arch, x86_64) {
QMAKE_LIBDIR += /home/mark/Public/x86_opencv/lib
}
unix:contains(QMAKE_HOST.arch, arm) {
QMAKE_LIBDIR += /usr/local/lib
}
# 根据编译器类型选择库路径和头文件路径
unix: {
# x86 架构
contains(QMAKE_HOST.arch, x86_64) {
INCLUDEPATH+=/home/mark/Public/x86_opencv/include/opencv4
INCLUDEPATH+=/home/mark/Public/x86_opencv/include/hyperface
INCLUDEPATH+=/home/mark/Public/x86_opencv/include/hyper
INCLUDEPATH+=/home/mark/Public/x86_opencv/include/XNetSDK
INCLUDEPATH+=/home/mark/Public/x86_opencv/include/human
}
# ARM 架构
contains(QMAKE_HOST.arch, arm) {
INCLUDEPATH+=/usr/local/include/opencv4
INCLUDEPATH+=/usr/local/include/hyperface
INCLUDEPATH+=/usr/local/include/hyper
INCLUDEPATH+=/usr/local/include/XNetSDK
INCLUDEPATH+=/usr/local/include/human
}
}
# You can also make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
......
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