Commit 402424fb by “liusq”

超时去掉图片上传03

parent eeeda510
...@@ -625,9 +625,19 @@ void CameraHandle::updateImage(const cv::Mat & frame,qint64 currentTime){ ...@@ -625,9 +625,19 @@ void CameraHandle::updateImage(const cv::Mat & frame,qint64 currentTime){
} }
qInfo()<<"工作人数==>"<<worker; qInfo()<<"工作人数==>"<<worker;
vides_data::response* resp=httpService.httpPostFacePopulation(imgs,faSize,worker,sSn,currentTime); vides_data::response* resp=httpService.httpPostFacePopulation(imgs,faSize,worker,sSn,currentTime);
if (resp->code!= 0) { if (resp->code!= 0) {
qInfo()<<"人数变化推送信息推送失败"; if(resp->msg=="TimeoutError") {
QByteArray num_imgs;
httpService.setHttpUrl(httpUrl);
vides_data::response* img_resp = httpService.httpPostFacePopulation(num_imgs,faSize,worker,sSn,currentTime);
if (img_resp->code != 0) {
qInfo()<<"不加图片人数变化推送信息推送失败";
}
instace.deleteObj(img_resp);
}
} }
instace.deleteObj(resp); instace.deleteObj(resp);
faceMapWorker.setX(faSize); faceMapWorker.setX(faSize);
faceMapWorker.setY(uniforms); faceMapWorker.setY(uniforms);
...@@ -658,9 +668,18 @@ void CameraHandle::updateImage(const cv::Mat & frame,qint64 currentTime){ ...@@ -658,9 +668,18 @@ void CameraHandle::updateImage(const cv::Mat & frame,qint64 currentTime){
mapFaces.insert(std::make_pair( face.id, faceReconition)); mapFaces.insert(std::make_pair( face.id, faceReconition));
if (resp->code!= 0) { if (resp->code!= 0) {
qInfo()<<"识别人code"<<resp->code; if(resp->msg=="TimeoutError") {
qInfo()<<"识别人msg"<<resp->msg; faceReconition.img.clear();
qInfo()<<"识别人脸信息推送失败"<<face.id; httpService.setHttpUrl(httpUrl);
vides_data::response* img_resp = httpService.httpPostFaceReconition(faceReconition);
if (img_resp->code != 0) {
qInfo()<<"不加图片人脸信息推送失败";
qInfo()<<"不加图片识别人code"<<resp->code;
qInfo()<<"不加图片识别人msg"<<resp->msg;
qInfo()<<"不加图片识别人脸信息推送失败"<<face.id;
}
instace.deleteObj(img_resp);
}
} }
instace.deleteObj(resp); instace.deleteObj(resp);
} }
...@@ -676,7 +695,15 @@ void CameraHandle::updateImage(const cv::Mat & frame,qint64 currentTime){ ...@@ -676,7 +695,15 @@ void CameraHandle::updateImage(const cv::Mat & frame,qint64 currentTime){
httpService.setHttpUrl(httpUrl); httpService.setHttpUrl(httpUrl);
vides_data::response* resp=httpService.httpPostUniforms(imgs,strUniform, sSn,currentTime); vides_data::response* resp=httpService.httpPostUniforms(imgs,strUniform, sSn,currentTime);
if (resp->code!= 0) { if (resp->code!= 0) {
qInfo()<<"推送未穿工服人数失败"; if(resp->msg=="TimeoutError") {
QByteArray num_imgs;
httpService.setHttpUrl(httpUrl);
vides_data::response* img_resp=httpService.httpPostUniforms(num_imgs,strUniform, sSn,currentTime);
if (img_resp->code != 0) {
qInfo()<<"不加图片推送未穿工服人数失败";
}
instace.deleteObj(img_resp);
}
} }
instace.deleteObj(resp); instace.deleteObj(resp);
} }
......
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