Commit e305d904 by guof

Merge branch 'feature-1007479' into 'release'

修改人体为人形

See merge request !27
parents d90cfbbe 4685a514
...@@ -100,7 +100,7 @@ int HumanDetection::findHuManCar(const cv::Mat &source, int res,std::map<int,int ...@@ -100,7 +100,7 @@ int HumanDetection::findHuManCar(const cv::Mat &source, int res,std::map<int,int
if (res == 0x00 || res == 0x02) { if (res == 0x00 || res == 0x02) {
num = TCV_HumanDetectorGetNumOfHuman(detector); num = TCV_HumanDetectorGetNumOfHuman(detector);
qInfo() << QString("SN(%1): 获取人数量:%2").arg(sSn).arg(num); qInfo() << QString("SN(%1): 获取人数量:%2").arg(sSn).arg(num);
if (num == 0) return num; // 无行人检测结果,提前返回 if (num == 0) return num; // 无行人检测结果,提前返回
std::vector<TCV_ObjectLocation> results(num); std::vector<TCV_ObjectLocation> results(num);
TCV_HumanDetectorGetHumanLocation(detector, results.data(), num); TCV_HumanDetectorGetHumanLocation(detector, results.data(), num);
......
...@@ -238,7 +238,7 @@ int MediaFaceImage::FaceImageCallBack(XSDK_HANDLE hMedia, int nChannel, cv::Mat ...@@ -238,7 +238,7 @@ int MediaFaceImage::FaceImageCallBack(XSDK_HANDLE hMedia, int nChannel, cv::Mat
int ret = XSDK_DevSnapSyn(hMedia, nChannel, "", pOutBuffer.get(), &pInOutBufferSize); int ret = XSDK_DevSnapSyn(hMedia, nChannel, "", pOutBuffer.get(), &pInOutBufferSize);
if (ret < 0 || pInOutBufferSize <= 0) { if (ret < 0 || pInOutBufferSize <= 0) {
qInfo() <<sSn <<":同步设备端抓图失败"; qInfo() << QString("SN(%1): 同步设备端抓图失败").arg(sSn);;
return -1; return -1;
} }
...@@ -249,12 +249,12 @@ int MediaFaceImage::FaceImageCallBack(XSDK_HANDLE hMedia, int nChannel, cv::Mat ...@@ -249,12 +249,12 @@ int MediaFaceImage::FaceImageCallBack(XSDK_HANDLE hMedia, int nChannel, cv::Mat
try { try {
cv::Mat decodedImage = cv::imdecode(buffer, cv::IMREAD_UNCHANGED); cv::Mat decodedImage = cv::imdecode(buffer, cv::IMREAD_UNCHANGED);
if (decodedImage.empty()) { if (decodedImage.empty()) {
qInfo() << sSn<<":图像解码失败"; qInfo() << QString("SN(%1): 图像解码失败").arg(sSn);;
return -1; return -1;
} }
image = std::move(decodedImage); image = std::move(decodedImage);
} catch (const cv::Exception& e) { } catch (const cv::Exception& e) {
qInfo() << sSn<<":图像解码过程中捕获异常:" << e.what(); qInfo() << QString("SN(%1): 图像解码过程中捕获异常:%2").arg(sSn).arg(e.what());
return -1; return -1;
} }
......
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