\brief VideoExample::Detection \param frame \param regions
| 469 | /// \param regions |
| 470 | /// |
| 471 | void VideoExample::Detection(FrameInfo& frame) |
| 472 | { |
| 473 | if (m_trackerSettings.m_useAbandonedDetection) |
| 474 | { |
| 475 | for (const auto& track : m_tracks) |
| 476 | { |
| 477 | if (track.m_isStatic) |
| 478 | m_detector->ResetModel(frame.m_frames[0].GetUMatBGR(), track.m_rrect.boundingRect()); |
| 479 | } |
| 480 | } |
| 481 | |
| 482 | std::vector<cv::UMat> frames; |
| 483 | for (size_t i = 0; i < frame.m_frames.size(); ++i) |
| 484 | { |
| 485 | if (m_detector->CanGrayProcessing()) |
| 486 | frames.emplace_back(frame.m_frames[i].GetUMatGray()); |
| 487 | else |
| 488 | frames.emplace_back(frame.m_frames[i].GetUMatBGR()); |
| 489 | } |
| 490 | frame.CleanRegions(); |
| 491 | m_detector->Detect(frames, frame.m_regions); |
| 492 | } |
| 493 | |
| 494 | /// |
| 495 | /// \brief VideoExample::Tracking |
no test coverage detected