Commit c19e68b8 by “liusq”

开关人形检测和修改人形bug

parent e2bbbbe3
......@@ -589,6 +589,10 @@ void CameraHandle::updateImage(const cv::Mat & frame,qint64 currentTime){
std::map<QString,vides_data::requestFaceReconition> mapFaces;
ScopeSemaphoreExit guard([this]() {
faceCount.fetch_add(1, std::memory_order_relaxed);
});
QByteArray imgs;
this->matToBase64(frame, imgs);
......@@ -597,8 +601,8 @@ void CameraHandle::updateImage(const cv::Mat & frame,qint64 currentTime){
int faSize =0;
std::vector<vides_data::ParkingArea> currentPlates;
int uniforms=0x00;
qInfo()<<"updateImage"<<algorithmPermissions;
std::map<int,int>resMap;
if ((algorithmPermissions & 0x01<<3) != 0) {
//穿工服算法
if ((algorithmPermissions & 0x01<<2) != 0) {
......@@ -772,7 +776,6 @@ void CameraHandle::updateImage(const cv::Mat & frame,qint64 currentTime){
}
}
faceCount.fetch_add(1, std::memory_order_relaxed);
for (auto it = areaMat.begin(); it != areaMat.end(); ++it) {
int key = it->first;
cv::Mat areaMat = it->second;
......@@ -883,8 +886,6 @@ void CameraHandle::updateImage(const cv::Mat & frame,qint64 currentTime){
qInfo()<<QString("sn:%1 =>识别的车牌号是:%2").arg(sSn).arg(var.new_plate);
}
licensePlateRecognitionResults(newPlate);
}
}
void CameraHandle::findIp(QString &ip){
......
......@@ -12,7 +12,7 @@ TEMPLATE = app
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS
DEFINES += APP_VERSION=\\\"1.3.0\\\"
DEFINES += APP_VERSION=\\\"1.3.2\\\"
QMAKE_LIBDIR += /usr/local/lib
......
......@@ -964,7 +964,8 @@ void MainWindow::initRecordingToString(QString &recorJson){
__uint8_t MainWindow::intToUint8t(bool faceAlgorithm, bool licensePlateAlgorithm, bool uniformAlgorithm,bool humanAlgorithm) {
__uint8_t result = 0;
//人形识别对应最高高位(第3位)
result |=(humanAlgorithm?1:0)<<3;
result |= (humanAlgorithm ? 1 : 0) << 3;
// 工服识别对应最高位(第2位)
result |= (uniformAlgorithm ? 1 : 0) << 2;
......@@ -973,6 +974,9 @@ __uint8_t MainWindow::intToUint8t(bool faceAlgorithm, bool licensePlateAlgorithm
// 车牌识别对应最低位(第0位)
result |= (licensePlateAlgorithm ? 1 : 0);
qInfo()<<"算法结果"<<result;
return result;
}
void MainWindow::initCameras(vides_data::cameraParameters &parameter,vides_data::responseConfig &devConfig,const std::list<vides_data::responseArea>&areas,std::list<vides_data::requestCameraInfo>&camera_info_list){
......@@ -1014,7 +1018,8 @@ void MainWindow::initCameras(vides_data::cameraParameters &parameter,vides_data:
cameraHandle->findFirmwareVersion(camera_info.firmware_version);
camera_info_list.push_front(camera_info);
__uint8_t new_algorithm= intToUint8t(devConfig.faceConfig.isOn,devConfig.licensePlateConfig.isOn,devConfig.uniformConfig.isOn,devConfig.humanConfig.isOn);
__uint8_t new_algorithm= (devConfig.faceConfig.isOn,devConfig.licensePlateConfig.isOn,devConfig.uniformConfig.isOn,devConfig.humanConfig.isOn);
cameraHandle->initAlgorithmPermissions(new_algorithm);
cameraHandle->initParkingSpaceInfo(areas);
......
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