This is an example of how to use the Event_<T> class.
#include <iostream>
int main(int , const char * []) {
std::cout << "e1: " << e1 << '\n';
std::cout << "e2: " << e2 << '\n';
std::cout <<
"Distance between e1 and e2 = " << e1.
distance(e2) <<
'\n';
std::cout << "e1 is inside rect?: " << (rect.contains(e1) ? "yes" : "no") << '\n';
std::cout << "e2 is inside rect?: " << (rect.contains(e2) ? "yes" : "no") << '\n';
return 0;
}
double distance(const Event_< T > &e, const uint8_t type=DISTANCE_NORM_L2|DISTANCE_FLAG_SPATIAL) const
Definition types.hpp:186
Basic event-based vision structures based on OpenCV components.
constexpr bool POSITIVE
Definition types.hpp:27
Rect2 Rect
Definition types.hpp:417
constexpr bool NEGATIVE
Definition types.hpp:28
Eventi Event
Definition types.hpp:244