This is an example of how to use the Event_<T> class.
#include <iostream>
int main(int argc, const char *argv[]) {
std::cout << "e1: " << e1 << std::endl;
std::cout << "e2: " << e2 << std::endl;
std::cout <<
"Distance between e1 and e2 = " << e1.
distance(e2) << std::endl;
std::cout << "e1 is inside rect?: " << (rect.contains(e1) ? "yes" : "no") << std::endl;
std::cout << "e2 is inside rect?: " << (rect.contains(e2) ? "yes" : "no") << std::endl;
return 0;
}
This class extends cv::Point_<T> for event data. For more information, please refer here.
Definition types.hpp:60
double distance(const Event_< T > &e, const uint8_t type=DISTANCE_NORM_L2|DISTANCE_FLAG_SPATIAL) const
Definition types.hpp:184
Include all the OpenEV modules.
Rect2 Rect
Definition types.hpp:415