1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 15:53:03 +04:00

Merge pull request #15735 from anton-potapov:gapi_async_documentaion

* G-API: Doxygen documentatation for Async API

* G-API: Doxygen documentatation for Async API

 - renamed local variable (reading parameter async) async ->
asyncNumReq in object_detection DNN sample
to avoid Doxygen erroneous linking the sample to cv::gapi::wip::async
documentation
This commit is contained in:
anton-potapov
2019-10-21 22:33:18 +03:00
committed by Alexander Alekhin
parent 613c12e590
commit 471b40040a
4 changed files with 97 additions and 21 deletions
+5 -5
View File
@@ -127,7 +127,7 @@ int main(int argc, char** argv)
bool swapRB = parser.get<bool>("rgb");
int inpWidth = parser.get<int>("width");
int inpHeight = parser.get<int>("height");
size_t async = parser.get<int>("async");
size_t asyncNumReq = parser.get<int>("async");
CV_Assert(parser.has("model"));
std::string modelPath = findFile(parser.get<String>("model"));
std::string configPath = findFile(parser.get<String>("config"));
@@ -196,9 +196,9 @@ int main(int argc, char** argv)
if (!framesQueue.empty())
{
frame = framesQueue.get();
if (async)
if (asyncNumReq)
{
if (futureOutputs.size() == async)
if (futureOutputs.size() == asyncNumReq)
frame = Mat();
}
else
@@ -212,7 +212,7 @@ int main(int argc, char** argv)
preprocess(frame, net, Size(inpWidth, inpHeight), scale, mean, swapRB);
processedFramesQueue.push(frame);
if (async)
if (asyncNumReq)
{
futureOutputs.push(net.forwardAsync());
}
@@ -266,7 +266,7 @@ int main(int argc, char** argv)
processingThread.join();
#else // CV_CXX11
if (async)
if (asyncNumReq)
CV_Error(Error::StsNotImplemented, "Asynchronous forward is supported only with Inference Engine backend.");
// Process frames.