29 #ifndef CHROMATICMASK_H 30 #define CHROMATICMASK_H 32 #include <opencv2/core/core.hpp> 33 #include <opencv2/ml/ml.hpp> 34 #include <opencv2/calib3d/calib3d.hpp> 35 #include <opencv2/highgui/highgui.hpp> 36 #include <opencv2/imgproc/imgproc.hpp> 37 #include <opencv2/ml/ml.hpp> 51 double getProb(uchar s) {
return _prob[s]; };
53 void setProb(
double p) { _threshProb = p; }
58 #ifdef OPENCV_VERSION_3 59 cv::Ptr< cv::ml::EM > _classifier;
66 double _histogram[256];
77 vector< cv::Point3f > corners);
85 void train(
const cv::Mat &in,
const aruco::Board &board);
86 void classify(
const cv::Mat &in,
const aruco::Board &board);
87 void classify2(
const cv::Mat &in,
const aruco::Board &board);
88 void update(
const cv::Mat &in);
94 double getDistance(cv::Point2d pixel,
unsigned int classifier) {
95 cv::Vec2b canPos = _canonicalPos.at< cv::Vec2b >(pixel.y, pixel.x)[0];
96 return norm(_cellCenters[classifier] - cv::Point2f(canPos[0], canPos[1]));
118 #endif // CHROMATICMASK_H
vector< EMClassifier > _classifiers
double getDistance(cv::Point2d pixel, unsigned int classifier)
vector< cv::Point2f > _pixelsVector
void update(const std::string &key, const XmlRpc::XmlRpcValue &v)
vector< cv::Point3f > _objCornerPoints
vector< cv::Point2f > _cellCenters
This class detects AR boards Version 1.2 There are two modes for board detection. First...
vector< cv::Point2f > _imgCornerPoints
unsigned int numsamples()
Parameters of the camera.
This class defines a board with several markers. A Board contains several markers so that they are mo...
vector< vector< size_t > > _cell_neighbours
aruco::CameraParameters _CP
vector< cv::Point2f > _centers