Mercurial Hosting > traffic-intelligence
view c/test_graph.cpp @ 199:ca9d9104afba
added utility to calibrate polynoms and plot
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Mon, 20 Feb 2012 19:32:27 -0500 |
parents | aeab0b88c9b6 |
children | 0a27fa343257 |
line wrap: on
line source
#include "Motion.hpp" #include "testutils.hpp" #include "opencv2/core/core.hpp" #include <boost/test/unit_test.hpp> #include <boost/test/floating_point_comparison.hpp> using namespace std; using namespace cv; BOOST_AUTO_TEST_SUITE(test_graph) BOOST_AUTO_TEST_CASE(graph_add_delete) { FeatureGraph featureGraph(5, 1, 5, 1.); FeatureTrajectoryPtr ft1 = createFeatureTrajectory(10, 20, Point2f(1,1), Point2f(0.5, 0.)); FeatureTrajectoryPtr ft2 = createFeatureTrajectory(10, 20, Point2f(1.1,1), Point2f(0.5, 0.)); featureGraph.addFeature(ft1); BOOST_CHECK_EQUAL(featureGraph.getNVertices(), 1); BOOST_CHECK_EQUAL(featureGraph.getNEdges(), 0); // featureGraph.addFeature(ft2); // BOOST_CHECK_EQUAL(featureGraph.getNVertices(), 2); // BOOST_CHECK_EQUAL(featureGraph.getNEdges(), 1); } BOOST_AUTO_TEST_SUITE_END()