Commit 03bd8279 authored by Anatoly Baksheev's avatar Anatoly Baksheev

source compatibility with master

parent 56754e90
...@@ -291,7 +291,11 @@ void cv::viz::writeTrajectory(InputArray _traj, const String& files_format, int ...@@ -291,7 +291,11 @@ void cv::viz::writeTrajectory(InputArray _traj, const String& files_format, int
{ {
if (_traj.kind() == _InputArray::STD_VECTOR_MAT) if (_traj.kind() == _InputArray::STD_VECTOR_MAT)
{ {
#if CV_MAJOR_VERSION < 3
std::vector<Mat>& v = *(std::vector<Mat>*)_traj.obj; std::vector<Mat>& v = *(std::vector<Mat>*)_traj.obj;
#else
std::vector<Mat>& v = *(std::vector<Mat>*)_traj.getObj();
#endif
for(size_t i = 0, index = max(0, start); i < v.size(); ++i, ++index) for(size_t i = 0, index = max(0, start); i < v.size(); ++i, ++index)
{ {
...@@ -317,6 +321,7 @@ void cv::viz::writeTrajectory(InputArray _traj, const String& files_format, int ...@@ -317,6 +321,7 @@ void cv::viz::writeTrajectory(InputArray _traj, const String& files_format, int
if (traj.depth() == CV_64F) if (traj.depth() == CV_64F)
for(size_t i = 0, index = max(0, start); i < traj.total(); ++i, ++index) for(size_t i = 0, index = max(0, start); i < traj.total(); ++i, ++index)
writePose(cv::format(files_format.c_str(), index), traj.at<Affine3d>((int)i), tag); writePose(cv::format(files_format.c_str(), index), traj.at<Affine3d>((int)i), tag);
return;
} }
CV_Assert(!"Unsupported array kind"); CV_Assert(!"Unsupported array kind");
......
...@@ -54,12 +54,20 @@ ...@@ -54,12 +54,20 @@
#ifndef __OPENCV_TEST_PRECOMP_HPP__ #ifndef __OPENCV_TEST_PRECOMP_HPP__
#define __OPENCV_TEST_PRECOMP_HPP__ #define __OPENCV_TEST_PRECOMP_HPP__
#include "opencv2/ts/ts.hpp" #include <opencv2/core/version.hpp>
#include <opencv2/core/core.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/viz/vizcore.hpp> #include <opencv2/viz/vizcore.hpp>
namespace cv
{
Mat imread(const String& filename, int flags = 1);
}
#if CV_MAJOR_VERSION < 3
#include "opencv2/ts/ts.hpp"
#else
#include "opencv2/ts.hpp"
#endif
#include <iostream> #include <iostream>
#include <fstream> #include <fstream>
#include <string> #include <string>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment