Mercurial > hg > nsaunier > traffic-intelligence
view include/testutils.hpp @ 398:3399bd48cb40
Ajout d'une méthode pour obtenir le nombre de FPS
Méthode de capture des trames vidéos plus résistante aux erreur
Utilisation d'un dictionnaire pour les fichier de configuration afin de garder le nom des sections
| author | Jean-Philippe Jodoin <jpjodoin@gmail.com> |
|---|---|
| date | Mon, 29 Jul 2013 13:46:07 -0400 |
| parents | f7ddfc4aeb1e |
| children | 045d05cef9d0 |
line wrap: on
line source
#ifndef TEST_UTILS_HPP #define TEST_UTILS_HPP #include "Motion.hpp" #include "opencv2/core/core.hpp" #include <boost/shared_ptr.hpp> inline boost::shared_ptr<FeatureTrajectory> createFeatureTrajectory(const unsigned int& id, const unsigned int& firstInstant, const unsigned int& lastInstant, const cv::Point2f& firstPosition, const cv::Point2f& velocity) { cv::Mat emptyHomography; boost::shared_ptr<FeatureTrajectory> t = boost::shared_ptr<FeatureTrajectory>(new FeatureTrajectory(firstInstant, firstPosition, emptyHomography)); cv::Point2f p = firstPosition; for (unsigned int i=firstInstant+1; i<=lastInstant; ++i) { p = p+velocity; t->addPoint(i, p, emptyHomography); } t->setId(id); return t; } #endif
