MCPcopy Create free account
hub / github.com/Smorodov/Multitarget-tracker / CheckLinesIntersection

Method CheckLinesIntersection

example/CarsCounting.cpp:345–360  ·  view source on GitHub ↗

\brief CarsCounting::CheckLinesIntersection \param track

Source from the content-addressed store, hash-verified

343/// \param track
344///
345void CarsCounting::CheckLinesIntersection(const TrackingObject& track, float xMax, float yMax)
346{
347 auto Pti2f = [&](cv::Point pt)
348 {
349 return cv::Point2f(pt.x / xMax, pt.y / yMax);
350 };
351
352 constexpr size_t minTrack = 5;
353 if (track.m_trace.size() >= minTrack)
354 {
355 for (auto& rl : m_lines)
356 {
357 rl.IsIntersect(track.m_ID, Pti2f(track.m_trace[track.m_trace.size() - minTrack]), Pti2f(track.m_trace[track.m_trace.size() - 1]));
358 }
359 }
360}
361
362///
363/// \brief CarsCounting::DrawHeatMap

Callers

nothing calls this directly

Calls 2

IsIntersectMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected