1 | initial version |
I finally solve the above problem by running the below magic:
sudo apt-get update
sudo apt-get upgrade
It would be good if you include the lib path as well:
g++ -std=c++11 DisplayImage.cpp -I/usr/local/include/opencv4 -L/usr/local/lib/ -lopencv_core -lopencv_imgcodecs -lopencv_highgui -o DisplayImage
Now I could open the image successfully. However, if we want a perfect answer, we still need to figure out how to do it in CMAKE.