Commit 43061d75 authored by Vlad Shakhuro's avatar Vlad Shakhuro

Add cv::adas namespace

parent b33977d9
......@@ -42,6 +42,11 @@ the use of this software, even if advised of the possibility of such damage.
#ifndef __OPENCV_ADAS_ACFFEATURE_HPP__
#define __OPENCV_ADAS_ACFFEATURE_HPP__
namespace cv
{
namespace adas
{
class ACFFeature
{
public:
......@@ -59,9 +64,9 @@ private:
};
/* Save ACFFeature to FileStorage */
cv::FileStorage& operator<< (cv::FileStorage& out, const ACFFeature& feature);
FileStorage& operator<< (FileStorage& out, const ACFFeature& feature);
/* Load ACFFeature from FileStorage */
cv::FileStorage& operator>> (cv::FileStorage& in, ACFFeature& feature);
FileStorage& operator>> (FileStorage& in, ACFFeature& feature);
/* Compute channel pyramid for acf features
......@@ -73,8 +78,8 @@ Returns computed channels in vectors N x CH,
N — number of scales (outer vector),
CH — number of channels (inner vectors)
*/
std::vector<std::vector<cv::Mat_<int>>>
computeChannels(const cv::Mat& image, const ScaleParams& params);
std::vector<std::vector<Mat_<int>>>
computeChannels(const Mat& image, const ScaleParams& params);
class ACFFeatureEvaluator
{
......@@ -83,7 +88,7 @@ public:
ACFFeatureEvaluator(const std::vector<ACFFeature>& features);
/* Set channels for feature evaluation */
void setChannels(const std::vector<cv::Mat_<int>>& channels);
void setChannels(const std::vector<Mat_<int>>& channels);
/* Set window position */
void setPosition(Size position);
......@@ -96,13 +101,13 @@ public:
Returns matrix-column of features
*/
cv::Mat_<int> evaluateAll() const;
Mat_<int> evaluateAll() const;
private:
/* Features to evaluate */
std::vector<ACFFeature> features_;
/* Channels for feature evaluation */
std::vector<cv::Mat_<int>> channels
std::vector<Mat_<int>> channels
/* Channels window position */
Size position_;
};
......@@ -121,4 +126,7 @@ Returns vector of distinct acf features
std::vector<ACFFeature>
generateFeatures(Size window_size, size_t count = UINT_MAX, int seed = 0);
} /* namespace adas */
} /* namespace cv */
#endif /* __OPENCV_ADAS_ACFFEATURE_HPP__ */
......@@ -42,6 +42,11 @@ the use of this software, even if advised of the possibility of such damage.
#ifndef __OPENCV_ADAS_ICFDETECTOR_HPP__
#define __OPENCV_ADAS_ICFDETECTOR_HPP__
namespace cv
{
namespace adas
{
class ICFDetector
{
public:
......@@ -94,4 +99,7 @@ public:
bool save(const std::string& filename);
};
} /* namespace adas */
} /* namespace cv */
#endif /* __OPENCV_ADAS_ICFDETECTOR_HPP__ */
......@@ -42,6 +42,11 @@ the use of this software, even if advised of the possibility of such damage.
#ifndef __OPENCV_ADAS_WALDBOOST_HPP__
#define __OPENCV_ADAS_WALDBOOST_HPP__
namespace cv
{
namespace adas
{
class Stump
{
public:
......@@ -54,7 +59,7 @@ public:
Returns chosen feature index. Feature enumeration starts from 0
*/
int train(const cv::Mat_<int>& data, const cv::Mat_<int>& labels);
int train(const Mat_<int>& data, const Mat_<int>& labels);
/* Predict object class given
......@@ -76,9 +81,9 @@ private:
};
/* Save Stump to FileStorage */
cv::FileStorage& operator<< (cv::FileStorage& out, const Stump& classifier);
FileStorage& operator<< (FileStorage& out, const Stump& classifier);
/* Load Stump from FileStorage */
cv::FileStorage& operator>> (cv::FileStorage& in, Stump& classifier);
FileStorage& operator>> (FileStorage& in, Stump& classifier);
class WaldBoost
{
......@@ -96,8 +101,8 @@ public:
Returns feature indices chosen for cascade.
Feature enumeration starts from 0
*/
std::vector<int> train(const cv::Mat_<int>& data,
const cv::Mat_<int>& labels);
std::vector<int> train(const Mat_<int>& data,
const Mat_<int>& labels);
/* Predict object class given object that can compute object features
......@@ -120,8 +125,11 @@ private:
};
/* Save WaldBoost to FileStorage */
cv::FileStorage& operator<< (cv::FileStorage& out, const WaldBoost& classifier);
FileStorage& operator<< (FileStorage& out, const WaldBoost& classifier);
/* Load WaldBoost from FileStorage */
cv::FileStorage& operator>> (cv::FileStorage& in, WaldBoost& classifier);
FileStorage& operator>> (FileStorage& in, WaldBoost& classifier);
} /* namespace adas */
} /* namespace cv */
#endif /* __OPENCV_ADAS_WALDBOOST_HPP__ */
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