Mercurial > hg > nsaunier > traffic-intelligence
comparison c/feature-based-tracking.cpp @ 363:68861b52a319
added message if mask not found/loaded
| author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
|---|---|
| date | Fri, 12 Jul 2013 01:26:22 -0400 |
| parents | f21ef87f98f1 |
| children | 03dbecd3a887 |
comparison
equal
deleted
inserted
replaced
| 362:cc8e54997d4c | 363:68861b52a319 |
|---|---|
| 99 // cout << "capture device " << argv[1] << " failed to open!" << endl; | 99 // cout << "capture device " << argv[1] << " failed to open!" << endl; |
| 100 // return 1; | 100 // return 1; |
| 101 // } | 101 // } |
| 102 | 102 |
| 103 Mat mask = imread(params.maskFilename, 0); | 103 Mat mask = imread(params.maskFilename, 0); |
| 104 if (mask.empty()) | 104 if (mask.empty()) { |
| 105 cout << "Mask filename " << params.maskFilename << " could not be opened." << endl; | |
| 105 mask = Mat::ones(videoSize, CV_8UC1); | 106 mask = Mat::ones(videoSize, CV_8UC1); |
| 107 } | |
| 106 | 108 |
| 107 boost::shared_ptr<TrajectoryDBAccess<Point2f> > trajectoryDB = boost::shared_ptr<TrajectoryDBAccess<Point2f> >(new TrajectoryDBAccessList<Point2f>()); | 109 boost::shared_ptr<TrajectoryDBAccess<Point2f> > trajectoryDB = boost::shared_ptr<TrajectoryDBAccess<Point2f> >(new TrajectoryDBAccessList<Point2f>()); |
| 108 //TrajectoryDBAccess<Point2f>* trajectoryDB = new TrajectoryDBAccessBlob<Point2f>(); | 110 //TrajectoryDBAccess<Point2f>* trajectoryDB = new TrajectoryDBAccessBlob<Point2f>(); |
| 109 trajectoryDB->connect(params.databaseFilename.c_str()); | 111 trajectoryDB->connect(params.databaseFilename.c_str()); |
| 110 trajectoryDB->createTable("positions"); | 112 trajectoryDB->createTable("positions"); |
