Tried to install OpenCV 3 by following the instruction of JetsonHacks and JK Jung’s blog:
Remove OpenCV4Tegra from JetPack 3.1
sudo apt-get purge libopencv4tegra-python libopencv4tegra-dev libopencv4tegra sudo apt-get purge libopencv4tegra-repo
Run JetsonHacks’ scripts
git clone https://github.com/jetsonhacks/buildOpenCVTX2.git cd buildOpenCVTX2
./buildOpenCV.sh cd ~/opencv/build
$ sudo make install
Download “tegra-cam.py” from JK Jung’s blog
Run the Python code
cd ~/Downloads/python python3 tegra-cam.py
But got error message:
The execution failed with error message: Traceback (most recent call last): File "tegra-cam.py", line 15, in <module> import cv2 ImportError: No module named 'cv2'
Apparently Python was unable to import OpenCV library. Then I ran the command to check out the path.
$ sudo find / -name ‘libopencv_*’
Found two paths that seem containing the same set of library files
How to set up the path to the OpenCV library? Is it in .bashrc ?
JetsonHacks, “Build OpenCV on the NVIDIA Jetson TX2” http://www.jetsonhacks.com/2017/04/05/build-opencv-nvidia-jetson-tx2/
JK Jung, “How to Capture and Display Camera Video with Python on Jetson TX2” https://jkjung-avt.github.io/tx2-camera-with-python/