Ask Your Question

Revision history [back]

Opencv not working on TX2

Hey guys,

I'm trying to do some video processing on TX2 and when I try to display the output, I get the following:

File "img_test.py", line 142, in <module>
    cv2.imshow('frame',frame) cv2.error: OpenCV(4.0.1-dev) /home/nvidia/opencv/modules/highgui/src/window.cpp:627: error: (-2:Unspecified error) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Cocoa support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function 'cvShowImage'

I tried to see which Opencv version TX2 was using and it's using 4.0.1-dev. Upon searching for libopencv, I get the following:

/home/nvidia/OpenCV/libopencv-dev_3.3.1_t186_arm64.deb
/home/nvidia/OpenCV/libopencv-python_3.3.1_t186_arm64.deb
/home/nvidia/OpenCV/libopencv-samples_3.3.1_t186_arm64.deb
/home/nvidia/OpenCV/libopencv_3.3.1_t186_arm64.deb
/usr/lib/aarch64-linux-gnu/libopencv_core.so.2.4
/usr/lib/aarch64-linux-gnu/libopencv_core.so.2.4.9
/usr/lib/aarch64-linux-gnu/libopencv_imgproc.so.2.4
/usr/lib/aarch64-linux-gnu/libopencv_imgproc.so.2.4.9
/usr/lib/libopencv_calib3d.so
/usr/lib/libopencv_calib3d.so.3.3
/usr/lib/libopencv_calib3d.so.3.3.1
/usr/lib/libopencv_core.so
/usr/lib/libopencv_core.so.3.3
/usr/lib/libopencv_core.so.3.3.1
/usr/lib/libopencv_dnn.so
/usr/lib/libopencv_dnn.so.3.3
/usr/lib/libopencv_dnn.so.3.3.1
/usr/lib/libopencv_features2d.so
/usr/lib/libopencv_features2d.so.3.3
/usr/lib/libopencv_features2d.so.3.3.1
/usr/lib/libopencv_flann.so
/usr/lib/libopencv_flann.so.3.3
/usr/lib/libopencv_flann.so.3.3.1
/usr/lib/libopencv_highgui.so
/usr/lib/libopencv_highgui.so.3.3
/usr/lib/libopencv_highgui.so.3.3.1
/usr/lib/libopencv_imgcodecs.so
/usr/lib/libopencv_imgcodecs.so.3.3
/usr/lib/libopencv_imgcodecs.so.3.3.1
/usr/lib/libopencv_imgproc.so
/usr/lib/libopencv_imgproc.so.3.3
/usr/lib/libopencv_imgproc.so.3.3.1
/usr/lib/libopencv_ml.so
/usr/lib/libopencv_ml.so.3.3
/usr/lib/libopencv_ml.so.3.3.1
/usr/lib/libopencv_objdetect.so
/usr/lib/libopencv_objdetect.so.3.3
/usr/lib/libopencv_objdetect.so.3.3.1
/usr/lib/libopencv_photo.so
/usr/lib/libopencv_photo.so.3.3
/usr/lib/libopencv_photo.so.3.3.1
/usr/lib/libopencv_shape.so
/usr/lib/libopencv_shape.so.3.3
/usr/lib/libopencv_shape.so.3.3.1
/usr/lib/libopencv_stitching.so
/usr/lib/libopencv_stitching.so.3.3
/usr/lib/libopencv_stitching.so.3.3.1
/usr/lib/libopencv_superres.so
/usr/lib/libopencv_superres.so.3.3
/usr/lib/libopencv_superres.so.3.3.1
/usr/lib/libopencv_video.so
/usr/lib/libopencv_video.so.3.3
/usr/lib/libopencv_video.so.3.3.1
/usr/lib/libopencv_videoio.so
/usr/lib/libopencv_videoio.so.3.3
/usr/lib/libopencv_videoio.so.3.3.1
/usr/lib/libopencv_videostab.so
/usr/lib/libopencv_videostab.so.3.3
/usr/lib/libopencv_videostab.so.3.3.1
/usr/local/lib/libopencv_calib3d.so
/usr/local/lib/libopencv_calib3d.so.4.0
/usr/local/lib/libopencv_calib3d.so.4.0.1
/usr/local/lib/libopencv_core.so
/usr/local/lib/libopencv_core.so.4.0
/usr/local/lib/libopencv_core.so.4.0.1
/usr/local/lib/libopencv_dnn.so
/usr/local/lib/libopencv_dnn.so.4.0
/usr/local/lib/libopencv_dnn.so.4.0.1
/usr/local/lib/libopencv_features2d.so
/usr/local/lib/libopencv_features2d.so.4.0
/usr/local/lib/libopencv_features2d.so.4.0.1
/usr/local/lib/libopencv_flann.so
/usr/local/lib/libopencv_flann.so.4.0
/usr/local/lib/libopencv_flann.so.4.0.1
/usr/local/lib/libopencv_gapi.so
/usr/local/lib/libopencv_gapi.so.4.0
/usr/local/lib/libopencv_gapi.so.4.0.1
/usr/local/lib/libopencv_highgui.so
/usr/local/lib/libopencv_highgui.so.4.0
/usr/local/lib/libopencv_highgui.so.4.0.1
/usr/local/lib/libopencv_imgcodecs.so
/usr/local/lib/libopencv_imgcodecs.so.4.0
/usr/local/lib/libopencv_imgcodecs.so.4.0.1
/usr/local/lib/libopencv_imgproc.so
/usr/local/lib/libopencv_imgproc.so.4.0
/usr/local/lib/libopencv_imgproc.so.4.0.1
/usr/local/lib/libopencv_ml.so
/usr/local/lib/libopencv_ml.so.4.0
/usr/local/lib/libopencv_ml.so.4.0.1
/usr/local/lib/libopencv_objdetect.so
/usr/local/lib/libopencv_objdetect.so.4.0
/usr/local/lib/libopencv_objdetect.so.4.0.1
/usr/local/lib/libopencv_photo.so
/usr/local/lib/libopencv_photo.so.4.0
/usr/local/lib/libopencv_photo.so.4.0.1
/usr/local/lib/libopencv_stitching.so
/usr/local/lib/libopencv_stitching.so.4.0
/usr/local/lib/libopencv_stitching.so.4.0.1
/usr/local/lib/libopencv_video.so
/usr/local/lib/libopencv_video.so.4.0
/usr/local/lib/libopencv_video.so.4.0.1
/usr/local/lib/libopencv_videoio.so
/usr/local/lib/libopencv_videoio.so.4.0
/usr/local/lib/libopencv_videoio.so.4.0.1
/usr/share/doc/libopencv-core2.4v5
/usr/share/doc/libopencv-core2.4v5/changelog.Debian.gz
/usr/share/doc/libopencv-core2.4v5/copyright
/usr/share/doc/libopencv-imgproc2.4v5
/usr/share/doc/libopencv-imgproc2.4v5/changelog.Debian.gz
/usr/share/doc/libopencv-imgproc2.4v5/copyright
/var/lib/dpkg/info/libopencv-core2.4v5:arm64.list
/var/lib/dpkg/info/libopencv-core2.4v5:arm64.md5sums
/var/lib/dpkg/info/libopencv-core2.4v5:arm64.shlibs
/var/lib/dpkg/info/libopencv-core2.4v5:arm64.triggers
/var/lib/dpkg/info/libopencv-dev.list
/var/lib/dpkg/info/libopencv-dev.md5sums
/var/lib/dpkg/info/libopencv-imgproc2.4v5:arm64.list
/var/lib/dpkg/info/libopencv-imgproc2.4v5:arm64.md5sums
/var/lib/dpkg/info/libopencv-imgproc2.4v5:arm64.shlibs
/var/lib/dpkg/info/libopencv-imgproc2.4v5:arm64.triggers
/var/lib/dpkg/info/libopencv-python.list
/var/lib/dpkg/info/libopencv-python.md5sums
/var/lib/dpkg/info/libopencv-samples.list
/var/lib/dpkg/info/libopencv-samples.md5sums
/var/lib/dpkg/info/libopencv.list
/var/lib/dpkg/info/libopencv.md5sums
/var/lib/dpkg/info/libopencv.postinst
/var/lib/dpkg/info/libopencv.postrm
/var/lib/dpkg/info/libopencv.shlibs

Can someone help me with getting rid of the error? Also, will it be possible if I can get rid of all the extra versions of Opencv?