I followed this guide to install openCV on Ubuntu: https://docs.opencv.org/master/d7/d9f/tutorial_linux_install.html
When I try to execute the following program:
#include <opencv2/core/core.hpp>
#include <opencv2/imgcodecs.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <iostream>
#include <math.h>
#include <tiffio.h>
using namespace std;
int main(){
string imageName("images/400nm.tif");
TIFF* tif = TIFFOpen(imageName.c_str(), "r");
Mat image;
return 0;
}
I get the following error executing the command "g++ ssim.cpp -o ssim -ltiff":
ssim.cpp: In function ‘int main()’: ssim.cpp:19:3: error: ‘Mat’ was not declared in this scope Mat image; ^~~ ssim.cpp:19:3: note: suggested alternative: In file included from /usr/local/include/opencv2/core.hpp:59:0, from /usr/local/include/opencv2/core/core.hpp:48, from ssim.cpp:2: /usr/local/include/opencv2/core/mat.hpp:771:18: note: ‘cv::Mat’ class CV_EXPORTS Mat
Does somebody know why I get this and how to solve it? I'm new at using opencv and libtiff so I have no idea about what to do to solve...
cv::Mat? - 0x5453#include <opencv2/core/core.hpp> int main(){ cv::Mat image; return 0; }Do you get the same error? - aparpara