I have installed OpenCV 4.4 with pip (pip3 install opencv-python
), which works great from python.
However I would now like to switch to C++ (both to learn and to see what performance gain I can get), for example to execute this but I do not know how to compile it properly with g++
, to include OpenCV's headers.
Running cv2.__file
gives me '.../.local/lib/python3.8/site-packages/cv2/cv2.cpython-38-x86_64-linux-gnu.so'
.
I would prefer to use only g++
rather than tools like CMakeList, if possible, to understand exactly what I am doing. Being new to the C++
world, I admit that I am a bit confused about the whoe building and linking process. Any help would be greatly appreciated ;)