| 187 | double ActiveEventSurface::GetTimeLatest() const { return _timeLatest; } |
| 188 | |
| 189 | std::list<Event::Ptr> EventNormFlow::NormFlowPack::ActiveEvents(double dt) const { |
| 190 | std::list<Event::Ptr> events; |
| 191 | const int rows = rawTimeSurfaceMap.rows; |
| 192 | const int cols = rawTimeSurfaceMap.cols; |
| 193 | for (int ey = 0; ey < rows; ey++) { |
| 194 | for (int ex = 0; ex < cols; ex++) { |
| 195 | const auto &et = rawTimeSurfaceMap.at<double>(ey, ex); |
| 196 | // whether this pixel is assigned |
| 197 | if (et < 1E-3) { |
| 198 | continue; |
| 199 | } |
| 200 | // time range |
| 201 | if (dt > 0.0 && timestamp - et > dt) { |
| 202 | continue; |
| 203 | } |
| 204 | const auto &ep = polarityMap.at<uchar>(ey, ex); |
| 205 | events.push_back(Event::Create(et, {ex, ey}, ep)); |
| 206 | } |
| 207 | } |
| 208 | return events; |
| 209 | } |
| 210 | |
| 211 | std::list<Event::Ptr> EventNormFlow::NormFlowPack::NormFlowInlierEvents() const { |
| 212 | std::list<Event::Ptr> events; |
no test coverage detected