| | |
| | | appPref.getIntData("faceSear.port"), "tcp"), |
| | | // faceSearchRpcClient("faceCmServer", "", 10004, "tcp") |
| | | m_sdkRule(rule), |
| | | m_rpcClient("RtspAnalysServer", "127.0.0.1", appPref.getIntData("RpcServerPort"), "tcp") { |
| | | m_rpcClient("RtspAnalysServer", "127.0.0.1", appPref.getIntData("RpcVTIMPort"), "tcp") { |
| | | sharedMemory = new QSharedMemory(QString(shareMemoryName.c_str())); |
| | | if (!sharedMemory->create(4608 * 2592 * 4)) { |
| | | sharedMemory->attach(); |
| | |
| | | void FaceExtractElement::submitFaceExtract(FaceToExtract faceToExtract) { |
| | | std::lock_guard<std::mutex> lg(imageQueueMutex); |
| | | if (faceExtractQueue.size() >= VECTOR_MAX) { |
| | | ERR("FaceExtractElement::submitFaceExtract too fast, imageQueue.size()>=QUEUE_MAX") |
| | | ERR("FaceExtractElement::submitFaceExtract too fast, imageQueue.size()>=QUEUE_MAX : " << faceExtractQueue.size()) |
| | | return; |
| | | } |
| | | faceExtractQueue.push_back(faceToExtract); |
| | |
| | | |
| | | unsigned long size = faceExtractQueueTmp[i].facesPos.size(); |
| | | for (int j = 0; j < size; j++) { |
| | | auto feature = extractServer->faceExtract(image.cols, image.rows, faceExtractQueueTmp[i].facesPos[j], |
| | | sharedMemory->key().toStdString()); |
| | | // { |
| | | // //#todo |
| | | // string string1( |
| | | // AppUtil::getTimeString() + "-ff3" + faceExtractQueueTmp[i].scoredRects[j].properties["time"] + |
| | | // ".jpg"); |
| | | // DBG("save Image:" << string1); |
| | | // cv::imwrite(string1, image); |
| | | // } |
| | | |
| | | auto feature = extractServer->faceExtract(image.cols, image.rows, faceExtractQueueTmp[i].facesPos[j], |
| | | sharedMemory->key().toStdString()); |
| | | |
| | | |
| | | if (feature.empty()) { |
| | | INFO("No Face Find: " << getProperty("imgKey")); |
| | | continue; |