argument error
Upon executing the bash file "run" I am getting the following error. Kindly have a look.
jhmapoorva@inspiron-3558:/data/tools/binarization$ sh run g++ -c -m32 -pipe -g -I/usr/local/include/opencv -I/usr/local/include -lcv -lstdc++ -lcxcore -lcv -lhighgui -lcvaux -o main.o main.cpp main.cpp: In function ‘void executeClusteringAndBinarization(IplImage*, IplImage*, cv::Mat)’: main.cpp:181:32: error: no matching function for call to ‘cv::Mat::Mat(IplImage*&)’ cv::Mat contrast = cv::Mat(im); ^ In file included from /usr/local/include/opencv2/core.hpp:59:0, from /usr/local/include/opencv2/opencv.hpp:46, from main.cpp:7: /usr/local/include/opencv2/core/mat.hpp:925:14: note: candidate: cv::Mat::Mat(const cv::cuda::GpuMat&) explicit Mat(const cuda::GpuMat& m); ^ /usr/local/include/opencv2/core/mat.hpp:925:14: note: no known conversion for argument 1 from ‘IplImage* {aka _IplImage*}’ to ‘const cv::cuda::GpuMat&’ /usr/local/include/opencv2/core/mat.hpp:922:37: note: candidate: template<class Tp> cv::Mat::Mat(const cv::MatCommaInitializer<_Tp>&) template<typename Tp> explicit Mat(const MatCommaInitializer<Tp>& commaInitializer); ^ /usr/local/include/opencv2/core/mat.hpp:922:37: note: template argument deduction/substitution failed: main.cpp:181:32: note: mismatched types ‘const cv::MatCommaInitializer<_Tp>’ and ‘IplImage* {aka _IplImage*}’ cv::Mat contrast = cv::Mat(im); ^ In file included from /usr/local/include/opencv2/core.hpp:59:0, from /usr/local/include/opencv2/opencv.hpp:46, from main.cpp:7: /usr/local/include/opencv2/core/mat.hpp:918:37: note: candidate: template<class Tp> cv::Mat::Mat(const cv::Point3<_Tp>&, bool) template<typename Tp> explicit Mat(const Point3<Tp>& pt, bool copyData=true); ^ /usr/local/include/opencv2/core/mat.hpp:918:37: note: template argument deduction/substitution failed: main.cpp:181:32: note: mismatched types ‘const cv::Point3<_Tp>’ and ‘IplImage* {aka _IplImage*}’ cv::Mat contrast = cv::Mat(im); ^ In file included from /usr/local/include/opencv2/core.hpp:59:0, from /usr/local/include/opencv2/opencv.hpp:46, from main.cpp:7: /usr/local/include/opencv2/core/mat.hpp:914:37: note: candidate: template<class Tp> cv::Mat::Mat(const cv::Point<_Tp>&, bool) template<typename Tp> explicit Mat(const Point<Tp>& pt, bool copyData=true); ^ /usr/local/include/opencv2/core/mat.hpp:914:37: note: template argument deduction/substitution failed: main.cpp:181:32: note: mismatched types ‘const cv::Point<_Tp>’ and ‘IplImage* {aka _IplImage*}’ cv::Mat contrast = cv::Mat(im); ^ In file included from /usr/local/include/opencv2/core.hpp:59:0, from /usr/local/include/opencv2/opencv.hpp:46, from main.cpp:7: /usr/local/include/opencv2/core/mat.hpp:910:51: note: candidate: template<class _Tp, int m, int n> cv::Mat::Mat(const cv::Matx<_Tp, m, n>&, bool) template<typename _Tp, int m, int n> explicit Mat(const Matx<_Tp, m, n>& mtx, bool copyData=true); ^ /usr/local/include/opencv2/core/mat.hpp:910:51: note: template argument deduction/substitution failed: main.cpp:181:32: note: mismatched types ‘const cv::Matx<_Tp, m, n>’ and ‘IplImage* {aka _IplImage*}’ cv::Mat contrast = cv::Mat(im); ^ In file included from /usr/local/include/opencv2/core.hpp:59:0, from /usr/local/include/opencv2/opencv.hpp:46, from main.cpp:7: /usr/local/include/opencv2/core/mat.hpp:906:44: note: candidate: template<class _Tp, int n> cv::Mat::Mat(const cv::Vec<_Tp, m>&, bool) template<typename _Tp, int n> explicit Mat(const Vec<_Tp, n>& vec, bool copyData=true); ^ /usr/local/include/opencv2/core/mat.hpp:906:44: note: template argument deduction/substitution failed: main.cpp:181:32: note: mismatched types ‘const cv::Vec<_Tp, m>’ and ‘IplImage* {aka _IplImage*}’ cv::Mat contrast = cv::Mat(im); ^ In file included from /usr/local/include/opencv2/core.hpp:59:0, from /usr/local/include/opencv2/opencv.hpp:46, from main.cpp:7: /usr/local/include/opencv2/core/mat.hpp:902:37: note: candidate: template<class _Tp> cv::Mat::Mat(const std::vector<_Tp>&, bool) template<typename _Tp> explicit Mat(const std::vector<_Tp>& vec, bool copyData=false); ^ /usr/local/include/opencv2/core/mat.hpp:902:37: note: template argument deduction/substitution failed: main.cpp:181:32: note: mismatched types ‘const std::vector<_Tp>’ and ‘IplImage* {aka _IplImage*}’ cv::Mat contrast = cv::Mat(im); ^ In file included from /usr/local/include/opencv2/core.hpp:59:0, from /usr/local/include/opencv2/opencv.hpp:46, from main.cpp:7: /usr/local/include/opencv2/core/mat.hpp:884:5: note: candidate: cv::Mat::Mat(const cv::Mat&, const cv::Range*) Mat(const Mat& m, const Range* ranges); ^ /usr/local/include/opencv2/core/mat.hpp:884:5: note: candidate expects 2 arguments, 1 provided /usr/local/include/opencv2/core/mat.hpp:874:5: note: candidate: cv::Mat::Mat(const cv::Mat&, const Rect&) Mat(const Mat& m, const Rect& roi); ^ /usr/local/include/opencv2/core/mat.hpp:874:5: note: candidate expects 2 arguments, 1 provided /usr/local/include/opencv2/core/mat.hpp:864:5: note: candidate: cv::Mat::Mat(const cv::Mat&, const cv::Range&, const cv::Range&) Mat(const Mat& m, const Range& rowRange, const Range& colRange=Range::all()); ^ /usr/local/include/opencv2/core/mat.hpp:864:5: note: candidate expects 3 arguments, 1 provided /usr/local/include/opencv2/core/mat.hpp:852:5: note: candidate: cv::Mat::Mat(int, const int*, int, void*, const size_t*) Mat(int ndims, const int* sizes, int type, void* data, const size_t* steps=0); ^ /usr/local/include/opencv2/core/mat.hpp:852:5: note: candidate expects 5 arguments, 1 provided In file included from /usr/local/include/opencv2/core/mat.hpp:3396:0, from /usr/local/include/opencv2/core.hpp:59, from /usr/local/include/opencv2/opencv.hpp:46, from main.cpp:7: /usr/local/include/opencv2/core/mat.inl.hpp:425:1: note: candidate: cv::Mat::Mat(cv::Size, int, void*, size_t) Mat::Mat(Size _sz, int _type, void* _data, size_t _step) ^ /usr/local/include/opencv2/core/mat.inl.hpp:425:1: note: candidate expects 4 arguments, 1 provided /usr/local/include/opencv2/core/mat.inl.hpp:394:1: note: candidate: cv::Mat::Mat(int, int, int, void*, size_t) Mat::Mat(int _rows, int _cols, int _type, void* _data, size_t _step) ^ /usr/local/include/opencv2/core/mat.inl.hpp:394:1: note: candidate expects 5 arguments, 1 provided /usr/local/include/opencv2/core/mat.inl.hpp:375:1: note: candidate: cv::Mat::Mat(const cv::Mat&) Mat::Mat(const Mat& m) ^ /usr/local/include/opencv2/core/mat.inl.hpp:375:1: note: no known conversion for argument 1 from ‘IplImage* {aka _IplImage*}’ to ‘const cv::Mat&’ /usr/local/include/opencv2/core/mat.inl.hpp:366:1: note: candidate: cv::Mat::Mat(int, const int*, int, const Scalar&) Mat::Mat(int _dims, const int* _sz, int _type, const Scalar& _s) ^ /usr/local/include/opencv2/core/mat.inl.hpp:366:1: note: candidate expects 4 arguments, 1 provided /usr/local/include/opencv2/core/mat.inl.hpp:358:1: note: candidate: cv::Mat::Mat(int, const int*, int) Mat::Mat(int _dims, const int* _sz, int _type) ^ /usr/local/include/opencv2/core/mat.inl.hpp:358:1: note: candidate expects 3 arguments, 1 provided /usr/local/include/opencv2/core/mat.inl.hpp:349:1: note: candidate: cv::Mat::Mat(cv::Size, int, const Scalar&) Mat::Mat(Size _sz, int _type, const Scalar& _s) ^ /usr/local/include/opencv2/core/mat.inl.hpp:349:1: note: candidate expects 3 arguments, 1 provided /usr/local/include/opencv2/core/mat.inl.hpp:332:1: note: candidate: cv::Mat::Mat(int, int, int, const Scalar&) Mat::Mat(int _rows, int _cols, int _type, const Scalar& _s) ^ /usr/local/include/opencv2/core/mat.inl.hpp:332:1: note: candidate expects 4 arguments, 1 provided /usr/local/include/opencv2/core/mat.inl.hpp:341:1: note: candidate: cv::Mat::Mat(cv::Size, int) Mat::Mat(Size _sz, int _type) ^ /usr/local/include/opencv2/core/mat.inl.hpp:341:1: note: candidate expects 2 arguments, 1 provided /usr/local/include/opencv2/core/mat.inl.hpp:324:1: note: candidate: cv::Mat::Mat(int, int, int) Mat::Mat(int _rows, int _cols, int _type) ^ /usr/local/include/opencv2/core/mat.inl.hpp:324:1: note: candidate expects 3 arguments, 1 provided /usr/local/include/opencv2/core/mat.inl.hpp:318:1: note: candidate: cv::Mat::Mat() Mat::Mat() ^ /usr/local/include/opencv2/core/mat.inl.hpp:318:1: note: candidate expects 0 arguments, 1 provided main.cpp:182:28: error: no matching function for call to ‘cv::Mat::Mat(IplImage*&)’ cv::Mat gray = cv::Mat(gr); ^ In file included from /usr/local/include/opencv2/core.hpp:59:0, from /usr/local/include/opencv2/opencv.hpp:46, from main.cpp:7: /usr/local/include/opencv2/core/mat.hpp:925:14: note: candidate: cv::Mat::Mat(const cv::cuda::GpuMat&) explicit Mat(const cuda::GpuMat& m); ^ /usr/local/include/opencv2/core/mat.hpp:925:14: note: no known conversion for argument 1 from ‘IplImage* {aka _IplImage*}’ to ‘const cv::cuda::GpuMat&’ /usr/local/include/opencv2/core/mat.hpp:922:37: note: candidate: template<class Tp> cv::Mat::Mat(const cv::MatCommaInitializer<_Tp>&) template<typename Tp> explicit Mat(const MatCommaInitializer<Tp>& commaInitializer); ^ /usr/local/include/opencv2/core/mat.hpp:922:37: note: template argument deduction/substitution failed: main.cpp:182:28: note: mismatched types ‘const cv::MatCommaInitializer<_Tp>’ and ‘IplImage* {aka _IplImage*}’ cv::Mat gray = cv::Mat(gr); ^ In file included from /usr/local/include/opencv2/core.hpp:59:0, from /usr/local/include/opencv2/opencv.hpp:46, from main.cpp:7: /usr/local/include/opencv2/core/mat.hpp:918:37: note: candidate: template<class Tp> cv::Mat::Mat(const cv::Point3<_Tp>&, bool) template<typename Tp> explicit Mat(const Point3<Tp>& pt, bool copyData=true); ^ /usr/local/include/opencv2/core/mat.hpp:918:37: note: template argument deduction/substitution failed: main.cpp:182:28: note: mismatched types ‘const cv::Point3<_Tp>’ and ‘IplImage* {aka _IplImage*}’ cv::Mat gray = cv::Mat(gr); ^ In file included from /usr/local/include/opencv2/core.hpp:59:0, from /usr/local/include/opencv2/opencv.hpp:46, from main.cpp:7: /usr/local/include/opencv2/core/mat.hpp:914:37: note: candidate: template<class Tp> cv::Mat::Mat(const cv::Point<_Tp>&, bool) template<typename Tp> explicit Mat(const Point<Tp>& pt, bool copyData=true); ^ /usr/local/include/opencv2/core/mat.hpp:914:37: note: template argument deduction/substitution failed: main.cpp:182:28: note: mismatched types ‘const cv::Point<_Tp>’ and ‘IplImage* {aka _IplImage*}’ cv::Mat gray = cv::Mat(gr); ^ In file included from /usr/local/include/opencv2/core.hpp:59:0, from /usr/local/include/opencv2/opencv.hpp:46, from main.cpp:7: /usr/local/include/opencv2/core/mat.hpp:910:51: note: candidate: template<class _Tp, int m, int n> cv::Mat::Mat(const cv::Matx<_Tp, m, n>&, bool) template<typename _Tp, int m, int n> explicit Mat(const Matx<_Tp, m, n>& mtx, bool copyData=true); ^ /usr/local/include/opencv2/core/mat.hpp:910:51: note: template argument deduction/substitution failed: main.cpp:182:28: note: mismatched types ‘const cv::Matx<_Tp, m, n>’ and ‘IplImage* {aka _IplImage*}’ cv::Mat gray = cv::Mat(gr); ^ In file included from /usr/local/include/opencv2/core.hpp:59:0, from /usr/local/include/opencv2/opencv.hpp:46, from main.cpp:7: /usr/local/include/opencv2/core/mat.hpp:906:44: note: candidate: template<class _Tp, int n> cv::Mat::Mat(const cv::Vec<_Tp, m>&, bool) template<typename _Tp, int n> explicit Mat(const Vec<_Tp, n>& vec, bool copyData=true); ^ /usr/local/include/opencv2/core/mat.hpp:906:44: note: template argument deduction/substitution failed: main.cpp:182:28: note: mismatched types ‘const cv::Vec<_Tp, m>’ and ‘IplImage* {aka _IplImage*}’ cv::Mat gray = cv::Mat(gr); ^ In file included from /usr/local/include/opencv2/core.hpp:59:0, from /usr/local/include/opencv2/opencv.hpp:46, from main.cpp:7: /usr/local/include/opencv2/core/mat.hpp:902:37: note: candidate: template<class _Tp> cv::Mat::Mat(const std::vector<_Tp>&, bool) template<typename _Tp> explicit Mat(const std::vector<_Tp>& vec, bool copyData=false); ^ /usr/local/include/opencv2/core/mat.hpp:902:37: note: template argument deduction/substitution failed: main.cpp:182:28: note: mismatched types ‘const std::vector<_Tp>’ and ‘IplImage* {aka _IplImage*}’ cv::Mat gray = cv::Mat(gr); ^ In file included from /usr/local/include/opencv2/core.hpp:59:0, from /usr/local/include/opencv2/opencv.hpp:46, from main.cpp:7: /usr/local/include/opencv2/core/mat.hpp:884:5: note: candidate: cv::Mat::Mat(const cv::Mat&, const cv::Range*) Mat(const Mat& m, const Range* ranges); ^ /usr/local/include/opencv2/core/mat.hpp:884:5: note: candidate expects 2 arguments, 1 provided /usr/local/include/opencv2/core/mat.hpp:874:5: note: candidate: cv::Mat::Mat(const cv::Mat&, const Rect&) Mat(const Mat& m, const Rect& roi); ^ /usr/local/include/opencv2/core/mat.hpp:874:5: note: candidate expects 2 arguments, 1 provided /usr/local/include/opencv2/core/mat.hpp:864:5: note: candidate: cv::Mat::Mat(const cv::Mat&, const cv::Range&, const cv::Range&) Mat(const Mat& m, const Range& rowRange, const Range& colRange=Range::all()); ^ /usr/local/include/opencv2/core/mat.hpp:864:5: note: candidate expects 3 arguments, 1 provided /usr/local/include/opencv2/core/mat.hpp:852:5: note: candidate: cv::Mat::Mat(int, const int*, int, void*, const size_t*) Mat(int ndims, const int* sizes, int type, void* data, const size_t* steps=0); ^ /usr/local/include/opencv2/core/mat.hpp:852:5: note: candidate expects 5 arguments, 1 provided In file included from /usr/local/include/opencv2/core/mat.hpp:3396:0, from /usr/local/include/opencv2/core.hpp:59, from /usr/local/include/opencv2/opencv.hpp:46, from main.cpp:7: /usr/local/include/opencv2/core/mat.inl.hpp:425:1: note: candidate: cv::Mat::Mat(cv::Size, int, void*, size_t) Mat::Mat(Size _sz, int _type, void* _data, size_t _step) ^ /usr/local/include/opencv2/core/mat.inl.hpp:425:1: note: candidate expects 4 arguments, 1 provided /usr/local/include/opencv2/core/mat.inl.hpp:394:1: note: candidate: cv::Mat::Mat(int, int, int, void*, size_t) Mat::Mat(int _rows, int _cols, int _type, void* _data, size_t _step) ^ /usr/local/include/opencv2/core/mat.inl.hpp:394:1: note: candidate expects 5 arguments, 1 provided /usr/local/include/opencv2/core/mat.inl.hpp:375:1: note: candidate: cv::Mat::Mat(const cv::Mat&) Mat::Mat(const Mat& m) ^ /usr/local/include/opencv2/core/mat.inl.hpp:375:1: note: no known conversion for argument 1 from ‘IplImage* {aka _IplImage*}’ to ‘const cv::Mat&’ /usr/local/include/opencv2/core/mat.inl.hpp:366:1: note: candidate: cv::Mat::Mat(int, const int*, int, const Scalar&) Mat::Mat(int _dims, const int* _sz, int _type, const Scalar& _s) ^ /usr/local/include/opencv2/core/mat.inl.hpp:366:1: note: candidate expects 4 arguments, 1 provided /usr/local/include/opencv2/core/mat.inl.hpp:358:1: note: candidate: cv::Mat::Mat(int, const int*, int) Mat::Mat(int _dims, const int* _sz, int _type) ^ /usr/local/include/opencv2/core/mat.inl.hpp:358:1: note: candidate expects 3 arguments, 1 provided /usr/local/include/opencv2/core/mat.inl.hpp:349:1: note: candidate: cv::Mat::Mat(cv::Size, int, const Scalar&) Mat::Mat(Size _sz, int _type, const Scalar& _s) ^ /usr/local/include/opencv2/core/mat.inl.hpp:349:1: note: candidate expects 3 arguments, 1 provided /usr/local/include/opencv2/core/mat.inl.hpp:332:1: note: candidate: cv::Mat::Mat(int, int, int, const Scalar&) Mat::Mat(int _rows, int _cols, int _type, const Scalar& _s) ^ /usr/local/include/opencv2/core/mat.inl.hpp:332:1: note: candidate expects 4 arguments, 1 provided /usr/local/include/opencv2/core/mat.inl.hpp:341:1: note: candidate: cv::Mat::Mat(cv::Size, int) Mat::Mat(Size _sz, int _type) ^ /usr/local/include/opencv2/core/mat.inl.hpp:341:1: note: candidate expects 2 arguments, 1 provided /usr/local/include/opencv2/core/mat.inl.hpp:324:1: note: candidate: cv::Mat::Mat(int, int, int) Mat::Mat(int _rows, int _cols, int _type) ^ /usr/local/include/opencv2/core/mat.inl.hpp:324:1: note: candidate expects 3 arguments, 1 provided /usr/local/include/opencv2/core/mat.inl.hpp:318:1: note: candidate: cv::Mat::Mat() Mat::Mat() ^ /usr/local/include/opencv2/core/mat.inl.hpp:318:1: note: candidate expects 0 arguments, 1 provided Makefile:49: recipe for target 'main.o' failed make: *** [main.o] Error 1 run: 6: run: Bad substitution