Commit 09286322 authored by Vlad Shakhuro's avatar Vlad Shakhuro

Add namespaces

parent 5992dedf
......@@ -44,8 +44,8 @@ the use of this software, even if advised of the possibility of such damage.
#include "precomp.hpp"
using namespace std;
using namespace cv;
namespace cv {
namespace xobjdetect {
float calcNormFactor( const Mat& sum, const Mat& sqSum )
{
......@@ -63,9 +63,9 @@ float calcNormFactor( const Mat& sum, const Mat& sqSum )
CvParams::CvParams() : name( "params" ) {}
void CvParams::printDefaults() const
{ cout << "--" << name << "--" << endl; }
{ std::cout << "--" << name << "--" << std::endl; }
void CvParams::printAttrs() const {}
bool CvParams::scanAttr( const string, const string ) { return false; }
bool CvParams::scanAttr( const std::string, const std::string ) { return false; }
//---------------------------- FeatureParams --------------------------------------
......@@ -126,3 +126,6 @@ Ptr<CvFeatureEvaluator> CvFeatureEvaluator::create()
{
return Ptr<CvFeatureEvaluator>(new CvLBPEvaluator);
}
}
}
......@@ -45,7 +45,8 @@ the use of this software, even if advised of the possibility of such damage.
#include "precomp.hpp"
using namespace cv;
namespace cv {
namespace xobjdetect {
CvLBPFeatureParams::CvLBPFeatureParams()
{
......@@ -122,3 +123,6 @@ void CvLBPEvaluator::Feature::write(FileStorage &fs) const
{
fs << CC_RECT << "[:" << rect.x << rect.y << rect.width << rect.height << "]";
}
}
}
......@@ -49,6 +49,10 @@ the use of this software, even if advised of the possibility of such damage.
#define LBPF_NAME "lbpFeatureParams"
namespace cv {
namespace xobjdetect {
struct CvLBPFeatureParams : CvFeatureParams
{
CvLBPFeatureParams();
......@@ -106,4 +110,7 @@ inline uchar CvLBPEvaluator::Feature::calc(const cv::Mat &_sum)
(psum[p[4]] - psum[p[5]] - psum[p[8]] + psum[p[9]] >= cval ? 1 : 0)); // 3
}
}
}
#endif
......@@ -70,6 +70,9 @@ the use of this software, even if advised of the possibility of such damage.
(p3) = (rect).x + (rect).width - (rect).height \
+ (step) * ((rect).y + (rect).width + (rect).height);
namespace cv {
namespace xobjdetect {
float calcNormFactor( const cv::Mat& sum, const cv::Mat& sqSum );
template<class Feature>
......@@ -142,4 +145,7 @@ protected:
cv::Mat cls;
};
}
}
#endif
......@@ -44,8 +44,8 @@ the use of this software, even if advised of the possibility of such damage.
#include "precomp.hpp"
namespace cv
{
namespace cv {
namespace xobjdetect {
static void compute_cdf(const Mat1b& data,
const Mat1f& weights,
......@@ -395,4 +395,5 @@ WaldBoost::~WaldBoost()
{
}
};
}
}
......@@ -48,6 +48,7 @@ the use of this software, even if advised of the possibility of such damage.
#include "precomp.hpp"
namespace cv {
namespace xobjdetect {
class WaldBoost {
public:
......@@ -83,6 +84,7 @@ private:
std::vector<float> cascade_thresholds_;
};
}
}
#endif
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