Merge branch 2.4

This commit is contained in:
Andrey Kamaev
2012-12-24 17:10:07 +04:00
20 changed files with 67 additions and 40 deletions

View File

@@ -767,8 +767,8 @@ void ChamferMatcher::Matching::findContourOrientations(const template_coords_t&
}
// get the middle two angles
nth_element(angles.begin(), angles.begin()+M-1, angles.end());
nth_element(angles.begin()+M-1, angles.begin()+M, angles.end());
std::nth_element(angles.begin(), angles.begin()+M-1, angles.end());
std::nth_element(angles.begin()+M-1, angles.begin()+M, angles.end());
// sort(angles.begin(), angles.end());
// average them to compute tangent

View File

@@ -85,7 +85,7 @@ namespace
};
size_t colors_mum = sizeof(colors)/sizeof(colors[0]);
#if defined __cplusplus && __cplusplus > 199711L
#if (defined __cplusplus && __cplusplus > 199711L) || defined _STLPORT_MAJOR
#else
template<class FwIt, class T> void iota(FwIt first, FwIt last, T value) { while(first != last) *first++ = value++; }
#endif