I am compiling OpenCV 3.4.1 in my Raspberry Pi 3b+. I have downloaded both opencv and opencv contrib. This is the build command I give : (ABSOLUTE NEWBIE in compiling using cmake and OpenCV)
cd ~/opencv-3.4.1/
mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D INSTALL_PYTHON_EXAMPLES=ON \
-D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib-3.4.1/modules \
-D ENABLE_PRECOMPILED_HEADERS=OFF \
-D BUILD_EXAMPLES=ON ..
After the building process is over, the compilation process still uses python 2.7 interpreter. What other option should I add to compile it using python3. I looked on stackoverflow and found this :how to build opencv for python3 when both python2 and python3 are installed But since it does not have a correct answer I am a bit skeptical.
Followed this guide : https://www.deciphertechnic.com/install-opencv-python-on-raspberry-pi/
Using Python 3.5.3
Please ask for any further info that is required. Thanks.