Subversion Repositories seema-scanner

Rev

Rev 176 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 176 Rev 196
1
#ifndef CVTOOLS_H
1
#ifndef CVTOOLS_H
2
#define CVTOOLS_H
2
#define CVTOOLS_H
3
 
3
 
4
#include <opencv2/opencv.hpp>
4
#include <opencv2/opencv.hpp>
5
 
5
 
6
namespace cvtools{
6
namespace cvtools{
7
    void cvtColorBGRToBayerBG(const cv::Mat &imBGR, cv::Mat &imBayerBG);
7
    void cvtColorBGRToBayerBG(const cv::Mat &imBGR, cv::Mat &imBayerBG);
8
    void removeIncorrectMatches(const cv::Mat F, const std::vector<cv::Point2f> &q0, const std::vector<cv::Point2f> &q1, const float maxD,
8
    void removeIncorrectMatches(const cv::Mat F, const std::vector<cv::Point2f> &q0, const std::vector<cv::Point2f> &q1, const float maxD,
9
                                    std::vector<cv::Point2f> q0Correct, std::vector<cv::Point2f> q1Correct);
9
                                    std::vector<cv::Point2f> q0Correct, std::vector<cv::Point2f> q1Correct);
10
    void rshift(cv::Mat& I, unsigned int shift);
10
    void rshift(cv::Mat& I, unsigned int shift);
11
    void drawChessboardCorners(cv::InputOutputArray _image, cv::Size patternSize, cv::InputArray _corners, bool patternWasFound, int line_width=1);
11
    void drawChessboardCorners(cv::InputOutputArray _image, cv::Size patternSize, cv::InputArray _corners, bool patternWasFound, int line_width=1);
12
    void cvDrawChessboardCorners(CvArr* _image, CvSize pattern_size, CvPoint2D32f* corners, int count, int found, int line_width=1);
12
    void cvDrawChessboardCorners(CvArr* _image, CvSize pattern_size, CvPoint2D32f* corners, int count, int found, int line_width=1);
13
    cv::Mat modulo(const cv::Mat &mat, float n);
13
    cv::Mat modulo(const cv::Mat &mat, float n);
14
    void matToPoints3f(const cv::Mat &mat, std::vector<cv::Point3f> &points);
14
    void matToPoints3f(const cv::Mat &mat, std::vector<cv::Point3f> &points);
15
    void convertMatFromHomogeneous(cv::Mat &src, cv::Mat &dst);
15
    void convertMatFromHomogeneous(cv::Mat &src, cv::Mat &dst);
16
    void handEyeCalibrationTsai(const std::vector<cv::Matx33f> R, const std::vector<cv::Vec3f> t, const std::vector<cv::Matx33f> R_mark, const std::vector<cv::Vec3f> t_mark, cv::Matx33f &Omega, cv::Vec3f &tau);
16
    void handEyeCalibrationTsai(const std::vector<cv::Matx33f> R, const std::vector<cv::Vec3f> t, const std::vector<cv::Matx33f> R_mark, const std::vector<cv::Vec3f> t_mark, cv::Matx33f &Omega, cv::Vec3f &tau);
17
    void rotationAxisCalibration(const std::vector< std::vector<cv::Point3f> > Qcam, const std::vector<cv::Point3f> Qobj, cv::Vec3f &axis, cv::Vec3f &point, float &error);
-
 
18
    void fitSixDofData(const std::vector<cv::Matx33f> R, const std::vector<cv::Vec3f> t, const std::vector<cv::Matx33f> R_mark, const std::vector<cv::Vec3f> t_mark, cv::Matx33f &Omega, cv::Vec3f &tau);
17
    void fitSixDofData(const std::vector<cv::Matx33f> R, const std::vector<cv::Vec3f> t, const std::vector<cv::Matx33f> R_mark, const std::vector<cv::Vec3f> t_mark, cv::Matx33f &Omega, cv::Vec3f &tau);
19
    void initDistortMap(const cv::Matx33f cameraMatrix, const cv::Vec<float, 5> distCoeffs, const cv::Size size, cv::Mat &map1, cv::Mat &map2);
18
    void initDistortMap(const cv::Matx33f cameraMatrix, const cv::Vec<float, 5> distCoeffs, const cv::Size size, cv::Mat &map1, cv::Mat &map2);
20
    cv::Mat diamondDownsample(cv::Mat &pattern);
19
    cv::Mat diamondDownsample(cv::Mat &pattern);
21
    void imshow(const char *windowName, cv::Mat im, unsigned int x, unsigned int y);
20
    void imshow(const char *windowName, cv::Mat im, unsigned int x, unsigned int y);
22
    void imagesc(const char* windowName, cv::Mat im);
21
    void imagesc(const char* windowName, cv::Mat im);
23
    cv::Mat histimage(cv::Mat histogram);
22
    cv::Mat histimage(cv::Mat histogram);
24
    void hist(const char *windowName, cv::Mat im, unsigned int x, unsigned int y);
23
    void hist(const char *windowName, cv::Mat im, unsigned int x, unsigned int y);
25
    void writeMat( cv::Mat const& mat, const char* filename, const char* varName = "A", bool bgr2rgb = true);
24
    void writeMat( cv::Mat const& mat, const char* filename, const char* varName = "A", bool bgr2rgb = true);
26
}
25
}
27
 
26
 
28
#endif // CVTOOLS_H
27
#endif // CVTOOLS_H
29
 
28