1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 07:43:03 +04:00

Viz initial backport, compilation fixes, moved viz/viz.hpp header according to 2.4 style

This commit is contained in:
Anatoly Baksheev
2014-01-19 03:16:06 +04:00
parent 088535fa56
commit 02ebc4368c
62 changed files with 10455 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
#include "test_precomp.hpp"
cv::String cv::Path::combine(const String& item1, const String& item2)
{
if (item1.empty())
return item2;
if (item2.empty())
return item1;
char last = item1[item1.size()-1];
bool need_append = last != '/' && last != '\\';
return item1 + (need_append ? "/" : "") + item2;
}
cv::String cv::Path::combine(const String& item1, const String& item2, const String& item3)
{ return combine(combine(item1, item2), item3); }
cv::String cv::Path::change_extension(const String& file, const String& ext)
{
String::size_type pos = file.find_last_of('.');
return pos == String::npos ? file : file.substr(0, pos+1) + ext;
}