7 #ifndef IMPEM2D_OPENCV_INTERFACE_H
8 #define IMPEM2D_OPENCV_INTERFACE_H
10 #include "IMP/em2d/em2d_config.h"
13 #if IMP_EM2D_HAS_OPENCV22
14 #include "opencv2/core/core.hpp"
15 #include "opencv2/core/version.hpp"
16 #include "opencv2/imgproc/imgproc.hpp"
17 #include "opencv2/highgui/highgui.hpp"
19 #include "opencv/cv.h"
20 #include "opencv/highgui.h"
25 IMPEM2D_BEGIN_NAMESPACE
27 typedef cv::Mat_<double> cvDoubleMat;
28 typedef cv::MatIterator_<double> cvDoubleMatIterator;
29 typedef cv::MatConstIterator_<double> cvDoubleConstMatIterator;
31 typedef cv::Mat_<int> cvIntMat;
32 typedef cv::MatIterator_<int> cvIntMatIterator;
34 typedef cv::Point_<int> cvPixel;
35 typedef std::vector< cvPixel > cvPixels;
39 IMPEM2DEXPORT
void show(
const cv::Mat &m,std::ostream &out = std::cout);
42 IMPEM2DEXPORT
void write_matrix(cv::Mat &m,std::string name);
47 void show(
const cv::Mat_<T> &m,std::ostream &out = std::cout) {
48 for (
int i=0;i<m.rows;++i) {
49 for (
int j=0;j<m.cols;++j) {